Skip to content

Area Chart ​

Filled areas, optionally stacked or with a gradient fill.

Usage ​

Approximate web preview — the HarmonyOS rendering is the reference.

Stacked ​

Approximate web preview — the HarmonyOS rendering is the reference.

Gradient ​

Approximate web preview — the HarmonyOS rendering is the reference.

Axes ​

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

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

SAreaChart ​

shadcn "Area Chart": filled areas (optionally stacked, gradient fill).

PropTypeDefaultDescription
configSparkChartConfignew SparkChartConfig([])
dataSparkChartRow[][]
chartHeightnumber0
curveSparkChartCurve
SparkChartCurve = 'linear' | 'monotone' | 'step'
'monotone'
stackedbooleanfalse
gradientbooleanfalsevertical gradient fill instead of a flat areaOpacity fill
areaOpacitynumber0.4
dotsbooleanfalse
lineWidthnumber2
gridbooleantrue
categoryAxisbooleantrue
valueAxisbooleanfalse
tooltipbooleantrue
legendbooleanfalse
indicatorSparkChartIndicator
SparkChartIndicator = 'dot' | 'line' | 'dashed'
'dot'
labelFormatter(label: string) => stringidentityLabel
valueFormatter(value: number) => stringdefaultValue
emptyTextResourceStr$r('app.string.spark_no_data')
EventTypeDefaultDescription
onActiveChange(index: number) => void() => { }

MIT Licensed