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

Function getDatasetArea

src/helpers/helpers.dataset.ts:7–18  ·  view source on GitHub ↗
(meta: ChartMeta, chartArea: ChartArea)

Source from the content-addressed store, hash-verified

5}
6
7function getDatasetArea(meta: ChartMeta, chartArea: ChartArea): TRBL {
8 const {xScale, yScale} = meta;
9 if (xScale && yScale) {
10 return {
11 left: getSizeForArea(xScale, chartArea, 'left'),
12 right: getSizeForArea(xScale, chartArea, 'right'),
13 top: getSizeForArea(yScale, chartArea, 'top'),
14 bottom: getSizeForArea(yScale, chartArea, 'bottom')
15 };
16 }
17 return chartArea;
18}
19
20export function getDatasetClipArea(chart: Chart, meta: ChartMeta): TRBL | false {
21 const clip = meta._clip;

Callers 1

getDatasetClipAreaFunction · 0.85

Calls 1

getSizeForAreaFunction · 0.85

Tested by

no test coverage detected