useChartLayout

Deprecated:

this hook mixes cartesian and polar layouts together; prefer to use useCartesianChartLayout and usePolarChartLayout instead, which give you better type safety.

Returns the chart layout as configured by the chart.

Cartesian charts use horizontal or vertical. Polar charts use centric or radial.

Returns undefined if used outside a chart context.

Return value

(union of 5 variants)

The chart layout, or undefined if not in a chart context.