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
I'm using line charts with the x-axis of type "time" and each series with type "line". I fetch new data and update the option.series, which works fine with a single series. I'm not able to update the series correctly with multiple series. There is always one old/previous series that lingers and is still rendered on the page.
Basically, there is a date picker, a few toggles, and data fields that the user can select from a long list. The user can select multiple, and 3 fields are selected by default. On mount, data is fetched and the chart is plotted correctly. However, upon selecting other fields, or de-selecting fields in the UI, new data is fetched, and the plot is redrawn with the new data as expected, but one old series is still plotted, even though that series is removed from option.series and from my state.data ref.
My issue and question is whether I am updating the option.series correctly after my data fetches.
I'm using line charts with the x-axis of type "time" and each series with type "line". I fetch new data and update the
option.series
, which works fine with a single series. I'm not able to update the series correctly with multiple series. There is always one old/previous series that lingers and is still rendered on the page.Basically, there is a date picker, a few toggles, and data fields that the user can select from a long list. The user can select multiple, and 3 fields are selected by default. On mount, data is fetched and the chart is plotted correctly. However, upon selecting other fields, or de-selecting fields in the UI, new data is fetched, and the plot is redrawn with the new data as expected, but one old series is still plotted, even though that series is removed from
option.series
and from mystate.data
ref.My issue and question is whether I am updating the
option.series
correctly after my data fetches.The text was updated successfully, but these errors were encountered: