commit
b9496c6ada
@ -41,6 +41,8 @@ import 'package:flutter_circular_chart/flutter_circular_chart.dart';
|
|||||||
Create chart data entry objects:
|
Create chart data entry objects:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
final GlobalKey<AnimatedCircularChartState> _chartKey;
|
||||||
|
|
||||||
List<CircularStackEntry> data = <CircularStackEntry>[
|
List<CircularStackEntry> data = <CircularStackEntry>[
|
||||||
new CircularStackEntry(
|
new CircularStackEntry(
|
||||||
<CircularSegmentEntry>[
|
<CircularSegmentEntry>[
|
||||||
@ -53,7 +55,6 @@ List<CircularStackEntry> data = <CircularStackEntry>[
|
|||||||
),
|
),
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
Create an `AnimatedCircularChart`:
|
Create an `AnimatedCircularChart`:
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -61,7 +62,7 @@ Create an `AnimatedCircularChart`:
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return new AnimatedCircularChart(
|
return new AnimatedCircularChart(
|
||||||
key: _chartKey,
|
key: _chartKey,
|
||||||
size: const Size(300, 300),
|
size: const Size(300.0, 300.0),
|
||||||
initialChartData: data,
|
initialChartData: data,
|
||||||
chartType: CircularChartType.Pie,
|
chartType: CircularChartType.Pie,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user