Issue with Marks for a Data Point Series
Posted: Wed Aug 01, 2007 4:23 pm
I have a multi-part issue with Marks. I'm using the following code to add data points to a series for plotting:
std::map<double, DataPoint>::iterator iter;
for(iter = m_mapFundalHeightData.begin(); iter != m_mapFundalHeightData.end(); iter++)
{
DataPoint dataPoint = iter->second;
seriesActivityData.AddXY(dataPoint.getX(), dataPoint.getY(), dataPoint.getLabel(), dataPoint.getColor());
}
*DataPoint is a custom class that holds the x, y, label, color.
When doing this a mark is drawn on the X axis for each one of my data points and my X axis labels (marking the major tick marks) are removed (they're drawn before the data is plotted).
I've added the line:
seriesActivityData.GetMarks().Clear();
after adding the points but I still get the marks.
If I don't provide the label parameter, then the marks aren't drawn, but I need the label parameter as I'm utilizing the CMarksTipTool.
How do I get ride of these marks?
The second problem I'm getting is that when I try and get properties for a SeriesMarkPosition I get a message box displaying with the warning icon and no message. Where is this coming from and why?
Examples of lines that generate the message box:
--- m_teeChart.Series(0).GetMarks().GetPositions().GetPosition(0).GetLeftTop().GetX();
--- m_teeChart.Series(0).GetMarks().GetPositions().GetPosition(0).SetCustom(FALSE);
We're using Version 6 of the ActiveX TeeChart control.
std::map<double, DataPoint>::iterator iter;
for(iter = m_mapFundalHeightData.begin(); iter != m_mapFundalHeightData.end(); iter++)
{
DataPoint dataPoint = iter->second;
seriesActivityData.AddXY(dataPoint.getX(), dataPoint.getY(), dataPoint.getLabel(), dataPoint.getColor());
}
*DataPoint is a custom class that holds the x, y, label, color.
When doing this a mark is drawn on the X axis for each one of my data points and my X axis labels (marking the major tick marks) are removed (they're drawn before the data is plotted).
I've added the line:
seriesActivityData.GetMarks().Clear();
after adding the points but I still get the marks.
If I don't provide the label parameter, then the marks aren't drawn, but I need the label parameter as I'm utilizing the CMarksTipTool.
How do I get ride of these marks?
The second problem I'm getting is that when I try and get properties for a SeriesMarkPosition I get a message box displaying with the warning icon and no message. Where is this coming from and why?
Examples of lines that generate the message box:
--- m_teeChart.Series(0).GetMarks().GetPositions().GetPosition(0).GetLeftTop().GetX();
--- m_teeChart.Series(0).GetMarks().GetPositions().GetPosition(0).SetCustom(FALSE);
We're using Version 6 of the ActiveX TeeChart control.