TAM Chart

Pub Version License

A customizable charting package for Flutter, supporting all platforms.

A powerful and easy-to-use Flutter library for creating and displaying animated charts representing Total Addressable Market (TAM) data.

✨ Features

  • 🎯 Animated Charts: Smooth drawing animations with customizable duration.
  • 🎨 Style Customization: Customize colors and text styles for each circle to match your app's theme.
  • 🧭 Directional Animation Support: Circle drawing animation now respects the somPosition and direction values. For example, if somPosition is set to top, the animation begins and ends at the top. If it’s left, it starts and ends from the left.
  • πŸ“Flexible Positioning: Position the SOM circle within the chart using predefined positions (top, bottom, left, right, center).
  • πŸ”’ Readable Numeric Values: Large numbers are auto-formatted (e.g. 1500 β†’ 1.5K, 1500000 β†’ 1.5M).
  • πŸ’Ύ Chart Export (NEW): Easily export the chart as a PNG image and save it to disk or download in the browser
  • Easy Integration: Seamlessly integrate the package into your Flutter project with minimal setup.

Installing

dependencies:
  tam_chart: ^1.1.0

πŸ§‘β€πŸ’» Import

import 'package:tam_chart/tam_chart.dart';

πŸš€ How To Use

final chart= TAMChart(
            tamChartData: TAMChartData(
                duration: 16,
                tamTextColor: Colors.brown,
                samTextColor: Colors.white,
                somTextColor: Colors.black,
                tam: 450,
                sam: 13090,
                som: 750978,
                tamColor: Colors.pink,
                samColor: Colors.blue.shade100,
                somColor: Colors.green,
                somPosition: SomPositions.top),
            fontSize: 10,
            size: const Size(200, 200));

πŸ“€ Exporting the Chart (NEW in v1.1.0)

You can now export the TAM Chart as a PNG image programmatically.

final imageBytes = await TAMChartExport.captureAsImage(chartKey);
final path = await TAMChartExport.saveImageToFile(imageBytes);

Showcase

Here is an example screenshot of the TAM Chart in action:

Example Screenshot

Suggestions & Bugs

For any suggestions or bug report please head to issue tracker. If you feel library is missing a feature, pull request are welcome

Authors

Aman Gautam

Abha Agarwal

License

MIT License

Libraries

tam_chart