(chart: Chart, meta: ChartMeta)
| 18 | } |
| 19 | |
| 20 | export function getDatasetClipArea(chart: Chart, meta: ChartMeta): TRBL | false { |
| 21 | const clip = meta._clip; |
| 22 | if (clip.disabled) { |
| 23 | return false; |
| 24 | } |
| 25 | const area = getDatasetArea(meta, chart.chartArea); |
| 26 | |
| 27 | return { |
| 28 | left: clip.left === false ? 0 : area.left - (clip.left === true ? 0 : clip.left), |
| 29 | right: clip.right === false ? chart.width : area.right + (clip.right === true ? 0 : clip.right), |
| 30 | top: clip.top === false ? 0 : area.top - (clip.top === true ? 0 : clip.top), |
| 31 | bottom: clip.bottom === false ? chart.height : area.bottom + (clip.bottom === true ? 0 : clip.bottom) |
| 32 | }; |
| 33 | } |
no test coverage detected