GetFirstValueIndex method returns wrong index
Posted: Thu Aug 30, 2012 12:01 pm
Hi all,
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.
I try this code with only one serie with wrong results: nMinXValue is 102.87, nMaxXValue is 344, nMaxXIndex is also 344 but nAux is 99, that is not between axis maximum and minimum values.
Any idea?
Thanks and best regards,
Alex
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