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

Function getLineByIndex

src/plugins/plugin.filler/filler.target.js:41–45  ·  view source on GitHub ↗

* @param {Chart} chart * @param {number} index

(chart, index)

Source from the content-addressed store, hash-verified

39 * @param {number} index
40 */
41function getLineByIndex(chart, index) {
42 const meta = chart.getDatasetMeta(index);
43 const visible = meta && chart.isDatasetVisible(index);
44 return visible ? meta.dataset : null;
45}
46
47function computeBoundary(source) {
48 const scale = source.scale || {};

Callers 1

_getTargetFunction · 0.85

Calls 2

getDatasetMetaMethod · 0.80
isDatasetVisibleMethod · 0.80

Tested by

no test coverage detected