rstudio / dygraphs

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

Added NaN preserving toJSON function #233

Closed mitchelloharawild closed 2 years ago

mitchelloharawild commented 4 years ago

NaN values have special meaning in dygraphs, as they cause series gaps even when connectSeparatedPoints = TRUE.

connectSeparatedPoints

Usually, when Dygraphs encounters a missing value in a data series, it interprets this as a gap and draws it as such. If, instead, the missing values represents an x-value for which only a different series has data, then you'll want to connect the dots by setting this to true. To explicitly include a gap with this option set, use a value of NaN.

This is particularly important when plotting multiple time series which may be observed at different time points, that may contain missing values.

This functionality is also demonstrated here: http://dygraphs.com/tests/independent-series.html

hug-fr commented 4 years ago

Is it planned to implement this feature in the next release ? I'm very interested in ! It would be even better if we could have a date for the release. Thanks

przmv commented 4 years ago

@mitchelloharawild thanks! Could you please also add some documentation or some minimal example.

mitchelloharawild commented 4 years ago

I've updated the docs to match dygraphs description of this feature.

mitchelloharawild commented 3 years ago

Could you review the changes made in this PR?

przmv commented 3 years ago

Hello,

Thank you! Yes, I’m going to review it today.

Petr Shevtsov

On 6 Oct 2020, at 09:20, mitchelloharawild notifications@github.com wrote:

 Could you review the changes made in this PR?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

mitchelloharawild commented 3 years ago

Great, thanks!