-
-
Couldn't load subscription status.
- Fork 1.4k
Description
Codepen
Codepen to demonstrate the problem.
Explanation
To give some context, I'm displaying data from a database that I request in php and then display it in an HTML table (using Datatables.net). I then get the data from this HTML table and use it to create my chart. All data series are irregular time series, and I add null values in between values too far away in time from each other to avoid unnecessary and meaningless lines on my chart. The data series are added at the end and not in the options declaration because in my application I can't know how many data series there will be before runtime. To simplify the explanation here I created 2 series directly in JS. Without zooming in, they look like vertical lines because they're very close to each other in time, but after zooming in they look normal. The bug happens when trying to reset the view.
- What is the behavior you expect?
When clicking on the reset button after zooming in, I expect the view to reset correctly and the chart to show all data series that were inserted when the chart first displayed.
- What is happening instead?
When clicking on the reset button after zooming in :
- The chart just empties itself, nothing is visible (not even the buttons) except Y Axis labels and an empty series in the legend.
OR : - Only one data series is visible (the first one in the order they were added) and the rest of the chart is fine.
- Reproduction rate
100% of the time. Just zoom in anywhere, at any distance. And then click the reset view button. (the zoom out button is fine though)
- What error message are you getting?
I don't get any message when the error happens, but I always get this message (I don't think the 2 are related but can't know for sure).
The message I almost always get, no matter what I do is :
TypeError: source is null
And the error points at apexcharts.js:15053:7
I have no idea how to solve this error, except by disabling the reset button in the toolbar options. Any help is appreciated !