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

Method _updateDataset

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

746 * @private
747 */
748 _updateDataset(index, mode) {
749 const meta = this.getDatasetMeta(index);
750 const args = {meta, index, mode, cancelable: true};
751
752 if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {
753 return;
754 }
755
756 meta.controller._update(mode);
757
758 args.cancelable = false;
759 this.notifyPlugins('afterDatasetUpdate', args);
760 }
761
762 render() {
763 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