calculateSegmentPoints method
Calculates the rendering bounds of a segment.
Implementation
@override
void calculateSegmentPoints() {
_setSegmentProperties();
_boxAndWhiskerSeries =
_segmentProperties.series as BoxAndWhiskerSeries<dynamic, dynamic>;
_segmentProperties.x = _segmentProperties.max = double.nan;
_isTransposed =
SeriesHelper.getSeriesRendererDetails(_segmentProperties.seriesRenderer)
.stateProperties
.requireInvertedAxis;
_segmentProperties.minPoint =
_segmentProperties.currentPoint!.minimumPoint!;
_segmentProperties.maxPoint =
_segmentProperties.currentPoint!.maximumPoint!;
_centerMinPoint = _segmentProperties.currentPoint!.centerMinimumPoint!;
_centerMaxPoint = _segmentProperties.currentPoint!.centerMaximumPoint!;
_segmentProperties.x = _segmentProperties.minPoint.x;
_segmentProperties.min = _segmentProperties.minPoint.y;
_segmentProperties.max = _segmentProperties.maxPoint.y;
_centerMax = _centerMaxPoint.x;
_maxY = _centerMaxPoint.y;
_centerMin = _centerMinPoint.x;
_minY = _centerMinPoint.y;
_segmentProperties.lowerX =
_segmentProperties.currentPoint!.lowerQuartilePoint!.x;
_lowerY = _segmentProperties.currentPoint!.lowerQuartilePoint!.y;
_segmentProperties.upperX =
_segmentProperties.currentPoint!.upperQuartilePoint!.x;
_upperY = _segmentProperties.currentPoint!.upperQuartilePoint!.y;
_medianX = _segmentProperties.currentPoint!.medianPoint!.x;
_medianY = _segmentProperties.currentPoint!.medianPoint!.y;
_centersY = (_lowerY > _upperY)
? (_upperY + ((_upperY - _lowerY).abs() / 2))
: (_lowerY + ((_lowerY - _upperY).abs() / 2));
_segmentProperties.topRectY = _centersY - ((_centersY - _upperY).abs() * 1);
_segmentProperties.bottomRectY =
_centersY + ((_centersY - _lowerY).abs() * 1);
}