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

Method parse

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

Source from the content-addressed store, hash-verified

75 }
76
77 parse(raw, index) {
78 if (isNullOrUndef(raw)) {
79 return null;
80 }
81 const labels = this.getLabels();
82 index = isFinite(index) && labels[index] === raw ? index
83 : findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);
84 return validIndex(index, labels.length - 1);
85 }
86
87 determineDataLimits() {
88 const {minDefined, maxDefined} = this.getUserBounds();

Callers 2

beforeLayoutMethod · 0.95
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