Skip to content

ChartRadar

The ChartRadar component displays data as a radar chart with customizable styling, tooltips, and legends. Built with ApexCharts.

import { ChartRadar } from '@fintech-sandpit/ui/react';
const data = [
{ name: 'Speed', productA: 85, productB: 70 },
{ name: 'Reliability', productA: 90, productB: 75 },
{ name: 'Comfort', productA: 75, productB: 80 },
];
const series = [
{ name: 'Product A', dataKey: 'productA' },
{ name: 'Product B', dataKey: 'productB' },
];
return (
<ChartRadar
data={data}
series={series}
height="400px"
showTooltip={true}
showLegend={true}
/>
);
NameTypeDefaultDescription
dataChartRadarDataItem[]Array of data objects where each object represents a data point with name and multiple value properties
seriesArray<{ name: string; dataKey: string }>Array of series objects defining which data keys to display as radar lines
widthCssUnit'100%'Width of the chart container (CSS unit string like ‘100%’, ‘400px’, ‘50rem’)
heightCssUnit'400px'Height of the chart container (CSS unit string like ‘400px’, ‘50vh’)
legendPositionLegendPosition'bottom'Position of the legend
showTooltipbooleantrueWhether to display tooltips on hover
showLegendbooleantrueWhether to display the legend
colorsstring[]Array of colors for the chart lines
type CssUnit = `${number}${'px' | 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | '%'}`
type LegendPosition = 'top' | 'bottom' | 'left' | 'right'
type ChartRadarDataItem = {
name: string;
[key: string]: string | number;
}