Page 1 of 1

How to remove axes and legends from chart

Posted: Tue Feb 08, 2005 8:00 am
by 9080952
Hi,

Of course I know how to add axes and legend to my chart, but how to remove .....

In my code I add a bottom axis by:
bottom = tChart1.Axes.Bottom;
bottom.Chart = tChart1.Chart;

but how to remove ?

For my legend I apply code like:
tChart1.Legend.TopLeftPos = 5;

but how to remove this legend ?

Thanks in advance.

Kind regards,
Antoon Koster
Netherlands

Posted: Tue Feb 08, 2005 9:38 am
by narcis
Hi Antoon,

You can set the axis ore legend visible property to false and won't be drawn.

Posted: Tue Feb 08, 2005 11:45 am
by 9080952
Hi,

Thanks for your reply.

But if I want to redraw my chart with a different legend (more items in it) and different axes (different length, grids, labels, etc. ), I first need to remove them from the chart, and then add the newly generated axes and legend to my chart.

That was my idea ....

Kind regards,
Antoon Koster
Netherlands

Posted: Tue Feb 08, 2005 12:16 pm
by narcis
Hi Antoon,

To show new axes, you can create new custom axes and make them visible.

Regarding the legend, you can choose which items can be displayed in the legend.

You can see some examples of this in the TeeChart feature demo included with the installation. Go to the "All Features" tab and have a look at the "Axes" and the "Miscellaneous>Legend" nodes.

Posted: Tue Feb 15, 2005 3:40 pm
by 9523802
Hi Antoon,

maybe this will help you too: removal of custom axes.

Code: Select all

        With Chart_
            .Series.Clear()
            .Axes.Custom.Clear()
        end with
Best Regards

Alex