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

Method parse

src/scales/scale.category.js:70–78  ·  view source on GitHub ↗
(raw, index)

Source from the content-addressed store, hash-verified

68 }
69
70 parse(raw, index) {
71 if (isNullOrUndef(raw)) {
72 return null;
73 }
74 const labels = this.getLabels();
75 index = isFinite(index) && labels[index] === raw ? index
76 : findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);
77 return validIndex(index, labels.length - 1);
78 }
79
80 determineDataLimits() {
81 const {minDefined, maxDefined} = this.getUserBounds();

Callers 1

getPixelForValueMethod · 0.95

Calls 5

isNullOrUndefFunction · 0.85
findOrAddLabelFunction · 0.85
valueOrDefaultFunction · 0.85
validIndexFunction · 0.85
getLabelsMethod · 0.65

Tested by

no test coverage detected