fl_pretty_charts 2.3.0 copy "fl_pretty_charts: ^2.3.0" to clipboard
fl_pretty_charts: ^2.3.0 copied to clipboard

A beautiful, animated Flutter charts package. Includes Bar, Line, Pie/Donut, and Radar charts. Zero dependencies — pure Flutter custom painter.

Changelog #

All notable changes to fl_pretty_charts will be documented here. This project follows Semantic Versioning.


2.3.0 #

Added #

  • 📐 FlResponsiveChart — wrapper that adapts any chart to screen size
    • small / medium / large breakpoint configs
    • builder callback receives resolved ResponsiveChartConfig
    • debugLabel mode prints resolved breakpoint during development
  • 📱 ChartBreakpoints — configurable width thresholds
    • Default: small < 360px, medium < 600px, large ≥ 600px
    • Fully customizable via smallMaxWidth and mediumMaxWidth
  • ⚙️ ResponsiveChartConfig — per-breakpoint chart configuration
    • height — chart height at this breakpoint
    • padding — chart padding at this breakpoint
    • yAxisDivisions — fewer grid divisions on small screens
    • showGrid — hide grid on very small screens
    • labelFontSize — smaller labels on compact screens
    • showDots — hide dots on small screens for clarity
  • 🔌 ResponsiveChartConfigX extension — resolve helpers with fallbacks
    • resolveHeight(), resolvePadding(), resolveYAxisDivisions()
    • resolveShowGrid(), resolveLabelFontSize(), resolveShowDots()
  • 🏗️ FlResponsiveBarChart — pre-configured responsive bar chart wrapper
  • Works with all chart types via the builder pattern
  • Zero new dependencies

Use Cases Solved #

  • Charts that look great on phones AND tablets AND desktop
  • Automatic label density reduction on small screens
  • No more manual MediaQuery boilerplate per chart

2.2.0 #

Added #

  • 📸 ChartExporter — export any chart to PNG image
    • ChartExporter.toBytes(key) — capture chart as Uint8List
    • ChartExporter.toImage(key) — capture chart as ui.Image
    • ChartExporter.showPreview(context, key) — show preview dialog
    • Configurable pixelRatio for high-DPI output (default 3.0)
    • Configurable backgroundColor for export background
  • 🖼️ ExportableChart — wrapper widget with built-in export button
    • Wraps any chart with RepaintBoundary automatically
    • Built-in export button overlay (top-right, configurable alignment)
    • Loading state during export with CircularProgressIndicator
    • onExported callback for custom save/share logic
    • showExportButton toggle
    • Preview dialog shows image size in KB
    • Works on Android, iOS, Web, Desktop
    • Zero new dependencies — uses Flutter's built-in rendering pipeline

Use Cases Solved #

  • Save chart as PNG to device gallery
  • Share chart image via native share sheet
  • Upload chart to server as image
  • Embed chart in PDF report
  • Screenshot chart for presentations

2.1.0 #

Added #

  • 🎯 ChartAnnotation — reference lines drawn on top of charts
    • ChartAnnotation.horizontal(value:) — y-axis reference line
    • ChartAnnotation.vertical(index:) — x-axis reference line
    • Optional label with background pill styling
    • Configurable dash pattern, stroke width, color, label position
    • Three label positions: start, center, end
  • AnnotationPainter — internal utility for drawing annotations
  • AnnotationAxis — enum for horizontal/vertical axis
  • AnnotationLabelPosition — enum for label placement
  • Annotations supported on:
    • FlBarChart via annotations parameter
    • FlLineChart via annotations parameter
    • FlAreaChart via annotations parameter
  • Annotations animate in with the chart reveal
  • Solid or dashed lines via dashPattern config

Use Cases Solved #

  • Mark target values ("Target: 80")
  • Show averages ("Avg: 55")
  • Mark thresholds ("Max capacity")
  • Mark events ("Product launch", "Sale started")

2.0.0 — Live Charts 🔴 #

Added #

  • 🔴 FlLiveBarChart — real-time bar chart with smooth tween transitions
    • Tweens from old values to new values on each data update
    • Supports LiveDataController<List<BarData>>
    • Full BarStyle, AxisStyle, ChartTheme support
  • 📡 FlLiveLineChart — scrolling live line chart with rolling window
    • Single-series via FlLiveLineChart(controller:...)
    • Multi-series via FlLiveLineChart.multi(controller:...)
    • Rolling window — keeps last N points, slides old ones out
    • "Waiting for data..." placeholder before first emission
  • 📉 FlLiveAreaChart — real-time area chart with rolling window
    • Single-series via FlLiveAreaChart(controller:...)
    • Multi-series via FlLiveAreaChart.multi(controller:...)
    • Rolling window with smooth bezier curve updates
  • 🎛️ LiveDataController<T> — generic data controller
    • add(data) / update(data) — push new data
    • pause() / resume() / togglePause() — playback control
    • stream setter — attach external Stream<T> as data source
    • lastValue — seed new listeners with latest data
    • Auto-disposes cleanly
  • ⏱️ LiveTicker — periodic timer helper for demos and testing
  • 🔀 LiveChartMixin — reusable stream subscription lifecycle mixin
  • Example app updated with Live Charts tab
    • Play/pause controls
    • Speed selector (slow/normal/fast)
    • Reset button
    • Single line, multi-line, area, and bar live demos

Breaking Changes #

  • None — all existing chart widgets unchanged

1.3.0 #

Added #

  • 📉 FlAreaChart — animated area chart widget
  • AreaChartData — main data model with series and style config
  • AreaSeries — single area series with points, label, and style
  • AreaPoint — individual data point with x, y, and label
  • AreaSeriesStyle — stroke, fill opacity, gradient, dots, smooth toggle
  • AreaAxisStyle — grid and axis configuration
  • AreaTooltipStyle — tooltip appearance configuration
  • Stacked mode — areas stack on top of each other via stacked: true
  • Smooth bezier curves between data points
  • Gradient area fill — top-to-bottom per series color
  • Custom fill gradient via AreaSeriesStyle.fillGradient
  • Animated left-to-right reveal
  • Dot indicators at each data point with tap highlight
  • Multi-series support with tap-to-highlight
  • Legend shown automatically for multi-series charts
  • ChartTheme support via theme parameter
  • Full dartdoc on all public APIs

1.2.1 #

Added #

Fixed #

  • Added netlify.toml to prevent Dart files being treated as serverless functions

1.2.0 #

Added #

  • 📊 FlStackedBarChart — animated stacked bar chart widget
  • StackedBarChartData — main data model with groups and series
  • StackedBarSeries — single series with label, color, and values
  • StackedBarStyle — border radius and bar width fraction
  • StackedAxisStyle — grid lines, y-axis divisions, label style
  • StackedTooltipStyle — tooltip appearance configuration
  • Percentage mode — normalize each bar to 100% via percentageMode: true
  • Tap-to-highlight individual segments with glow effect
  • Tooltip shows series label + value or percentage
  • ChartTheme support via theme parameter
  • Built-in LegendWidget below chart via showLegend: true
  • Smart rounding — only topmost segment gets rounded corners
  • Full dartdoc on all public APIs

1.1.0 #

Added #

  • ↔️ FlHorizontalBarChart — animated horizontal bar chart widget
  • Bars grow left to right with smooth animation
  • Reuses all existing BarChartData models — zero new data classes needed
  • Gradient support via BarStyle.gradient (use centerLeftcenterRight)
  • Per-bar color override via BarData.color
  • Tap-to-tooltip interaction on each bar
  • ChartTheme support via theme parameter
  • Y-axis category labels on the left
  • Vertical grid lines with configurable divisions and opacity
  • 📸 Added chart screenshots to README

1.0.0 — Stable Release 🎉 #

Added #

  • 🎨 ChartTheme integration across all 4 chart widgets
    • FlBarChart(theme: ChartTheme.ocean()) — overrides bar color
    • FlLineChart(theme: ChartTheme.sunset()) — overrides line series colors
    • FlPieChart(theme: ChartTheme.forest()) — overrides segment colors
    • FlRadarChart(theme: ChartTheme.defaultTheme()) — overrides dataset colors
  • 🏷️ LegendWidget — standalone reusable legend widget
    • LegendItem — single color + label item
    • Configurable dot size, spacing, alignment, shape
    • Per-item text style override
  • All 4 chart types stable and production ready
  • Full backward compatibility — no breaking changes

