Multi series paging problem
Multi series paging problem
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!
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!
Hi David,
which TeeChart Pro version are you using ?
I've just tried with the latest TeeChart Pro v7.05 and it works fine.
which TeeChart Pro version are you using ?
I've just tried with the latest TeeChart Pro v7.05 and it works fine.
Pep Jorge
http://support.steema.com
http://support.steema.com
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.
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.
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.
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.
Pep Jorge
http://support.steema.com
http://support.steema.com
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.
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.
Pep Jorge
http://support.steema.com
http://support.steema.com
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!
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!
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
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
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 :
and the following includes :
If you still having problems I could try to create it using VC++ Net and send it to you.
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());
Code: Select all
#include "Series.h"
#include "Page.h"
Pep Jorge
http://support.steema.com
http://support.steema.com