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

axes titles overlap

When I have 2 Y-Axes, the titles overlap. (See attached project)
How can I avoid this overlapping?

Regards Andreas

AxesTitleOverlap.zip

7 Replies

JA JayaLakshmi Syncfusion Team August 16, 2006 06:21 AM UTC


Hi Andreas ,

Thanks for choosing Syncfusion products.

Using Location property of an axes, you can locate the secondary axis wherever you want. You need to adjust the ChartArea margin according to the secondary axis location.

Please try your modified sample in which we added the above factors.

Kindly let me know if this helps.

Regards,
Jaya

AxesTitleOverlap0.zip


AI Andreas Isler August 16, 2006 01:57 PM UTC

Hi Jaya,
this example helped. The missing link was chartControl1.ChartArea.ChartAreaMargins.Right.
With this property and some simple calculations it is possible to set the location of any Y-axis.
Anyway it would be nice to have when multiple axes would not overlap.

Cheers
Andreas


JA JayaLakshmi Syncfusion Team August 17, 2006 09:25 AM UTC


Hi Andreas,

Thank you for your updates.

In previous post , I adjusted the ChartArea Margins of the sample at design time. The following code illustrate this :

chartControl1.ChartArea.ChartAreaMargins.Right = 100;

Thank you for your continued interest in Syncfusion products.

Regards,
Jaya


AI Andreas Isler December 20, 2006 12:53 PM UTC

Hi Jaya,
I managed to set the position of the axes and the chart by chartControl1.ChartArea.ChartAreaMargins.Right.

However, if you zoom in, the X-positions cannot be set correctly anymore. See attached project.

Instead of setting the X-positions manually I anyway would prefer axes that don't overlap.

Is there a patch? Or how should I set the X-positions that they are correct with zooming?

Regards
Andi

AxesOverlapZoom.zip


AD Administrator Syncfusion Team December 20, 2006 04:16 PM UTC

Hi Andi,

Sorry for the inconvenience caused.

You can set space between Axes using ‘AxisSpacing’ property of Chart Axes. The following code will allow you to set space between Axes.

this.chartControl1.Axes.AxisSpacing = new SizeF(10, 0);

Please have a look into the sample attached for more information.

Modified Axes Overlap Zoom sample

Please let me know if this helps.

Thanks for your continued interest in Syncfusion products.

Best Regards,
Sureshbabu


AI Andreas Isler December 21, 2006 09:36 AM UTC

Hi Sureshbabu,
the key was exactly
this.chartControl1.Axes.AxisSpacing = new SizeF(10, 0);

Thank you
Andi


AD Administrator Syncfusion Team December 22, 2006 02:55 PM UTC

Hi Andi,

Thanks for your update.

Please open new forums if you have any further questions.

We appreciate you for using Syncfusion products.

Regards,
Sureshbabu

Loader.
Live Chat Icon For mobile
Up arrow icon