r - Specify external resource in config.yml -
i have following config.yml
file:
dygraphs: jshead: [js/dygraph-combined.js, js/lodash.js] cdn: jshead: - "http://cdnjs.cloudflare.com/ajax/libs/dygraph/1.0.1/dygraph-combined.js" - "http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"
it sources locally saved js/dygraph-combined.js
, js/lodash.js
files within working directory.
how rewrite source instead http
addresses provided above?
edit
i've found workaround without using config.yml
, inserting addresses inside rcharts
object property this:
dy1 <- rcharts$new() ... dy1$html_assets$js = c( "http://cdnjs.cloudflare.com/ajax/libs/dygraph/1.0.1/dygraph-combined.js", "http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js") ...
this result in html
file indeed contains remote resources:
<script src='http://cdnjs.cloudflare.com/ajax/libs/dygraph/1.0.1/dygraph-combined.js' type='text/javascript'></script> <script src='http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js' type='text/javascript'></script>
is there still way how achieve same amending config.yml
file appropriately?
posting comment answer.
you can pass option cdn = true show or save methods , automatically make use of http links. example,
# display chart using http links dy1$show(cdn = true) # save chart using http links dy1$save('mychart.html', cdn = true)
Comments
Post a Comment