visibleSegmentAt method

  1. @override
ChartSegment? visibleSegmentAt(
  1. Offset position
)
inherited

Implementation

@override
ChartSegment? visibleSegmentAt(Offset position) {
  if (segments.isEmpty) {
    return null;
  }

  final ChartSegment segment = segments[0];
  if (segment.contains(position)) {
    return segment;
  }

  return null;
}