I use GetFirstValueIndex method at my code but it seems to return wrong indexes.
Documentation says:
This function / property returns the ValueIndex of the First point in the Series that has an X value which is between the Horizontal Axis Maximum and Minimum values.
When no Zoom is applied to the Chart, and the Axis are Automatic, the FirstValueIndex is 0. If the Series has no points or there are no visible points, the FirstValueIndex returns -1.
Code: Select all
double nMinXValue = m_oTChart.GetAxis().GetBottom().GetMinimum();
double nMaxXValue = m_oTChart.GetAxis().GetBottom().GetMaximum();
long nMinXIndex = m_oTChart.Series(0).GetFirstValueIndex();
long nMaxXIndex = m_oTChart.Series(0).GetLastValueIndex();
double nAux = m_oTChart.Series(0).GetXValues().GetValue(nMinXIndex);
Any idea?
Thanks and best regards,
Alex