You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using React/React wrapper, updating uPlot using the props then it is not always easy to control if data or options gets updated first.
I discovered that if the data props has fever elements than the option.series (y series), then it throws an error.
It would be nice if the series with missing data was just ignored or shown without plot on graph, like an empty series.
It would further be fantastic if the connection between options.series and data arrays could be connected using some kind of series key, and this was also reflected in the API. This way, if could be possible to add/del/update series dynamically by referring to the key instead of an index number which gets quite complicated managing the book-keeping of series (also including x series) when using the API from a framework like react.
Heres a repro of the problem with missing data series.
When using React/React wrapper, updating uPlot using the props then it is not always easy to control if data or options gets updated first.
I discovered that if the data props has fever elements than the option.series (y series), then it throws an error.
It would be nice if the series with missing data was just ignored or shown without plot on graph, like an empty series.
It would further be fantastic if the connection between options.series and data arrays could be connected using some kind of series key, and this was also reflected in the API. This way, if could be possible to add/del/update series dynamically by referring to the key instead of an index number which gets quite complicated managing the book-keeping of series (also including x series) when using the API from a framework like react.
Heres a repro of the problem with missing data series.
Repro
In line 159 you can in-comment the second y series data array which solves the error.
Best regards, Peter
The text was updated successfully, but these errors were encountered: