We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Dynamic Removal of Axes Without Random Faults

I want to dynamically change the axes of an existing ChartControl instance. Let's say I have 10 axes, and now I want to change to 5. I've tried using the Axes.Remove(), and it works sometimes. Other times it randomly faults in a Syncfusion function RecalculateSizes() during an OnPaint().

chartControl1.Axes.Remove(axis);

Therefore, I must be going about this wrong. In short, I want to re-initialize the control with no axes and no series data in readiness to repopulate with new data.

Any ideas?

1 Reply

RF Rashidha F Syncfusion Team June 19, 2007 09:38 AM UTC

Hi DaveL,

Thanks for using Syncfusion Products.

If your intention is to display multiple axes without overlapping means please use ChartAxesLayoutMode in ChartControl.

The following code snippet which illustrates how to set YAxesLayoutMode in chartControl.

this.chartControl1.ChartArea.YAxesLayoutMode=ChartAxesLayoutMode.SideBySide;

Please have a look at the attached sample.

http://websamples.syncfusion.com/samples/Chart.Windows/F62595/main.htm

The above sample shows how to add and delete the axes in chartControl.

Please let me know if you have any more queries.

Thanks and Regards,
Rashidha.

Loader.
Live Chat Icon For mobile
Up arrow icon