Skip to main content

p5

alt

import 'package:d_chart/d_chart.dart';
import 'package:flutter/material.dart';
List<OrdinalData> ordinalDataList = [
OrdinalData(
domain: 'Completed',
measure: 35,
color: Colors.deepPurple.shade700,
),
OrdinalData(
domain: 'Uncompleted',
measure: 65,
color: Colors.grey.shade300,
),
];
List<OrdinalData> ordinalDataList2 = [
OrdinalData(
domain: 'Completed',
measure: 60,
color: Colors.deepPurple.shade300,
),
OrdinalData(
domain: 'Uncompleted',
measure: 40,
color: Colors.grey.shade300,
),
];
SizedBox(
width: 200,
height: 200,
child: Stack(
fit: StackFit.expand,
children: [
DChartPieO(
data: ordinalDataList,
configRenderPie: const ConfigRenderPie(
arcWidth: 16,
strokeWidthPx: 0,
),
),
Padding(
padding: const EdgeInsets.all(24),
child: DChartPieO(
data: ordinalDataList2,
configRenderPie: const ConfigRenderPie(
arcWidth: 16,
strokeWidthPx: 0,
),
),
),
],
),
),