c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.34k stars 1.39k forks source link

Loading in new data may completely break the graph #2679

Open Venefilyn opened 5 years ago

Venefilyn commented 5 years ago

Upon loading some data, then changing the dataset completely (with the same series data), it may render it completely unusable or render a dataset that doesn't exist (rendering a dataset that doesn't exist happens everytime when unload arg in load is set).

I have no idea what is causing it. Might be related to #2673

Some examples:

When graph is created: Displaying dataset 1 image

Switching from dataset 1 to dataset 2. Renders it completely unusable image

When graph is created: Displaying dataset 2 image

Switching from dataset 2 to dataset 1 image

Venefilyn commented 5 years ago

Notice how switching from dataset 2 to 1 doesn't update the x-axis either (despite axis.x.categories being included in load()). The end-date is set first before the data is loaded in, but the data doesn't update correctly.