Skip to content

AreaChart

A filled area chart: each series is shaded from the bottom of the plot up to its line, in a flat color or a vertical gradient, using block characters so the fill reads as one continuous surface.

See also: LineChart for lines or scatter points.

Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.

AreaChart(
series: <AreaSeries>[
AreaSeries(
points,
label: 'load',
gradient: [cs.success, cs.warning, cs.error],
),
],
showAxes: true,
showLegend: true,
yRange: const (0, 100),
)

AreaChart shares LineChart’s cartesian engine — axes, legend, ranges, grid, references, and the interactive crosshair all behave identically. Reach for LineChart when you want a line or scatter plot instead of a fill; reach for AreaChart when the shaded region is the point.

ParameterTypeDefaultDescription
series:List<AreaSeries>requiredOne or more filled series to plot.
xRange:(num min, num max)?—Visible x range. null autoscales to the data. See LineChart.xRange.
yRange:(num min, num max)?—Visible y range. null autoscales to the data. See LineChart.yRange.
padding:double0.0Extra space around autoscaled data, as a fraction of the range.
showAxes:booltrueDraw min/mid/max labels for both axes.
showGrid:boolfalseDraw faint dotted gridlines at the minimum, middle, and maximum of both axes.
showLegend:boolfalseDraw a one-row legend with a colored bullet and label per series.
yTickCount:int3Number of evenly-spaced y-axis tick labels, including both ends.
palette:List<Color>?—Colors cycled for series that set neither AreaSeries.color nor AreaSeries.gradient.
xTickFormat:TickFormatter?—Formatter for x-axis tick labels and the crosshair tooltip x value.
yTickFormat:TickFormatter?—Formatter for y-axis tick labels and the crosshair tooltip y values.
references:List<ReferenceLine>const []Reference lines for targets or thresholds, drawn over the filled areas.
interactive:boolfalseWhen true, the chart is focusable with an arrow-key crosshair.
autofocus:boolfalseAuto-focus on first mount when interactive is true.
focusNode:FocusNode?—Optional caller-provided focus node for interactive mode.
semanticLabel:String'Area chart'Label exposed through the semantic app graph.

AreaChart is defined in packages/fleury/lib/src/catalog/area_chart.dart.

Category: Charts & meters · All widgets