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

Method getLabelForValue

src/scales/scale.time.js:495–503  ·  view source on GitHub ↗

* @param {number} value * @return {string}

(value)

Source from the content-addressed store, hash-verified

493 * @return {string}
494 */
495 getLabelForValue(value) {
496 const adapter = this._adapter;
497 const timeOpts = this.options.time;
498
499 if (timeOpts.tooltipFormat) {
500 return adapter.format(value, timeOpts.tooltipFormat);
501 }
502 return adapter.format(value, timeOpts.displayFormats.datetime);
503 }
504
505 /**
506 * @param {number} value

Callers

nothing calls this directly

Calls 1

formatMethod · 0.65

Tested by

no test coverage detected