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.
Issue with Marks for a Data Point Series
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Gary,
You can find all TeeChart constants in TeeChartDefines.h which you'll find at C:\Program Files\Steema Software\TeeChart Pro v6 ActiveX Control\Examples\Visual C++
You can try making the marks not visible and setting bottom axis labels to axis values like this:How do I get ride of these marks?
Code: Select all
m_Chart1.Series(0).GetMarks().SetVisible(false);
m_Chart1.GetAxis().GetBottom().GetLabels().SetStyle(2); //2 = talValue
It's most likely you are trying to retrieve a value which hasn't been defined yet because at that stage the chart may not have been drawn.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?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |