rstudio / dygraphs

R interface to dygraphs
http://rstudio.github.io/dygraphs
Other
364 stars 194 forks source link

Show upper/lower bar values in legend #232

Closed MoAnd closed 4 years ago

MoAnd commented 4 years ago

Hi. I was wondering if it is possible to show all the values of the prediction interval in the legend, i.e. , lower, actual, upper, without having them as three separate plain dySeries? I like the look of the shading that the upper/lower bars bring, but I would also like to be able to hover over a time point and see all the values for that particular point. If such a function does not exists, is there an easy workaround, maybe with fillGraph = TRUE or something? Thank you :)

datenzauberai commented 4 years ago

You can do this with a custom value formatter. See e.g. this gist for plotting forecast objects

MoAnd commented 4 years ago

Thank you, however, I already found a workaround myself which I have described in https://stackoverflow.com/questions/57822036/shiny-dygraphs-show-all-error-bar-values-in-legend. But I'll consider your method in the future since it looks more appealing.