calculateSegmentPoints method

  1. @override
void calculateSegmentPoints ()
override

Calculates the rendering bounds of a segment.

Implementation

@override
void calculateSegmentPoints() {
  final BarSeries<dynamic, dynamic> barSeries = series;
  _borderRadius = barSeries.borderRadius;
  if (_currentPoint.region != null) {
    segmentRect = RRect.fromRectAndCorners(
      _currentPoint.region,
      bottomLeft: _borderRadius.bottomLeft,
      bottomRight: _borderRadius.bottomRight,
      topLeft: _borderRadius.topLeft,
      topRight: _borderRadius.topRight,
    );
    //Tracker rect
    if (barSeries.isTrackVisible) {
      _trackBarRect = RRect.fromRectAndCorners(
        _currentPoint.trackerRectRegion,
        bottomLeft: _borderRadius.bottomLeft,
        bottomRight: _borderRadius.bottomRight,
        topLeft: _borderRadius.topLeft,
        topRight: _borderRadius.topRight,
      );
    }
  }
}