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

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