Jump to content
Software FX Community

remove pane by code


User (Legacy)

Recommended Posts

  • 2 weeks later...

When I use this RemoveAt the panes do not get removed.

I know have:

int i=1;

int max=grafiek.Series.Count;

while(i<= max)

{

grafiek.Series.RemoveAt(0);

i++;

}

i=1;

max=grafiek.Panes.Count;

while(i<= max)

{

grafiek.Panes.RemoveAt;

i++;

}

I expected that all series and allpanes would be removed by this. The code

runs through the software, but the panes and series remain in the chart.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:f%23Ja8HXrFHA.1992@webserver3.softwarefx.com...

> chart1.Panes.RemoveAt(paneIndex);

>

> You must make sure all series associated with this pane are moved to

> another before removing it.

>

>

> A pane can be made invisible along with all series contained in it by

> doing:

>

> pane.Proportion = 0;

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

It is not that simple, there are Axes associated with these panes that 

remain in place, there are series associated with these axes, etc.

chart.Series is a collection of series attributes, not series itself,

removing a series from this collection will not make then go away, they will

simply end up with default attributes.

What exactly do you want to achieve with this code ? What do you want to

appear in the chart after this code runs ?

Take a look at ClearData, it may be what you are looking for.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...