Basically, I am trying to scale the left axis such that the centre of the left axis is always 0. Or alternatively said, the 0 value of the left axis is always at the centre of the chart. However, I am using a basic line chart, and the values I am trying to scale are in the order of 1E-15 and -1E-15.
I am currently doing something like this:
Code: Select all
TChart* pChart = new TChart();
// add series here
// ...
double maxVal = std::abs(pChart ->Series[0]->YValues->MaxValue);
double minVal = std::abs(pChart ->Series[0]->YValues->MinValue);
if ( minVal > maxVal )
maxVal = minVal;
pChart->Axes->Left->SetMinMax(maxVal, - maxVal);
Note: The automatic scaling works ok but it doesn't centre the left axis on 0; Additionally, it would be nice to see more labels for small values, right now I only just see "0" along the left axis, not 1e-01 1e-02 etc.