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

Method _updateDataset

src/core/core.controller.js:669–681  ·  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

667 * @private
668 */
669 _updateDataset(index, mode) {
670 const meta = this.getDatasetMeta(index);
671 const args = {meta, index, mode, cancelable: true};
672
673 if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {
674 return;
675 }
676
677 meta.controller._update(mode);
678
679 args.cancelable = false;
680 this.notifyPlugins('afterDatasetUpdate', args);
681 }
682
683 render() {
684 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