The Chart renderer component. Loads different chart types based on the type prop using dynamic imports. Powered by Recharts.

Parameters:
NameTypeDescription
propsobject

The component and renderer props.

Properties
NameTypeDescription
animationDurationnumber

The duration of the reveal animation in milliseconds.

areaPropsobject

The props to pass to each Area (can also override the presets we use). Check Recharts docs for all available.

cartesianGridPropsobject

The props to pass to the CartesianGrid (can also override the presets we use). Check Recharts docs for all available.

checkboxPropsobject

The props to pass to each Checkbox. Check our docs for all available.

childrennode

Any additional content to display below the chart.

cursorColorstring

The color of the cursor line in the chart that appears when the tooltip is hovered.

customAttributesobject

Custom attributes to apply to the chart wrapper.

customClassesstring | array | object

Custom classes to apply to the chart wrapper.

dataarray

The data to display in the chart. Check Recharts docs for formats.

gridColorstring

The color of the grid lines and the x and y axis.

heightnumber | string

The height of the chart.

legendPropsobject

The props to pass to the Legend (can also override the presets we use). Check Recharts docs for all available.

optionsarray

The options to display as checkboxes to toggle the visibility of each data set.

showCheckboxesboolean

Whether to show the checkboxes to toggle the visibility of each data set.

showLegendboolean

Whether to show the legend.

tooltipPropsobject

The props to pass to the Tooltip (can also override the presets we use). Check Recharts docs for all available.

typestring

The type of chart to render.

widthnumber | string

The width of the chart.

xAxisPropsobject

The props to pass to the XAxis (can also override the presets we use). Check Recharts docs for all available.

yAxisPropsobject

The props to pass to the YAxis (can also override the presets we use). Check Recharts docs for all available.

refobject

The reference to the chart component.

Since
  • 4.4.5
Returns:

The Chart component.

Type: 
JSX.Element | null