Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change y-axis in Dygraph to NOT be scientific notation

I have created a dygraph and want change the y-axis from scientific notation to decimal form.

This is what the code looks like:

df_xts <- xts(df$Var1,order.by=df$Date)
dygraph(A_xts, 
        main="DF - Var1",group="group1") %>%
  dySeries("V1",label="Var1") %>%
  dyOptions(stackedGraph = FALSE,colors=c("blue")) %>%
  dyRangeSelector()

I'm guessing it would be placed under dyOptions but I'm not sure.

Thanks!

like image 510
analytics Avatar asked Sep 21 '15 18:09

analytics


Video Answer


1 Answers

With my sample data it looks like this:

df_xts <- xts(runif(10) * 1e10, order.by = as.POSIXct(x = 1:10, origin = "2015-01-01") )

dygraph(df_xts, main="DF - Var1") %>%
  dySeries("V1",label="Var1") %>%
  dyOptions(maxNumberWidth = 20, stackedGraph = FALSE,colors=c("blue")) %>%
  dyRangeSelector
like image 75
bergant Avatar answered Oct 13 '22 06:10

bergant