Editor->Series->Datasource->Function question

TeeChart for ActiveX, COM and ASP
Post Reply
GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Editor->Series->Datasource->Function question

Post by GLSWG » Wed Aug 03, 2005 10:40 am

Hi guys,

What I am trying to do is to apply functions to chart via Chart Editor. However in the listbox Source Series underneath Available there's no any available serie. How can I fix it? I am populating series in the code via respective value arrays.

Develop Platform: VC++ 6
Chart Component: Techart 6

Thank you for any help in advance.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Aug 03, 2005 3:27 pm

Hi,

I need more info, how you create the Series ? Which Series type are you using ? I'm going to need a simple example or the steps so I can reproduce it here and see which the problem is. If you want to send an example please post it on our newsgroups at : news://www.steema.net/steema.public.attachments

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Thu Aug 04, 2005 8:59 am

Thank you for prompt reply. I am using bar, area and candle series so far.

Code: Select all

m_ctlTChart.AddSeries(scArea); 
m_ctlTChart.AddSeries(scBar); 
m_ctlTChart.AddSeries(scCandle);
here's how they are populated:

Bar serie

Code: Select all

//Setting Data arrays
	m_ctlTChart.Series(nSeriesIndex).AddArray(nElementsCount, YValues, XValues );  
CString sDate = "";
long nDate = 0;

if (bPrintLabels){

	for (long i=0; i<nElementsCount;i++ ) {
	
		sDate = m_arrDateLabels.GetAt(i); 		
		m_ctlTChart.Series(nSeriesIndex).SetPointLabel(i,sDate ); 
		
	}
}
Candle:

Code: Select all

for (long i=0;i<nElementsCount;i++){
		
		m_arrOpenValues.GetElement(&i,&nOpen); 
	
		m_arrHighValues.GetElement(&i,&nHigh); 
		 
		m_arrLowValues.GetElement(&i,&nLow); 
		 
		m_arrCloseValues.GetElement(&i,&nClose); 
		 
		m_arrDateValues.GetElement(&i,&nDate); 
		

	
		sDate = m_arrDateLabels.GetAt(i); 		
				
		m_ctlTChart.Series(nSeriesIndex).GetAsCandle().AddCandle(nDate ,nOpen,nHigh,nLow,nClose);    
	
	   m_ctlTChart.Series(nSeriesIndex).SetPointLabel(i,sDate); 
	}


Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 11, 2005 3:37 pm

Hi,

I cannot reproduce the problem here, using the latest TeeChart Pro v7. I've posted a simple VC++ example into the news://www.steema.net/steema.public.attachments newsgroup, with the same "subject". Could you please test it, modify it, or tell me the steps I must do to reproduce the problem ?

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Mon Sep 19, 2005 4:52 pm

Hi Pep,

Could you please send me this attachment to michael[a]softasap.net because I can't find it news. Thank you in advance.

Michael.

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

Post by Narcís » Tue Sep 20, 2005 7:36 am

Hi Michael,

I've just sent it to you. However configuring the newsgroups is not much complicated. You should just set www.steema.net as the news server in your newsreader, without login information and using the default ports.
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

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Tue Sep 20, 2005 12:42 pm

Hi Narcis,

Thank you, I received it. Actually I was subscribed to www.benrneda.com which was supposed to be your news? So now I believe it has changed to www.steema.com ?

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

Post by Narcís » Tue Sep 20, 2005 1:17 pm

Hi,

It was www.berneda.com (which I think still works) and has changed to www.steema.net (not dot com :wink: ).
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

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Tue Sep 20, 2005 8:27 pm

Hi Narcis,

You are right, of course I meant www.steema.net :). Ok, subscribed now to both news. Thanks.

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Tue Oct 11, 2005 5:47 pm

hi Guys,

I think I have found out what a problem could be. The thing is that I am filling series via Add functions and not via <b> DataSource </b> property. I think that is the reason the series are not displayed in the "Available" listbox. So here is the question: can I somehow assign those values I filled up in arrays to be source of DataSource? Or another option I can convert that my source data in xml, can then I pass xml as DataSource? Please, advice. Thank you in advance.

P.S. I saw there are some classes like SeriesXMLSource but I am not sure how I could use them. Do you have any examples of using this and does it really help in my situation?

Thanks.

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 Oct 13, 2005 7:29 am

Hi,
So here is the question: can I somehow assign those values I filled up in arrays to be source of DataSource?
You can manually assign whatever you want to a recordset and then use it as datasource for your series. For more information on how to deal with TeeChart and datasources programmatically you could have a look at the TeeChart tutorials related to databases. You'll find them at TeeChart's program group.
Or another option I can convert that my source data in xml, can then I pass xml as DataSource? Please, advice. Thank you in advance.

P.S. I saw there are some classes like SeriesXMLSource but I am not sure how I could use them. Do you have any examples of using this and does it really help in my situation?


Yes, you can also use XML to populate your series. You'll find some examples at TeeChart's features demo, available at TeeChart's program group, searching for "XML".
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