Page 1 of 1

The relation between Chart3DPercent and numbers of series ?

Posted: Sun Dec 07, 2008 7:33 am
by 8574101
Hello,
I have 10 series on Chart1(3D),and 10 items in a CheckListBox to
represent the 10 series.

When items of the CheckListBox being checked,I handled the event of CheckListBox1ClickCheck event as following.

Code: Select all

void __fastcall TfWavePower::CheckListBox1ClickCheck(TObject *Sender) 
{ 
    int n3DPercnt = Chart1->Chart3DPercent; 

    //Item Checked 
    if( CheckListBox1->Checked( CheckListBox1->ItemIndex ) ) 
       Chart->Series[i]->ParentChart = Chart1; 
    else 
       Chart->Series[i]->ParentChart = NULL; 

    Chart1->Chart3DPercent = n3DPercnt; 
} 



But when I unchecked the items ,the width of Chart1 became to smaller and smaller.

Please take a look at the following pictrues.

[img]
http://img1.freep.cn/p.aspx?u=v20_img1_ ... 103843.jpg
[/img]

[img]
http://img1.freep.cn/p.aspx?u=v20_img1_ ... 103843.jpg
[/img]

Posted: Wed Dec 10, 2008 2:15 am
by 8574101
Hello, :cry:

Posted: Wed Dec 10, 2008 11:01 am
by narcis
Hello,

Instead of deactivating series try setting their color to clNone. That way chart dimensions won't change.

Posted: Thu Dec 11, 2008 8:55 am
by 8574101
There are hundreds of series in Chart1.If all the series are belong to Chart1,speed becomes slowly.
So I only want to show the series that checked in the CheckListBox.

What's the relation between Chart3DPercent and the numbers of series.

In a word , What I want to is : Even I change the numbers of series of Chart1,the deepth of Chart1 don't change!

Posted: Thu Dec 11, 2008 10:08 am
by 8574101
Hello,
any other ways :(

Posted: Fri Dec 12, 2008 4:08 pm
by narcis
Hi wwp3321,

I'm afraid not. We can only think of 2 options:

1. Setting series color to clNone which, as you said, is slower as it is the same as painting those series.
2. Using fake series for "reserving" necessary space and add or remove them when you enable/disable series accordingly.

Chart3DPercent is related to sereis because each series has Depth property which can be assigned manually.

It would be interesting doing somethin like this:

Code: Select all

Chart.Chart3Dstyle := (pixels or percent);
//Chart.Chart3Dpercent := 100;
Chart.Chart3Dpixels := x;
We will add this feature request to the wish-list to be considered for inclusion in future releases.

Posted: Mon Dec 15, 2008 2:26 am
by 8574101
Anyway ,thanks for your help!

With Best Regards
wwp