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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

label positions on axis extremes

Thread ID:





41374 Feb 28,2006 08:32 PM UTC Mar 6,2006 05:36 PM UTC WinForms 4
Tags: Chart
Terry Foster
Asked On February 28, 2006 08:32 PM UTC

I''m noticing that by default the first and last labels on an axis are being shifted inward so as, I assume, to make sure that they do not get clipped. Is there a way to change this behavior - either just let them be clipped or hide them instead? I''ve played with the HidePartialLabels properties, but it doesn''t seem to effect this (it doesn''t seem to effect anything). Thanks, Terry

Geetha M [Syncfusion]
Replied On March 1, 2006 11:16 AM UTC

Hi Terry, Yes. You are correct about this. The purpose of shifting the labels inward is to avoid clipping. You can change this default behaviour by setting the AdjustPlotAreaMargins property of the ChartArea class to None. The following code illustrates this. this.chartControl1.ChartArea.AdjustPlotAreaMargins = ChartSetMode.None; Please let me know if this helps you. Thanks and Regards, Geetha.

Administrator [Syncfusion]
Replied On March 3, 2006 05:40 PM UTC

Hi Geetha, setting AdjustPlotAreaMargins to ChartSetMode.None solves the shifting, but still HidePartialLabels seems to have no effect. How can I avoid shifting and hide for example the last label of the axis? Thanks Wolfgang

Geetha M [Syncfusion]
Replied On March 6, 2006 01:33 PM UTC

Hi, Thanks for bringing the issue of HidePartialLabel does not hides the last label into our attention. I have logged a bug report on this issue and will update you as soon as the bug is fixed. As an workaround, you can raise the ChartFormatAxisLabel event which allows you to modify/delete the labels from the collection. Please refer the attached sample which deletes the last label using the ChartFormatAxislabel event. F41374.zip Kindly let me know if this helps you. Thanks and Regards, Geetha.

Administrator [Syncfusion]
Replied On March 6, 2006 05:36 PM UTC

Hi Geetha, Thank you for your response. Utilizing the ChartFormatAxisLabel event was what I was thinking about as well. But there might be a problem in dynamically determining the last label in the case of a zoomed in chart, isn''t it? Would it be also possible to use AdjustPlotAreaMargins = ChartSetMode.UserSet and adjust the ChartPlotAreaMargins propety? Thanks, Wolfgang


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon