CChart::GetOptimalRange
CChart::GetOptimalRangeExact
void GetOptimalRange( double *inRange, double *outRange, int *nTicks, int *nMinor, BOOL exactRange );
void GetOptimalRangeExact( double *inRange, double *outRange, int *nTicks, int *nMinor );
Parameters
- inRange - The range of the data
- outRange - The "optimal" range for plotting
- nTicks - Set to the optimal number of tick marks
- nMinor - Set to the optimal number of minor ticks
- exactRange - Set to TRUE if the range passed is an exact range and should not be changed
Returns
outRange, nTicks and nMinor are changed by this function.
Description
This function uses the passed range to determine optimal tick intervals (both major and minor) for the given data. Also, GetOptimalRange will determine an optimal plotting interval which produces a nice number of tick marks.
For future work is to add the ability for each axis to not have the end points be tick marks. This way the data can have odd ranges, and good tick marks can still be made.
CChart Reference | CPlot Reference