Skip to content

Commit

Permalink
Improves chart update performance for a large number of datasets
Browse files Browse the repository at this point in the history
Fixes #11814 partly
  • Loading branch information
Jan Wedel committed Jul 17, 2024
1 parent 0ca1b6e commit 1e6cdd8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/core.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,7 @@ class Chart {
getDatasetMeta(datasetIndex) {
const dataset = this.data.datasets[datasetIndex];
const metasets = this._metasets;
let meta = metasets.filter(x => x && x._dataset === dataset).pop();

let meta = metasets[datasetIndex];
if (!meta) {
meta = {
type: null,
Expand All @@ -869,7 +868,7 @@ class Chart {
_parsed: [],
_sorted: false
};
metasets.push(meta);
metasets[datasetIndex] = meta;
}

return meta;
Expand Down

0 comments on commit 1e6cdd8

Please sign in to comment.