tp_donut_chart 0.0.2
tp_donut_chart: ^0.0.2 copied to clipboard
Um widget de gráfico donut personalizável para Flutter.
TP Donut Chart #
A customizable donut chart widget for Flutter.
Installation #
Add it to yours pubspec.yaml:
tp_donut_chart:
git:
url: https://github.com/pradoui/tp_donut_chart.git
How to use #
import 'package:tp_donut_chart/tp_donut_chart.dart';
TPDonutChart(
entries: [
DonutChartEntry(label: 'Robert', value: 167, color: Colors.green),
DonutChartEntry(label: 'John', value: 100, color: Colors.blue),
DonutChartEntry(label: 'Thiago', value: 50),
],
size: 200,
strokeWidth: 24,
gap: 32,
subtitleText: 'Message Count',
subtitleTextStyle: TextStyle(
color: Colors.orange,
fontSize: 16,
),
)
Parameters #
entries: List of DonutChartEntry (label, value, color optional)colors: Standard palette for bars without defined colorsize: Size of the chartstrokeWidth: Thickness of the barsgap: Space between bars (in pixels)subtitleText: Text below the central valuesubtitleTextStyle: Text style of the text below the central valuecenterTextColor: Color of central texttooltipColor: Tooltip background colortooltipTextColor: Tooltip text colortextStyle: Style applied to all widget texts
License #
MIT