Skip to content

Radial Chart ​

Concentric radial bars with an optional track and centre label.

Usage ​

Approximate web preview — the HarmonyOS rendering is the reference.

Text ​

Approximate web preview — the HarmonyOS rendering is the reference.

Shape ​

Partial sweep, square ends, no track.

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

Extracted from the @Param / @Event / @BuilderParam declarations in the library sources.

SRadialChart ​

shadcn "Radial Chart": one concentric bar per data row (first row innermost; row label = key in config), its sweep proportional to valueKey / maxValue between startAngle and endAngle (degrees, 0 = 12 o'clock, clockwise). Optional muted track, rounded ends and a centre label. Bars sweep in on appear.

PropTypeDefaultDescription
configSparkChartConfignew SparkChartConfig([])
dataSparkChartRow[][]
valueKeystring'value'
startAnglenumber0
endAnglenumber360
maxValuenumber0value that fills a whole ring; 0 → the largest value
innerRationumber0.3inner radius as a fraction of the outer radius
ringGapnumber4gap between rings in vp
trackbooleantrue
roundedbooleantrue
chartHeightnumber250
centerValuestring''
centerLabelstring''
tooltipbooleantrue
legendbooleanfalse
indicatorSparkChartIndicator
SparkChartIndicator = 'dot' | 'line' | 'dashed'
'dot'
valueFormatter(value: number) => stringdefaultValue
emptyTextResourceStr$r('app.string.spark_no_data')
EventTypeDefaultDescription
onActiveChange(index: number) => void() => { }

MIT Licensed