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
After calling update() on a consistent chart configuration with an additional unused axis I would expect the datasets to be displayed on the correct axes.
Current Behavior
One dataset is displayed on the additional unused axis.
Additionally the 'unused' axis is displayed 'overlayed', but that's not what this bug report is about.
Create time based chart with one dataset and two yAxes (named 'y1' and 'unused'), one not displayed and unused, the other assigned to the dataset via yAxisID
Add a second dataset without axisID. Call chart update().
Remove 'y1' axis
Push new axis configuration for two similar axes 'y1' (again) and 'y2'.
Assign axes 'y1' to dataset 1 and 'y2' to dataset 2. Call chart update().
Change "display" property of unused axis to "true"
Context
I was trying to add new data to the chart and refresh the axis configuration while keeping a separate axis for other purposes non visible.
If i remove the chart.update() call after adding the second dataset, it is correctly displayed on axis 'y2'.
I'm doing these updates because i was running into this issue from time to time: #5149
Environment
Chart.js version: 2.8.0
Browser name and version: Firefox 60.6.2esr (32-Bit)
The text was updated successfully, but these errors were encountered:
To fix the issue of the 'unusedY' axis overlaying the 'y1' axis, add window.myChart.update() after displayUnusedAxis().
The issue of the 'My second dataset' sticking to the 'unusedY' axis seems to be a bug. The change in data.dataset[1].yAxisID is not reflected in data.dataset[1]._meta[0].yAxisID.
Expected Behavior
After calling update() on a consistent chart configuration with an additional unused axis I would expect the datasets to be displayed on the correct axes.
Current Behavior
One dataset is displayed on the additional unused axis.
Additionally the 'unused' axis is displayed 'overlayed', but that's not what this bug report is about.
Possible Solution
Steps to Reproduce (for bugs)
Bug can be reproduced with this codepen: https://codepen.io/nas3nmann/pen/XwGLbg?editors=1010
Here are the steps in detail:
Context
I was trying to add new data to the chart and refresh the axis configuration while keeping a separate axis for other purposes non visible.
If i remove the chart.update() call after adding the second dataset, it is correctly displayed on axis 'y2'.
I'm doing these updates because i was running into this issue from time to time: #5149
Environment
The text was updated successfully, but these errors were encountered: