Closed shubhamsaini closed 9 years ago
I am trying to plot a multiline graph. Facing two issues:
Below is my code: plotForecast <- data.frame(hourIndex=1:24,testHourP=1:24,d1P=25:48,enerDataP=49:72)
plotForecast %>% mjs_plot(x=hourIndex, y=testHourP) %>% mjs_line() %>% mjs_add_line(d1P) %>% mjs_add_line(enerDataP) %>% mjs_add_legend(legend=c("X", "Y", "Z"))
EDIT: The program seems to be missing mjs_axis_x() function. Without using this function, multi-line plots do not animate.
It appears that there is an underlying assumption in the metrics-graphics js lib that the dynamic labels for the multi-line plots will be date-based. Not sure I'm going to be able to work around that.
I am trying to plot a multiline graph. Facing two issues:
Below is my code: plotForecast <- data.frame(hourIndex=1:24,testHourP=1:24,d1P=25:48,enerDataP=49:72)
plotForecast %>% mjs_plot(x=hourIndex, y=testHourP) %>% mjs_line() %>% mjs_add_line(d1P) %>% mjs_add_line(enerDataP) %>%
mjs_add_legend(legend=c("X", "Y", "Z"))
EDIT: The program seems to be missing mjs_axis_x() function. Without using this function, multi-line plots do not animate.