flutter_circular_chart
flutter_circular_chart copied to clipboard
Cannot customize radial chart stroke width
There are no params for that. And all I do for now it hard code the stroke width...
void _paintChart(Canvas canvas, Size size, CircularChart chart) {
final Paint segmentPaint = new Paint()
..style = chart.chartType == CircularChartType.Radial
? PaintingStyle.stroke
: PaintingStyle.fill
..strokeCap = chart.edgeStyle == SegmentEdgeStyle.round
? StrokeCap.round
: StrokeCap.butt;
for (final CircularChartStack stack in chart.stacks) {
for (final segment in stack.segments) {
segmentPaint.color = segment.color;
segmentPaint.strokeWidth = 3;//stack.width;
canvas.drawArc(
new Rect.fromCircle(
center: new Offset(size.width / 2, size.height / 2),
radius: stack.radius,
),
stack.startAngle * _kRadiansPerDegree,
segment.sweepAngle * _kRadiansPerDegree,
chart.chartType == CircularChartType.Pie,
segmentPaint,
);
}
}
}
Please consider supporting the customize radial chart stroke width with new features
I love the animation. I wish the "radial chart stroke width" would be included.
Can you do that?
Thank you very much, BR, Adrian