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

Function labelOf

test/specs/controller.bubble.spec.js:425–432  ·  view source on GitHub ↗
(index, data, scales)

Source from the content-addressed store, hash-verified

423
424 describe('tooltip label', function() {
425 function labelOf(index, data, scales) {
426 const chart = window.acquireChart({
427 type: 'bubble',
428 data,
429 options: {scales}
430 });
431 return chart.getDatasetMeta(0).controller.getLabelAndValue(index).label;
432 }
433
434 it('should come from a category x axis whose labels come from the data', function() {
435 const data = {datasets: [{data: [{x: 'a', y: 1, r: 5}, {x: 'b', y: 2, r: 5}]}]};

Callers 1

Calls 2

getDatasetMetaMethod · 0.80
getLabelAndValueMethod · 0.45

Tested by

no test coverage detected