Page 1 of 1

Disable auto placement of X axis labels

Posted: Tue Feb 02, 2016 10:57 pm
by srinin2k
I add labels to the X Axis using "CustomAxisTick". The problem is that when many labels are present, the chart automatically hides some of the labels (may be to avoid overlapping issue). How do we prevent this?

How can I accomplish the following?
Show all X Axis labels by default. Find out if they overlap and show them at an angle of 45 if overlapping exists.

Re: Disable auto placement of X axis labels

Posted: Wed Feb 03, 2016 6:24 am
by ArctionPasi
set axis.DivisionReduction = False. Then they will all show.

To find out if they overlap, convert axis tick values into screen coordinates with axis.ValueToCoord. Then you get the center point coordinate of it. Then measure the label sizes with chart.MeasureText. In a for-loop, check if overlap exists.

Re: Disable auto placement of X axis labels

Posted: Wed Feb 03, 2016 8:15 pm
by srinin2k
axis.DivisionReduction = False is not working. Some of the labels are still hidden

Re: Disable auto placement of X axis labels

Posted: Thu Feb 04, 2016 4:20 pm
by ArctionPasi
We will improve this in the next assembly pack. Sorry about the inconvenience.

Re: Disable auto placement of X axis labels

Posted: Thu Feb 04, 2016 7:57 pm
by srinin2k
Sorry, I might not have communicated properly. That property(DivisionReduction) did not have any affect on the visibility of the labels. Am I also need to do any thing else?

Basically we want to display all labels. If wrapping happens, we display at an angle of 90. We want to know solution ASAP. Thanks

Re: Disable auto placement of X axis labels

Posted: Thu Feb 04, 2016 8:47 pm
by ArctionPasi
With CustomAxisTicks it really doesn't seem to have an effect. I'm afraid there's no other workaround than use Annotations or markers for rendering the labels. And it becomes very complex.