Area Chart - Keep React
Table of Contents#
- Default Area Chart
- Area Chart With Double Series
- Area Chart With GridLine and GraphLine
- Natural type Area Chart
- API Reference
- Reference
Default Area Chart#
The AreaChart component is used to render an area chart based on the "price" data. This creates a visual representation of how the "price" values change over the "name" categories.
Area Chart With Double Series#
The AreaChart component now uses both "price" and "sell" data for the two series. This creates a chart that shows how both "price" and "sell" values change over the "name" categories, providing insights into both series simultaneously.
Area Chart With GridLine and GraphLine#
The showGridLine, showXaxis, and showYaxis props to the AreaChart component props enable grid lines and axis lines, making the chart more organized and easier to interpret.
Natural type Area Chart#
The chartType prop is set to "natural" for the AreaChart component. This chart type emphasizes smooth curves in the lines, giving the chart a more organic and visually appealing appearance.
API Reference#
Explore the available props for the Area Chart component
| Property | Description | Type | Default |
|---|---|---|---|
| showTooltip | Determines whether tooltips are displayed on data points. | boolean | false |
| showGridLine | Specifies whether grid lines are displayed in the chart. | boolean | false |
| chartType | Specifies the type of curve used for the area chart. | natural linear | linear |
| showXaxis | Determines whether the X-axis is displayed. | boolean | false |
| showYaxis | Determines whether the Y-axis is displayed. | boolean | false |
| dataKey | Key for the main data series in the chart. | string | price |
| secondaryDataKey | Key for a secondary data series in the chart. | string | sell |
| XAxisDataKey | Key for X-axis data in the chart data array. | string | None |
| YAxisDataKey | Key for Y-axis data in the chart data array. | string | None |
| chartData | Array of data points used to populate the chart. | Array | Array |
Reference#
To learn more about the area chart, please see the documentation of Recharts