getMeasureAxis method
Gets the measure axis matching the provided id.
If none is provided, this returns the primary measure axis.
Implementation
NumericAxis getMeasureAxis({String? axisId}) {
NumericAxis? axis;
if (axisId == Axis.secondaryMeasureAxisId) {
axis = _secondaryMeasureAxis;
} else if (axisId == Axis.primaryMeasureAxisId) {
axis = _primaryMeasureAxis;
} else if (axisId != null && _disjointMeasureAxes[axisId] != null) {
axis = _disjointMeasureAxes[axisId];
}
// If no valid axisId was provided, fall back to primary axis.
axis ??= _primaryMeasureAxis;
return axis;
}