MCPcopy
hub / github.com/chartjs/Chart.js / beforeUpdate

Function beforeUpdate

src/plugins/plugin.legend.js:615–619  ·  view source on GitHub ↗
(chart, _args, options)

Source from the content-addressed store, hash-verified

613 // This ensures that if the legend position changes (via an option update)
614 // the layout system respects the change. See https://github.com/chartjs/Chart.js/issues/7527
615 beforeUpdate(chart, _args, options) {
616 const legend = chart.legend;
617 layouts.configure(chart, legend, options);
618 legend.options = options;
619 },
620
621 // The labels need to be built after datasets are updated to ensure that colors
622 // and other styling are correct. See https://github.com/chartjs/Chart.js/issues/6968

Callers

nothing calls this directly

Calls 1

configureMethod · 0.65

Tested by

no test coverage detected