TAM Chart
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
anddirection
values. For example, ifsomPosition
is set totop
, the animation begins and ends at the top. If itβsleft
, 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:
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
|
|
License
MIT License