Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when data has fever series than option.series #966

Open
mulgurul opened this issue Jul 5, 2024 · 0 comments
Open

Error when data has fever series than option.series #966

mulgurul opened this issue Jul 5, 2024 · 0 comments

Comments

@mulgurul
Copy link

mulgurul commented Jul 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant