[Themes previewer] Customaxes are not visible

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

[Themes previewer] Customaxes are not visible

Post by bertrod » Thu Feb 23, 2006 3:54 pm

Hello,

I noticed that in the Theme Previewer, the customaxes are not visible. Is there a way to draw them in the TDraw3D ?

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

Post by Pep » Mon Feb 27, 2006 3:17 pm

Hi,

yes, this is by default, I'll put this on our wish list to be considered for further releases.
If you're source code customer you can add them in the PreviewChart adding some lines of code in the InitPreviewChart method, basically you'll have to iterate through alll the Series and custom axis and assign them to the PreviewChart, something like :

PreviewChart.Series[0].CustomVertAxis := Chart.CustomAxes[0].Create(Previewchart);

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Mon Feb 27, 2006 4:07 pm

Hi,

Thanks. Now I have my customaxes on my previewChart. But when i chose another theme and I close the theme previewer, the customaxes disappear from my main chart :?

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Tue Feb 28, 2006 2:35 pm

So, I can say that when I'm using this line :

Code: Select all

PreviewChart.Series[0].CustomVertAxis := Chart.CustomAxes[0].Create(Previewchart);
the Chart.CustomAxes[0] of my real chart is deleted. I guess it's when the themePreviewer is destroyed, it frees all cloned series and axes. This is strange, as we use the function "create" to build a new axis.

Got an idea about it ?

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

Post by Pep » Thu Mar 02, 2006 11:06 am

Hi,

yes, sorry I mistake me, you will have to use the following code (for each custom axis) :

Code: Select all

    PreviewChart.CustomAxes.Add;
    PreviewChart.CustomAxes[0].Assign(Chart.CustomAxes[0]);
    PreviewChart.Series[0].CustomVertAxis:= PreviewChart.CustomAxes[0];

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Mon Mar 06, 2006 9:57 am

Thanks, looks better now.

Post Reply