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

label positions on axis extremes

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

4 Replies

GM Geetha M Syncfusion Team 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.


AD Administrator Syncfusion Team 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


GM Geetha M Syncfusion Team 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.


AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon