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
During the options setter, some update mechanism is started even before the chart.update function was called. If there is a dependence on data, this causes an issue, when options were updated incorrectly. Because of this, it is mandatory to update data before the options are updated.
Expected Behavior
It is expected that data and options can be updated in any order. Should not be affected while the update function has been called.
Current Behavior
If you update options before data, an error occurs.
Steps to Reproduce
The error was found by one of the wrapper users. I will add a link, maybe this will give you more data for analysis. xr0master/chartjs-react#10
https://codesandbox.io/s/damp-surf-znpnz
This playground uses a wrapper, but it doesn't really matter. The important thing is that if you update data and then the options, the bug with the axes does not occur. Two different versions of the wrapper are used to show the issue: [options, data], [data, options].
xr0master
changed the title
[Issue][v3] strict order of updating options and date.
[Issue][v3.beta.11] strict order of updating options and date.
Feb 24, 2021
xr0master
changed the title
[Issue][v3.beta.11] strict order of updating options and date.
[Issue][v3.beta.11] strict order of updating options and data.
Feb 24, 2021
Hey guys, there is some behavior associated with this line.
https://github.com/chartjs/Chart.js/blob/master/src/core/core.controller.js#L162
During the options setter, some update mechanism is started even before the
chart.update
function was called. If there is a dependence on data, this causes an issue, when options were updated incorrectly. Because of this, it is mandatory to update data before the options are updated.Expected Behavior
It is expected that data and options can be updated in any order. Should not be affected while the update function has been called.
Current Behavior
If you update options before data, an error occurs.
Steps to Reproduce
The error was found by one of the wrapper users. I will add a link, maybe this will give you more data for analysis.
xr0master/chartjs-react#10
https://codesandbox.io/s/damp-surf-znpnz
This playground uses a wrapper, but it doesn't really matter. The important thing is that if you update data and then the options, the bug with the axes does not occur. Two different versions of the wrapper are used to show the issue: [options, data], [data, options].
Environment
Thanks for @ace-han investigation
The text was updated successfully, but these errors were encountered: