paint method

  1. @override
void paint(
  1. ChartCanvas canvas,
  2. Rectangle<num> bounds, {
  3. List<int>? dashPattern,
  4. Color? fillColor,
  5. FillPatternType? fillPattern,
  6. Color? strokeColor,
  7. double? strokeWidthPx,
})

Implementation

@override
void paint(ChartCanvas canvas, Rectangle<num> bounds,
    {List<int>? dashPattern,
    Color? fillColor,
    FillPatternType? fillPattern,
    Color? strokeColor,
    double? strokeWidthPx}) {
  final center = Point(
    bounds.left + (bounds.width / 2),
    bounds.top + (bounds.height / 2),
  );
  final radius = min(bounds.width, bounds.height) / 2;
  canvas.drawPoint(
      point: center,
      radius: radius,
      fill: getSolidFillColor(fillColor),
      stroke: strokeColor,
      strokeWidthPx: getSolidStrokeWidthPx(strokeWidthPx));
}