Improved calculations for custom axes in AxisRenderer