I am using C++Builder 6 with Tee Chart Pro 7.07
I have this problem in two charts, one with Area Series and one with Line series.
I create up to 32 series at runtime, using a single series as a template. This works just fine (all the series do as expected), except the Legend which is visible at design time is not visible at runtime.
I have tried forcing it visible by setting
Chart->Legend->Visible = true;
and for each series:
for(i=0;i<NumUsed;i++){
LineSeries->ShowInLegend = true;
}
This does not help.!
I had this problem originally with an area chart, and worked around it by creating my own DIY Legend. I assumed it was a problem with my old version of TeeChart Pro (5 I think) Area Plots and the new release would fix the problem --- But alas it still happens to Area and Line charts
Is there something dumb I am doing -- have I missed something?
PS No problem with a pie chart and a bar chart -- The Legends appear OK
I must have spent days on this problem, trying different combinations.
Cheers
Bugsie
Missing Chart Legend at runtime
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bugsie,
This is very strange, it would seem there should be something that makes the legend not visible in your application. Could you please send us an example project we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
This is very strange, it would seem there should be something that makes the legend not visible in your application. Could you please send us an example project we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
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 |
Instructions - How to post in this forum |
It would be difficult to send you the full app, as it runs on an Oracle database .. sigh. I will attempt to reproduce the problem in a simple example. I think I know how to do it, It requires runtime creation of series. It is late here tonight and I will try to make stand alone example tomorrow
Cheers
Bugsie.
PS I have one chart that works just fine without the problem.
Cheers
Bugsie.
PS I have one chart that works just fine without the problem.
Narcís,
I have posted a simpel test case example to news://www.steema.net/steema.public.attachments newsgroup.
Cheers
Chris McGowan
(Bugsie)
I have posted a simpel test case example to news://www.steema.net/steema.public.attachments newsgroup.
Cheers
Chris McGowan
(Bugsie)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
Thank you very much for the project. It worked fine her using v7.07 and disabling the Build with run-time packages option at Project\Options\Packages. I'm attaching your project built here and its corresponding .exe in the newsgroups. Can you please test if it works fine for you?
Thank you very much for the project. It worked fine her using v7.07 and disabling the Build with run-time packages option at Project\Options\Packages. I'm attaching your project built here and its corresponding .exe in the newsgroups. Can you please test if it works fine for you?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcís
Thanks for your help, Your App ran fine, I compiled it and it runs OK with Project\Options\Packages disabled.
I did the same thing with My main Application -- but it now has link errors (not related to Steema objects) when I disabledProject\Options\Packages !
I may be in "dll hell"
Also, my $TEE... Environment variables are set to the old version -- I will have a look at my environment and make sure all old dll's and libaries have been removed.
I will let you know when I have finished ....
Cheers
Chris
Thanks for your help, Your App ran fine, I compiled it and it runs OK with Project\Options\Packages disabled.
I did the same thing with My main Application -- but it now has link errors (not related to Steema objects) when I disabledProject\Options\Packages !
I may be in "dll hell"
Also, my $TEE... Environment variables are set to the old version -- I will have a look at my environment and make sure all old dll's and libaries have been removed.
I will let you know when I have finished ....
Cheers
Chris
Ok, I have got past my linking problem, .... sigh .... and have rebuilt my application. Unfortunatly the same problem exists -- no Legend at runtime.
I will check all my dll's and run time environment -- It could be this is where the problem is (I am picking up the wrong dll somewhere..)
Cheers Chris
I will check all my dll's and run time environment -- It could be this is where the problem is (I am picking up the wrong dll somewhere..)
Cheers Chris
I have it working fine now
It is a bit strange though.
In my original code when I created the series at runtime I set the ParentChart to NULL and set it correctly when I activated the series. This code was unnecessary, as setting Active and Visible to false was enough. It was like this
for(i=1;i<MAX;i++){
AreaSeries = new TAreaSeries(AreaChart);
AreaSeries->ParentChart = NULL;
AreaSeries->Active = false;
AreaSeries->Visible = false;
}
And when I activated the series I set
AreaSeries[Id]->ParentChart = AreaChart;
AreaSeries[Id]->Active = true;
AreaSeries[Id]->Visible = true;
Removing this fixes the problem, thus:
for(i=1;i<MAX;i++){
AreaSeries = new TAreaSeries(AreaChart);
// This may not be necessary!
AreaSeries->ParentChart = AreaChart;
AreaSeries->Active = false;
AreaSeries->Visible = false;
}
And when Activating ........
AreaSeries[Id]->Active = true;
AreaSeries[Id]->Visible = true;
I tried to reproduce this in the simle example but it fails to reproduce the problem. My guess is there is some sort of race condition the simple example does not reproduce.
Anyway, thanks for you help.
It is a bit strange though.
In my original code when I created the series at runtime I set the ParentChart to NULL and set it correctly when I activated the series. This code was unnecessary, as setting Active and Visible to false was enough. It was like this
for(i=1;i<MAX;i++){
AreaSeries = new TAreaSeries(AreaChart);
AreaSeries->ParentChart = NULL;
AreaSeries->Active = false;
AreaSeries->Visible = false;
}
And when I activated the series I set
AreaSeries[Id]->ParentChart = AreaChart;
AreaSeries[Id]->Active = true;
AreaSeries[Id]->Visible = true;
Removing this fixes the problem, thus:
for(i=1;i<MAX;i++){
AreaSeries = new TAreaSeries(AreaChart);
// This may not be necessary!
AreaSeries->ParentChart = AreaChart;
AreaSeries->Active = false;
AreaSeries->Visible = false;
}
And when Activating ........
AreaSeries[Id]->Active = true;
AreaSeries[Id]->Visible = true;
I tried to reproduce this in the simle example but it fails to reproduce the problem. My guess is there is some sort of race condition the simple example does not reproduce.
Anyway, thanks for you help.