getAxisLabelAngle method Null safety

  1. @override
int getAxisLabelAngle(
  1. ChartAxisRenderer axisRenderer,
  2. String text,
  3. int labelIndex
)

It returns the axis label angle

Implementation

@override
int getAxisLabelAngle(
        ChartAxisRenderer axisRenderer, String text, int labelIndex) =>
    (axisRenderer._axis.labelIntersectAction ==
                AxisLabelIntersectAction.rotate45 &&
            axisRenderer._isCollide)
        ? -45
        : (axisRenderer._axis.labelIntersectAction ==
                    AxisLabelIntersectAction.rotate90 &&
                axisRenderer._isCollide)
            ? -90
            : axisRenderer._labelRotation;