Method AxisMaximum
- Namespace
- DocWright.Core.Primitives
- Assembly
- DocWright.Core.dll
AxisMaximum(double, double, double)
The axis top for a step: the smallest multiple of unit that is
strictly greater than the data.
public static double AxisMaximum(double dataMaximum, double minimum, double unit)
Parameters
dataMaximumdoubleThe largest value the axis must show.
minimumdoubleThe axis bottom, usually zero.
unitdoubleThe step between ticks. Must be finite and greater than zero.
Returns
- double
The axis top, always greater than
minimum.
Remarks
Strictly is the whole of it, and it is measured in both engines: a data maximum of 20 with a step of 5 gives an axis of 25, not 20, so a bar that reaches the data maximum never reaches the top of the plot. It is also why the axis top moves when the step coarsens, which is the behaviour most likely to be read as a defect.