Charts Included #

  • FlBarChart — animated bar chart with tap tooltips
  • FlLineChart — smooth bezier line chart, multi-line
  • FlPieChart — animated pie and donut chart
  • FlRadarChart — radar/spider chart, multi-dataset

0.9.0 #

Added #

  • 🕸️ FlRadarChart — animated radar/spider chart widget
  • RadarChartData — main data model with labels, datasets, and style config
  • RadarDataset — single data series with values, label, and style
  • RadarDatasetStyle — stroke, fill opacity, dot radius configuration
  • RadarGridStyle — concentric polygon grid, spoke lines, axis labels
  • RadarLegendStyle — legend with dot size and spacing config
  • Multi-dataset support — overlay multiple series on one chart
  • Animated polygon reveal from center outward
  • Concentric polygon grid rings with configurable levels
  • Axis spoke lines from center to each label
  • Axis labels with smart quadrant-based nudging
  • Tap-to-highlight datasets with opacity fade on others
  • Legend tap to highlight/deselect datasets
  • Dot indicators at each data point
  • Full dartdoc on all public APIs

0.5.0 #

Added #

  • 🥧 FlPieChart — animated pie and donut chart widget
  • PieChartData — main data model with full style configuration
  • PieSegment — single segment with value, label, color, optional gradient
  • LegendStyle — configurable legend with position, dot size, spacing
  • CenterLabelStyle — title + value label for donut center
  • PieTooltipStyle — tooltip appearance configuration
  • Donut variant via PieChartData.donut = true
  • Configurable inner radius via donutRadius
  • Tap-to-expand segments with glow highlight effect
  • Legend tap to highlight/deselect segments
  • Animated opacity on unselected legend items
  • Percentage display in legend labels
  • Configurable segment gap and start angle
  • Full dartdoc on all public APIs

0.1.2 #

Fixed #

  • Replaced withOpacity() with withValues() for Flutter 3.27+ compatibility
  • Switched CI analyze flag from --fatal-infos to --fatal-warnings
  • Bumped Flutter version in all CI/CD workflows to 3.27.0

0.1.1 #

Fixed #

  • Improved CI/CD pipeline with pub-credentials.json based publishing
  • Updated publish workflow for more reliable pub.dev deployment

0.1.0 #

Added #

  • 📈 FlLineChart — animated line chart widget with left-to-right draw
  • LineChartData — main data model for line charts
  • LineData — single line series with points and style config
  • LinePoint — individual data point with x, y, and label
  • LineStyle — stroke width, color, gradient, fill, dots, smooth toggle
  • AxisLineStyle — grid and axis config for line charts
  • LineTooltipStyle — tooltip appearance for line charts
  • Smooth bezier curves between data points
  • Gradient area fill below each line
  • Animated left-to-right line draw
  • Dot indicators at each data point with tap highlight
  • Multi-line support — render multiple series on one chart
  • Tap-to-tooltip interaction on data points

0.0.1 #

Added #

  • 📊 FlBarChart — animated bar chart widget
  • BarChartData — main data model with full style configuration
  • BarData — single bar model with value, label, optional color override
  • BarStyle — border radius, width fraction, gradient support
  • AxisStyle — grid lines, y-axis divisions, label text style
  • TooltipStyle — tap tooltip appearance configuration
  • ChartAnimation — animation config with 4 presets:
    • elegant() — 1200ms easeOutCubic
    • snappy() — 400ms easeOutBack
    • bouncy() — 800ms elasticOut
    • none() — instant render
  • ChartTheme — 4 built-in color palettes:
    • defaultTheme() — indigo, teal, amber, orange, purple
    • ocean() — cool blue-green palette
    • sunset() — warm reds and oranges
    • forest() — nature-inspired greens
  • ChartUtils — shared drawing utilities (niceMax, valueToY, formatValue)
  • ChartAnimationMixin — reusable animation lifecycle mixin
  • Zero external dependencies — pure Flutter CustomPainter
  • Full dartdoc documentation on all public APIs
  • Full test suite — 27 tests passing
  • Example app demonstrating all bar chart configurations
2
likes
160
points
773
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A beautiful, animated Flutter charts package. Includes Bar, Line, Pie/Donut, and Radar charts. Zero dependencies — pure Flutter custom painter.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on fl_pretty_charts