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

Method getDatasetMeta

src/core/core.controller.js:908–932  ·  view source on GitHub ↗
(datasetIndex)

Source from the content-addressed store, hash-verified

906 }
907
908 getDatasetMeta(datasetIndex) {
909 const dataset = this.data.datasets[datasetIndex];
910 let meta = this._metasetByDataset.get(dataset);
911
912 if (!meta) {
913 meta = {
914 type: null,
915 data: [],
916 dataset: null,
917 controller: null,
918 hidden: null, // See isDatasetVisible() comment
919 xAxisID: null,
920 yAxisID: null,
921 order: dataset && dataset.order || 0,
922 index: datasetIndex,
923 _dataset: dataset,
924 _parsed: [],
925 _sorted: false
926 };
927 this._metasets.push(meta);
928 this._metasetByDataset.set(dataset, meta);
929 }
930
931 return meta;
932 }
933
934 getContext() {
935 return this.$context || (this.$context = createContext(null, {chart: this, type: 'chart'}));

Callers 15

_resetElementsMethod · 0.95
updateMethod · 0.95
_deactivateHiddenMethod · 0.95
_updateDatasetsMethod · 0.95
_updateDatasetMethod · 0.95
isDatasetVisibleMethod · 0.95
setDatasetVisibilityMethod · 0.95
_updateVisibilityMethod · 0.95
updateHoverStyleMethod · 0.95
setActiveElementsMethod · 0.95

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by 13

decodedFillValuesFunction · 0.64
testSliceFunction · 0.64
sliceCenterFunction · 0.64
expectNothingActiveFunction · 0.64
pressPointFunction · 0.64
itemsFunction · 0.64
getXFunction · 0.64
pointsAreFiniteFunction · 0.64
firstPointPixelFunction · 0.64
labelOfFunction · 0.64
labelOfFunction · 0.64