dygraphs
dygraphs copied to clipboard
Reverse X Axis
Hello,
I built a code using dygraph to display analytical data from FTIR in R. Such data is normally presented with X-values running from high to low.
I searched a lot on internet and it seems there is no way to do it using dyAxis, dyoption or dyRangeSelector. Changing the valueRange from c(low, high) to c(high, low) works fine for Y-axis but not for X-axis.
Is there any possibility (or an option) to display the X-values in reverse order, from high to low values?
Thanks a lot
Matthieu
An example: With Y-Axis (works perfectly)
x <- 1:10
y1 <- abs(rnorm(10)*5)
table <- data.frame(x, y1, stringsAsFactors = FALSE)
dygraph(table) %>%
dyAxis("y", valueRange = c(10,1))
With X-Axis (doesn't work)
x <- 1:10
y1 <- abs(rnorm(10)*5)
table <- data.frame(x, y1, stringsAsFactors = FALSE)
dygraph(table) %>%
dyAxis("x", valueRange = c(10,1))
anyone ???