What it does
nichart draws charts in a Flutter app from very little code. Every styling option has a default, so three lines give you a smooth, themed chart. Deeper customisation is there when you want it, and never required.
Features
- Chart types: line, area, bar (grouped or stacked), scatter, donut and sparkline.
- No required configuration: every styling parameter has a default, including smoothing that never overshoots the data, a hairline grid and an eight-colour palette.
-
Automatic dark mode: gridlines, labels and palettes follow
Theme.of(context). Override a subtree withChartThemeScope, or build a theme from yourColorScheme. - Motion built in: series animate in on first layout, and when the data changes the chart morphs from the old values to the new ones. It respects reduced-motion settings. The screenshots below are stills; the README on pub.dev shows the same charts in motion.
- Interaction: a crosshair and tooltip on every chart, with pan and zoom as an option.
-
Your own models: series accept any element type through
xAccessorandyAccessor. - Large data: long series are downsampled automatically while keeping their shape, and the raw data is left untouched.
- Accessible: each chart composes a label for screen readers, which you can override.
- Pure Dart: no platform channels and no native code.
Install
flutter pub add nichart
Use it
A line chart is one call:
import 'package:nichart/nichart.dart';
Chart.line(data: [DataPoint(0, 2), DataPoint(1, 5), DataPoint(2, 3)])
Compose axes and several series when you need more:
Chart(
axes: const ChartAxes.cartesian(
x: TimeAxis(),
y: NumericAxis(label: 'Users'),
),
series: [
LineSeries(
data: thisWeek,
style: const LineStyle(area: AreaFill.gradient()),
),
LineSeries(
data: lastWeek,
style: const LineStyle.context(), // muted, dashed comparison series
),
],
)
Bars, donuts and sparklines are just as short:
Chart(series: [BarSeries(data: weekCounts)])
DonutChart(data: shares, center: Text('84%'))
Sparkline(data: last30Days)
The full API is documented on pub.dev.


