Page 1 of 2

FastLine example

Posted: Fri Sep 17, 2010 5:39 am
by 9535061
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

Re: FastLine example

Posted: Fri Sep 17, 2010 7:09 am
by narcis
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);
	}

Re: FastLine example

Posted: Mon Sep 20, 2010 8:45 am
by 9535061
Thank you very much

Re: FastLine example

Posted: Wed Oct 06, 2010 7:02 am
by 9535061
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

Re: FastLine example

Posted: Wed Oct 06, 2010 7:19 am
by narcis
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.

Re: FastLine example

Posted: Wed Oct 06, 2010 7:29 am
by 9535061
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,

Re: FastLine example

Posted: Wed Oct 06, 2010 7:48 am
by narcis
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!

Re: FastLine example

Posted: Wed Oct 06, 2010 8:29 am
by 9535061
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,

Re: FastLine example

Posted: Wed Oct 06, 2010 8:30 am
by 9535061
Hi,
Also could you help me over http://www.teechart.net/support/viewtop ... =1&t=11657

Thanks,

Re: FastLine example

Posted: Wed Oct 06, 2010 8:47 am
by narcis
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.

Re: FastLine example

Posted: Thu Oct 07, 2010 12:49 pm
by 9535061
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,

Re: FastLine example

Posted: Thu Oct 07, 2010 12:59 pm
by narcis
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.

Re: FastLine example

Posted: Fri Oct 08, 2010 5:35 am
by 9535061
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?

Re: FastLine example

Posted: Fri Oct 08, 2010 6:04 am
by 9535061
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,

Re: FastLine example

Posted: Fri Oct 08, 2010 7:31 am
by narcis
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?