Issue with Marks for a Data Point Series

TeeChart for ActiveX, COM and ASP
Post Reply
Gary
Newbie
Newbie
Posts: 7
Joined: Tue Jul 22, 2003 4:00 am

Issue with Marks for a Data Point Series

Post by Gary » 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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Aug 02, 2007 9:05 am

Hi Gary,
How do I get ride of these marks?
You can try making the marks not visible and setting bottom axis labels to axis values like this:

Code: Select all

	m_Chart1.Series(0).GetMarks().SetVisible(false);
	m_Chart1.GetAxis().GetBottom().GetLabels().SetStyle(2); //2 = talValue
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++
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?
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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply