charty

RadarChart#

Best for displaying a single entity's performance across multiple axes (spider chart / star chart).

RadarChart

Kotlin
RadarChart(    data = {        listOf(            RadarDataSet(                label = "Team Alpha",                axes = listOf(                    RadarAxisData(label = "Attack",  value = 85f),                    RadarAxisData(label = "Defense", value = 70f),                    RadarAxisData(label = "Speed",   value = 90f),                    RadarAxisData(label = "Stamina", value = 65f),                    RadarAxisData(label = "Skill",   value = 80f),                ),                color = ChartyColor.Solid(Color(0xFF6650A4)),            ),        )    },    modifier = Modifier.size(300.dp),    config = RadarChartConfig(animation = Animation.Default),    onAxisClick = { axis, index -> println("Tapped ${axis.label} (index $index)") },    accessibilityDescription = "Team Alpha radar chart showing performance across five metrics",)

RadarDataSet.color is required — there is no automatic palette assignment. RadarDataSet also requires a non-blank label and at least three axes; fewer throws at construction. fillAlpha (default 0.3f) controls how solid the polygon fill is.

Normalization#

Each RadarAxisData normalizes itself as value / maxValue, clamped to 0f..1f. maxValue defaults to 100f per axis — it is not derived from the other axes or from the data set. Give an axis its own maxValue when it uses a different scale:

Kotlin
axes = listOf(    RadarAxisData(label = "Accuracy", value = 0.92f, maxValue = 1f),    RadarAxisData(label = "Volume",   value = 4200f, maxValue = 5000f),)

value must be non-negative and maxValue positive.

Grid#

Kotlin
config = RadarChartConfig(    gridConfig = RadarGridConfig(        gridStyle = RadarGridStyle.CIRCULAR,        numberOfGridLevels = 4,        gridLineColor = ChartyColor.Solid(Color(0xFFBDBDBD)),        axisLineColor = ChartyColor.Solid(Color(0xFF9E9E9E)),    ),)

Labels#

Kotlin
config = RadarChartConfig(    labelConfig = RadarLabelConfig(        showLabels = true,        showValues = true,        labelDistanceMultiplier = 1.2f,    ),)

Accessibility#

The chart attaches a generated summary ("Radar chart, 1 dataset, 5 axes each. Strongest axis: Speed (80%)."). Override it with accessibilityDescription, or pass an empty string to suppress it.

RadarChartConfig#

PropertyTypeDefaultDescription
dataLineWidthFloat2fPolygon outline width; must be positive
showDataPointsBooleantrueDraws a dot at each axis vertex
dataPointRadiusFloat4fRadius of those dots; non-negative
strokeCapStrokeCapStrokeCap.RoundCap of the polygon outline
strokeJoinStrokeJoinStrokeJoin.RoundJoin of the polygon outline
startAngleDegreesFloat-90fAngle of the first axis (12 o'clock)
labelConfigRadarLabelConfigRadarLabelConfig()Axis label and value display
gridConfigRadarGridConfigRadarGridConfig()Grid and axis lines
centerConfigRadarCenterConfigRadarCenterConfig()Optional centre icon and backdrop
animationAnimationAnimation.DefaultGrow-from-centre entry animation
scaleToFitBooleantrueShrinks the radar so labels stay inside the bounds
paddingFractionFloat0.15fPadding around the radar; 0f..0.5f

RadarLabelConfig#

PropertyTypeDefault
showLabelsBooleantrue
showValuesBooleanfalse
labelDistanceMultiplierFloat1.15f (must be positive)
labelTextStyleTextStyle12 sp, black
valueTextStyleTextStyle10 sp, black

RadarGridConfig#

PropertyTypeDefault
gridStyleRadarGridStylePOLYGON (or CIRCULAR)
numberOfGridLevelsInt5 (must be positive)
showGridLinesBooleantrue
showAxisLinesBooleantrue
gridLineWidthFloat1f (must be positive)
axisLineWidthFloat1f (must be positive)
gridLineColorChartyColorSolid(#BDBDBD at 50% alpha)
axisLineColorChartyColorSolid(#9E9E9E at 60% alpha)
gridLineAlphaFloat0.5f (0f..1f)

RadarCenterConfig#

PropertyTypeDefault
showCenterIconBooleanfalse
centerIconSizeFloat40f (must be positive)
centerBackgroundColorChartyColorChartyColor.Solid(Color.Transparent)
centerBackgroundRadiusFloat0f (non-negative)

Limitations#