createVerticalChart

Creates a typed context for vertical Cartesian charts.

Motivation:Recharts components fall back to any by default. While explicit typing using Generics (e.g. <Area<MyDataType, number>>) works per-component, it becomes tedious and error-prone across an entire chart.

This Chart Helper allows you to perfectly align your data properties and ensure all your charts, axes, and lines work in harmony. Once you define the helper with your generic requirements, all returned components strictly enforce your data structure, catching dataKey typos and shape errors early.

Layout Binding:Curries the chart definition to statically bind the layout="vertical" property at the component level. By stripping layout from the configuration options of generated wrapper components, developers avoid accidentally overriding chart alignments. Natively supports strictly vertical components like Funnel and FunnelChart.

Available since Recharts 3.8

Return value

Function