MCPcopy Create free account
hub / github.com/chartjs/Chart.js / _updateDataset

Method _updateDataset

src/core/core.controller.js:673–685  ·  view source on GitHub ↗

* Updates dataset at index unless a plugin returns `false` to the `beforeDatasetUpdate` * hook, in which case, plugins will not be called on `afterDatasetUpdate`. * @private

(index, mode)

Source from the content-addressed store, hash-verified

671 * @private
672 */
673 _updateDataset(index, mode) {
674 const meta = this.getDatasetMeta(index);
675 const args = {meta, index, mode, cancelable: true};
676
677 if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {
678 return;
679 }
680
681 meta.controller._update(mode);
682
683 args.cancelable = false;
684 this.notifyPlugins('afterDatasetUpdate', args);
685 }
686
687 render() {
688 if (this.notifyPlugins('beforeRender', {cancelable: true}) === false) {

Callers 1

_updateDatasetsMethod · 0.95

Calls 3

getDatasetMetaMethod · 0.95
notifyPluginsMethod · 0.95
_updateMethod · 0.45

Tested by

no test coverage detected