computeChartFrame()
function computeChartFrame(
width,
height,
padding
): ChartFrame;Defined in: packages/core/src/chart/frame.ts:15
Carves the plot rectangle out of a chart's outer box.
The analogue of createPixelTransform's padding handling, minus every
pitch concern: no crop, no orientation, no uniform-scale constraint. A
chart's two axes are independent by definition — that is what makes it a
chart and not a pitch — so there is no Math.min of the two scales here.
Padding is clamped so a plot area can never be negative: a chart rendered into a container narrower than its own padding collapses to a zero-width plot rather than inverting and drawing itself inside out.
Parameters
| Parameter | Type |
|---|---|
width | number |
height | number |
padding | ChartPadding |