drawDataMarker method

void drawDataMarker(
  1. int index,
  2. Canvas canvas,
  3. Paint fillPaint,
  4. Paint strokePaint,
  5. Offset point,
  6. Size size,
  7. DataMarkerType type, [
  8. CartesianSeriesRenderer<T, D>? seriesRenderer,
])

Implementation

void drawDataMarker(
  int index,
  Canvas canvas,
  Paint fillPaint,
  Paint strokePaint,
  Offset point,
  Size size,
  DataMarkerType type, [
  CartesianSeriesRenderer<T, D>? seriesRenderer,
]) {
  if (point.isNaN) {
    return;
  }

  if (type == DataMarkerType.image) {
    if (_markerImage != null) {
      paintImage(canvas: canvas, rect: point & size, image: _markerImage!);
    }
  } else if (type != DataMarkerType.none) {
    paint(
      canvas: canvas,
      rect: point & size,
      shapeType: toShapeMarkerType(type),
      paint: fillPaint,
      borderPaint: strokePaint,
    );
  }
}