Graphing negative and positive numbers?
I'm trying to graph data with negative and positive numbers. In this example of daily high and low temperatures in Fargo, ND - csv file here - my graph y axis is just showing 1 to -13 and the data is not showing properly.
fargo <- read.csv("fargoTemps2014.csv", colClasses = c("Date", "integer", "integer"))
fargo_for_graph <- xts::xts(fargo, order.by = fargo$Date)
dygraph(fargo_for_graph)

I have the same issue when I try to have the data has both positive and negative values.
In my case, all the series which only contain positive values can be displayed well. But the data which are all negative cannot be seen any more.
Same issues on my end. @jjallaire should we expect to see this issue addressed?
I'm having the same issues. It looks like when values are just negative it flips the y axis and shows from 0 up to my minimum value (-50 for example). But when there are both positive and negative values, it does not show the negative ones as demonstrated above. Would love to see a fix for this.
Same here. This seems like it should be a relatively easy fix.
I am able to hack my way out of this problem by adding a valueRange to the y axis:
library(dygraphs)
library(xts)
date <- Sys.Date()
data <- data.frame(Date = c(date + 1, date + 2, date + 3, date + 4),
Value = c(1, 4.2, 5, -0.3))
xtsdata <- xts::xts(data, order.by = data$Date)
padrange <- c(min(data$Value) - 1, max(data$Value) + 1)
dygraph(xtsdata) %>%
dyRangeSelector() %>%
dyAxis("y", valueRange = padrange)
However, this does not fix the problem in the rangeSelector. Any data with negative values will simply yield a blank rangeSelector. Any suggestions on how to set the y-axis on the rangeSelector?