mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-06 16:26:52 +01:00
Better organize calls in main controller (#7345)
This commit is contained in:
committed by
Evert Timberg
parent
56de3e420c
commit
fab8e902bb
@@ -119,8 +119,6 @@ function updateConfig(chart) {
|
||||
chart.options.scales = scaleConfig;
|
||||
|
||||
chart._animationsDisabled = isAnimationDisabled(newOptions);
|
||||
chart.ensureScalesHaveIDs();
|
||||
chart.buildOrUpdateScales();
|
||||
}
|
||||
|
||||
const KNOWN_POSITIONS = new Set(['top', 'bottom', 'left', 'right', 'chartArea']);
|
||||
@@ -539,6 +537,9 @@ export default class Chart {
|
||||
|
||||
updateConfig(me);
|
||||
|
||||
me.ensureScalesHaveIDs();
|
||||
me.buildOrUpdateScales();
|
||||
|
||||
// plugins options references might have change, let's invalidate the cache
|
||||
// https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167
|
||||
plugins.invalidate(me);
|
||||
|
||||
Reference in New Issue
Block a user