dygraphs icon indicating copy to clipboard operation
dygraphs copied to clipboard

Reverse X Axis

Open K-lone opened this issue 8 years ago • 2 comments

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

K-lone avatar Nov 30 '17 22:11 K-lone

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))

K-lone avatar Dec 01 '17 04:12 K-lone

anyone ???

K-lone avatar Jan 08 '18 13:01 K-lone