How to clear axis in chart.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
biji
Newbie
Newbie
Posts: 35
Joined: Wed Jul 02, 2008 12:00 am

How to clear axis in chart.

Post by biji » Tue Feb 11, 2014 12:50 pm

Hi all,

I have small problem with clearing chart.

I am drawing multiple custom vertical axis on left side programatically. I will draw multiple axis based on sensor connection to hardware.

For example: At first time i have connected 8 sensors and i am creating 8 vertical left axis programatically. i will start and it will updating chart perfectly. then i will remove one sensor connection and i will start once again then it has to clear all previous series and axis's in the chart then draw only 7 axis and plot according series.
I tried to clear chart like this

Code: Select all

tchart1.Refresh();
tchart1.Series.Clear();
tchart1.Series.RemoveAllSeries();
But using above code i am able to clear chart and its series but i am not able to clear axis which were drawn programatically are still presenting.

Please help me how to clear chart with including axis. everything working perfect but i want know how to clear those multiple axis.

Thanks.
biji

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: How to clear axis in chart.

Post by Narcís » Thu Feb 13, 2014 2:02 pm

Hi biji,

What about clearing the complete chart with TChart.Clear() or do you need to keep some chart settings? If that's the case you can use TChart.Axes.Custom.Clear(). For example:

Code: Select all

      tChart1.Clear();
or

Code: Select all

      tChart1.Axes.Custom.Clear();
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

biji
Newbie
Newbie
Posts: 35
Joined: Wed Jul 02, 2008 12:00 am

Re: How to clear axis in chart.

Post by biji » Fri Feb 14, 2014 9:03 am

Hi,

Thanks for your advice , its working.

Regards,
biji.

Post Reply