flutter_mini_chart 1.0.0 copy "flutter_mini_chart: ^1.0.0" to clipboard
flutter_mini_chart: ^1.0.0 copied to clipboard

Lightweight, animated, interactive charts for Flutter. Bar, pie, doughnut charts with zero dependencies.

flutter_mini_chart #

Lightweight, animated, interactive charts for Flutter. Zero external dependencies.

Charts #

  • MiniBarChart - Vertical bar chart with axis, grid lines, data labels
  • MiniPieChart - Pie chart and doughnut chart (via innerRadius)

Features #

  • CustomPainter-based rendering
  • Entry animation (bars grow, pie sweeps)
  • Hover highlight and tap callbacks
  • Tooltip overlay (customizable via builder)
  • Legend with toggle support
  • 3-level theming: per-widget style > MiniChartTheme > Theme.of(context)

Usage #

import 'package:flutter_mini_chart/flutter_mini_chart.dart';

// Bar chart
MiniBarChart(
  data: [
    BarData(label: 'Jan', value: 30),
    BarData(label: 'Feb', value: 50),
    BarData(label: 'Mar', value: 20),
  ],
  style: BarChartStyle(showDataLabels: true),
  legend: ChartLegend(position: LegendPosition.bottom),
  onBarTap: (index, data) => print('${data.label}: ${data.value}'),
)

// Pie chart
MiniPieChart(
  data: [
    PieData(label: 'A', value: 35),
    PieData(label: 'B', value: 25),
    PieData(label: 'C', value: 40),
  ],
  legend: ChartLegend(position: LegendPosition.bottom),
  onSliceTap: (index, data) => print('${data.label}: ${data.value}'),
)

// Doughnut chart
MiniPieChart(
  data: [
    PieData(label: 'Online', value: 75),
    PieData(label: 'Offline', value: 25),
  ],
  style: PieChartStyle(innerRadius: 60),
)

Theming #

Three levels of theme resolution (highest priority first):

  1. Per-widget style: parameter
  2. MiniChartTheme InheritedWidget wrapping a subtree
  3. Theme.of(context) automatic fallback
// Scope a palette to a subtree
MiniChartTheme(
  data: MiniChartThemeData(
    palette: [Colors.blue, Colors.green, Colors.orange],
    animationDuration: Duration(milliseconds: 800),
  ),
  child: MiniBarChart(data: myData),
)

Installation #

dependencies:
  flutter_mini_chart: ^1.0.0

License #

MIT

2
likes
150
points
110
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Lightweight, animated, interactive charts for Flutter. Bar, pie, doughnut charts with zero dependencies.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_mini_chart