dygraphs

Dygraphs not working with ng-repeat

时间秒杀一切 提交于 2019-11-27 19:05:27
问题 I'm new to AngularJS and building a dashboard with dygraphs. Tried to put the example code from the dygraphs website in an ng-repeat-list, just to test. Expected the same sample graph for every x in y. Unfortunately the graph doesn't get drawn, just the axes, console doesn't show any errors. <li ng-repeat="x in y"> <div id="graph"> <script> new Dygraph(document.getElementById("graph"), [ [1,10,100], [2,20,80], [3,50,60], [4,70,80] ], { labels: [ "x", "A", "B" ] }); </script> </div> </li> If I

dyShading R dygraph

为君一笑 提交于 2019-11-27 15:19:26
问题 I am using the dygraphs package and I would like to add multiple shaded regions using the dyShading function. I would like not to have to specify manually the shaded region as it is done in the help of the function: dygraph(nhtemp, main = "New Haven Temperatures") %>% dyShading(from = "1920-1-1", to = "1930-1-1") %>% dyShading(from = "1940-1-1", to = "1950-1-1") But instead, make a loop on the regions. It would look like something like that (that does not work!): data %>% dygraph() %>% for(

dygraph in R multiple plots at once

徘徊边缘 提交于 2019-11-27 06:51:41
问题 I want to plot multiple plots at once using dygraph (they do not have to be synchronized in the first step) Base R-example: temperature <- ts(frequency = 12, start = c(1980, 1), data = c(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6)) rainfall <- ts(frequency = 12, start = c(1980, 1), data = c(49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4)) par(mfrow = c(2, 1)) plot(temperature) plot(rainfall) With dygraph this approach does not work

For loop over dygraph does not work in R

天大地大妈咪最大 提交于 2019-11-26 17:45:58
There is some strange behavior on dygraph . When using a for loop for dygraph i get no result. library(dygraphs) lungDeaths <- cbind(mdeaths, fdeaths) for(i in 1:2){ dygraph(lungDeaths[, i]) } On the other hand when i use lapply i do get the expected result lapply(1:2, function(i) dygraph(lungDeaths[, i])) I actually want to use the for loop in R Markdown on my own data set and iterate over the different columns, but even when i use the lapply "workaround", it does not plot the dygraphs R Markdown code --- title: "Untitled" author: "dimitris_ps" date: "28 May 2015" output: html_document --- ``