FastLine example

TeeChart for ActiveX, COM and ASP
roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

FastLine example

Post by roger » Fri Sep 17, 2010 5:39 am

Hello,
I am using TeeChart Pro Activex Control v7.
Can some one please provide me sample code to use FastLine series in C++. I searched it in the examples but could not find it.
-Thanks in advance

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

Re: FastLine example

Post by Narcís » Fri Sep 17, 2010 7:09 am

Hi Roger,

Yes, you can use FastLine series like this:

Code: Select all

	long series1;
	series1 = m_Chart1.AddSeries(scFastLine);

	for (int i=0; i<10; i++)
	{
		m_Chart1.Series(series1).AddXY(i, i*i, "", clTeeColor);
	}
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

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: FastLine example

Post by roger » Mon Sep 20, 2010 8:45 am

Thank you very much

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: FastLine example

Post by roger » Wed Oct 06, 2010 7:02 am

Can some one post a run as it is example in C++ for fastline??
as i am trying to implement it but facing a lot of problems.
While addXY, and many other methods.

Thanks

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

Re: FastLine example

Post by Narcís » Wed Oct 06, 2010 7:19 am

Hi roger,

Which problems are you having? Do you get any specific error message? Have you seen the VC++ examples at the Examples folder included with the installation?

Thanks in advance.
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

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: FastLine example

Post by roger » Wed Oct 06, 2010 7:29 am

Hi,
I am doing
m_graph.AddSeries(scFastLine); as per suggested in the previous example.
I get error
error C2065: 'scFastLine' : undeclared identifier
Error executing cl.exe.
I could not find VC++, FastLine example. If it is there can you please tell me which one is it?

Thanks,

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

Re: FastLine example

Post by Narcís » Wed Oct 06, 2010 7:48 am

Hi roger,

That's because you need to add TeeChartDefines.h to your cpp file:

Code: Select all

#include "TeeChartDefines.h"
Otherwise you should use numeric value of those constants in TeeChartDefines.h, for example:

Code: Select all

   series1 = m_Chart1.AddSeries(6);
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

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: FastLine example

Post by roger » Wed Oct 06, 2010 8:29 am

Hi,

I had done
#include "fastlineseries.h"

And I cannot find Teechartdefines.h
And also I did addSeries(6);
but i cannot get Property Series1.XValues.Order
I found similar
m_series.GetXValues().SetOrder(loNone);
But its also giving error.

Thanks,

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: FastLine example

Post by roger » Wed Oct 06, 2010 8:30 am

Hi,
Also could you help me over http://www.teechart.net/support/viewtop ... =1&t=11657

Thanks,

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

Re: FastLine example

Post by Narcís » Wed Oct 06, 2010 8:47 am

Hi roger,
And I cannot find Teechartdefines.h
TeeChartDefines.h can't be found at C:\Program Files\Steema Software\TeeChart Pro v8 ActiveX Control\Examples\Visual C++. You may need to copy it to your project's header folder.
but i cannot get Property Series1.XValues.Order
I found similar
m_series.GetXValues().SetOrder(loNone);
But its also giving error.


Most likely you get an error about CValueList no? This means you need to add ValueList.h too. This is the same for all errors of that kind.

Also could you help me over viewtopic.php?f=1&t=11657


Yes, we will have a look at this issue ASAP. We try to give a timely reply to all forums issues.
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

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: FastLine example

Post by roger » Thu Oct 07, 2010 12:49 pm

Hello,
Can you please give me an run as it is example for FastLine in C++. So that it would be easy for me to implement.
Coz we have project delivery lined up and seems that implementation of FastLine would solve many of our problems,.

Waiting for an early response.
Thanks,

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

Re: FastLine example

Post by Narcís » Thu Oct 07, 2010 12:59 pm

Hi roger,

I already posted a FastLine example here. Have you followe my advice? Which problems have you found? Have you look at he Visual C++ examples included with the installation?

Thanks in advance.
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

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: FastLine example

Post by roger » Fri Oct 08, 2010 5:35 am

Hi,
I added
CFastLineSeries m_series[MAX_GRAPHS];
but seems that it does not have clear method on it.
as when i do m_series[1].Clear();
it gives me error C2039: 'Clear' : is not a member of 'CFastLineSeries
so what is the equivalent method I must use?

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: FastLine example

Post by roger » Fri Oct 08, 2010 6:04 am

Hi
I am refactoring to FastLineSeries, I have done some part of it. But i am facing some problems.
I had implemented following methods in my older code so where do I get equivalent of these in Fast line series class?

m_series[1].GetAsLine().GetPointer().SetVisible(true);
m_series[1].SetCursor(crHandPoint);
m_series = m_graph.Series(0);

I get following errors for the above lines:
error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CSeries' (or there is no acceptable conversion)
error C2039: 'GetAsLine' : is not a member of 'CFastLineSeries'
see declaration of 'CFastLineSeries'
error C2228: left of '.GetPointer' must have class/struct/union type
C2228: left of '.SetVisible' must have class/struct/union type
error C2039: 'GetAsLine' : is not a member of 'CFastLineSeries'
: see declaration of 'CFastLineSeries'
error C2228: left of '.GetPointer' must have class/struct/union type
error C2228: left of '.SetVisible' must have class/struct/union type
error C2039: 'SetCursor' : is not a member of 'CFastLineSeries'
see declaration of 'CFastLineSeries'


Please help me!!
Thanks,

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

Re: FastLine example

Post by Narcís » Fri Oct 08, 2010 7:31 am

Hi roger,

Code: Select all

m_series[1].GetAsLine().GetPointer().SetVisible(true);
Here you are type casting for a Line series not a FastLine. Having said that you should use GetAsFastLine() instead. However, FastLine series don't have Pointer property so you won't be able to use Pointers in FastLine series.

Code: Select all

m_series[1].SetCursor(crHandPoint);
crHandPoint is a Delphi constant. TeeChart Pro ActiveX is a COM wrapper of TeeChart Pro VCL. So that you can use its numeric value instead:

Code: Select all

	m_Chart1.Series(series1).SetCursor(-21);
For a list of all available options: http://docs.embarcadero.com/products/ra ... ursor.html

Code: Select all

m_series[i] = m_graph[i].Series(0);
I don't have any problem compiling and running similar instructions. What do you expect to get with that?
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