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

Method getLabelAndValue

src/controllers/controller.bubble.js:96–109  ·  src/controllers/controller.bubble.js::BubbleController.getLabelAndValue

* @protected

(index)

Source from the content-addressed store, hash-verified

94 * @protected
95 */
96 getLabelAndValue(index) {
97 const meta = this._cachedMeta;
98 const labels = this.chart.data.labels || [];
99 const {xScale, yScale} = meta;
100 const parsed = this.getParsed(index);
101 const x = xScale.getLabelForValue(parsed.x);
102 const y = yScale.getLabelForValue(parsed.y);
103 const r = parsed._custom;
104
105 return {
106 label: labels[index] || class="st">'',
107 value: class="st">'(' + x + class="st">', ' + y + (r ? class="st">', ' + r : class="st">'') + class="st">')'
108 };
109 }
110
111 update(mode) {
112 const points = this._cachedMeta.data;

Callers

nothing calls this directly

Calls 2

getParsedMethod · 0.80
getLabelForValueMethod · 0.65

Tested by

no test coverage detected