Multi series paging problem

TeeChart for ActiveX, COM and ASP
Post Reply
David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Multi series paging problem

Post by David » Tue Nov 29, 2005 8:21 am

I tried to draw PointSeries and FastlineSeries in one chart and use paging function to display 4 data in one page. Here are the code:

m_chart1.AddSeries(6);
m_chart1.Series(0).FillSampleValues(8 );
m_chart1.AddSeries(4); //m_chart1.AddSeries(1) would work
m_chart1.Series(1).FillSampleValues(8 );
m_chart1.GetPage().SetMaxPointsPerPage(4);
m_nav1.SetChartLink(m_chart1.GetChartLink());

However, only the FastlineSeries data could be seperated into two pages and all the eight PointSeries data were displayed in the page one. Similarly, in the feature demo, the same problem appears in the Page Number example under Tools (All Features Tab).

Anyone knows how to realize it correctly? Thanks!

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

Post by Pep » Wed Nov 30, 2005 10:49 am

Hi David,

which TeeChart Pro version are you using ?
I've just tried with the latest TeeChart Pro v7.05 and it works fine.

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Thu Dec 01, 2005 12:48 am

Hi, Pep,
I am using 7.0.5 too. And I also tried other combination, like scLine and scFastLine, scLine and scPoint, scLine and scBar. And strangely, if I add scFastLine first, then add scBar, it works fine. But if I add scBar first, and then scFastline, it won't work properly. Even if both lines are the same, like scLine with scLine, it still couldn't work. Really got confused.

Here is how the m_nav1 is added:
DDX_Control(pDX, IDC_TCHART, m_chart1);
DDX_Control(pDX, IDC_CHARTPAGENAVIGATOR, m_nav1);
In the head file:
CChartPageNavigator m_nav1;

Just as I posted last time, the same problem exist in the Page Number example under Tools (All Features Tab) in the feature demo.

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

Post by Pep » Thu Dec 01, 2005 9:26 am

Hi David,

yes, I'm sorry, I've noticed that setting this parameters in a diferent way I can see the problem, It's a bug which has been added on our defect list, and a fix for it will be considered to inclusion for the next maintenance releases. A workaround for the moment, as I can see here is to add all the things (except the Chart and PageNavigator components) at runtime. I've attached a demo which works fine here into the news://www.steema.net/steema.public.attachments newsgroup (with the same subject) , you can download it and test it.

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Thu Dec 01, 2005 10:38 am

Hi, Pep,

I don't know how to download it from the newsgroup. Would you please send the demo to my email? And it will be appreciated if you can also tell me how to access the newsgroup. Thank you very much.

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

Post by Pep » Thu Dec 01, 2005 10:44 am

Hi David,

just adding the newsgroup I told you into a newsgroups reader, like Outlook Express or MS Outlook should do the trick. Please let me know an email account that I can use to sent to you the demo.

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Thu Dec 01, 2005 10:50 am

Hi, Pep,

I will try the newsgroup tools later. Would you please send the demo to lin_song@dsi.a-star.edu.sg? Thank you very much!

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

Post by Pep » Thu Dec 01, 2005 11:04 am

Hi David,

sure, sent !

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Fri Dec 02, 2005 3:01 am

Hi, Pep,

I got your demo and I opened it in the VS.NET2003. When I tried to open the dialog, it popped a window saying "Control IDC_TCHART2 could not reload it state from its data save from last time the dialog editor was used. The control will not be initialized in the dialog". Then I just compiled the project and run it, but there was a debug assertion failure in occmgr.cpp line 410. Would you please help me out? Thank you very much.

David

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

Post by Pep » Fri Dec 02, 2005 6:45 pm

Hi David,

eps..I thought you were using VS 6.0 (I create the project using VS.6.0). Anyway, it's simple to create de same demo, just createing a Dialog App., place a Chart on the form and a Page nav control, then without changing any settings in the Chart Editor, add the following code into the Init proc :

Code: Select all

	// TODO: Add extra initialization here
	m_chart.AddSeries(6); 
	m_chart.Series(0).FillSampleValues(8 ); 
	m_chart.AddSeries(4); //m_chart1.AddSeries(1) would work 
	m_chart.Series(1).FillSampleValues(8 ); 
	m_chart.GetPage().SetMaxPointsPerPage(4); 
	m_pagenav.SetChartLink(m_chart.GetChartLink()); 
and the following includes :

Code: Select all

#include "Series.h"
#include "Page.h"
If you still having problems I could try to create it using VC++ Net and send it to you.

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Mon Dec 05, 2005 1:55 am

Hi, Pep,

Yeah, this time it works! Thank you so much!

David

Post Reply