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

Method getLabelAndValue

src/controllers/controller.scatter.js:42–54  ·  src/controllers/controller.scatter.js::ScatterController.getLabelAndValue

* @protected

(index)

Source from the content-addressed store, hash-verified

40 * @protected
41 */
42 getLabelAndValue(index) {
43 const meta = this._cachedMeta;
44 const labels = this.chart.data.labels || [];
45 const {xScale, yScale} = meta;
46 const parsed = this.getParsed(index);
47 const x = xScale.getLabelForValue(parsed.x);
48 const y = yScale.getLabelForValue(parsed.y);
49
50 return {
51 label: labels[index] || class="st">'',
52 value: class="st">'(' + x + class="st">', ' + y + class="st">')'
53 };
54 }
55
56 update(mode) {
57 const meta = this._cachedMeta;

Callers

nothing calls this directly

Calls 2

getParsedMethod · 0.80
getLabelForValueMethod · 0.65

Tested by

no test coverage detected