Dragging a 2D Line Plot

TeeChart for ActiveX, COM and ASP
Post Reply
marathoner
Newbie
Newbie
Posts: 35
Joined: Wed Dec 12, 2007 12:00 am

Dragging a 2D Line Plot

Post by marathoner » Thu Mar 13, 2008 1:14 pm

After plotting a 2D line on a chart, is it possible to drag the 2d line in either horizontal or vertical direction for repositioning?

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 Mar 13, 2008 3:18 pm

Hi marathoner,

Is it a constant line? If so the best solution would be using a ColorLine tool. Otherwise you can do something like what's suggested here. This is a TeeChart for .NET example but the same should be available in the ActiveX version.

Hope this helps!
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

marathoner
Newbie
Newbie
Posts: 35
Joined: Wed Dec 12, 2007 12:00 am

Post by marathoner » Thu Mar 13, 2008 6:35 pm

How do I choose the ColorLine tool?

marathoner
Newbie
Newbie
Posts: 35
Joined: Wed Dec 12, 2007 12:00 am

Post by marathoner » Thu Mar 13, 2008 6:43 pm

The .NET example isn't at all clear. Can you give me an example in VC++ 6.0, that demonstrates how one drag a plot.

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

Post by Narcís » Fri Mar 14, 2008 8:53 am

Hi marathoner,
How do I choose the ColorLine tool?
You can do this:

Code: Select all

	m_Chart1.GetTools().Add(tcColorLine);
	
	CAxis & axis = m_Chart1.GetAxis().GetLeft();
	VARIANT iAxis;    
	iAxis.vt = VT_DISPATCH;
	iAxis.pdispVal = axis;

	m_Chart1.GetTools().GetItems(0).GetAsColorLine().SetAxis(iAxis);
	m_Chart1.GetTools().GetItems(0).GetAsColorLine().SetValue(500);
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