Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Alternating Position of X Axis Series Labels
posted

I know that I can change the orientation of the x axis series lables, but is there any way to alternate the vertical position of the labels when they are too wide to fit without overlapping?  Below is an example of what I am trying to achieve:

Parents Reply
  • 28496
    Offline posted in reply to Jeff

    i was able to reproduce this problem, so i entered it as a bug ... # 16499.

    it should be resolved in a future hotfix.  feel free to contact Infragistics Developer Support at any time to inquire about the status of this bug.  http://infragistics.com/gethelp

    if you need a temporary workaround, try replacing the Stagger behavior you added with one of these:

        internal class MyStaggerBehavior : StaggerAxisLabelLayoutBehavior
        {
            public override bool Apply(Rectangle bounds, IAdvanceAxis axis, AxisAppearance axisApp, AxisLabelInfoCollection labels, out Rectangle boundsUsed)
            {
                for (int current = 0; current < labels.Count; current++)
                {
                    if (current % 2 == 1)
                    {
                        labels[current].TextPrimitive.bounds.Offset(0, 10);
                    }
                    SizeF labelSize = Infragistics.UltraChart.Core.Util.Platform.GetLabelSizePixels(labels[current].TextPrimitive.GetTextString(), labels[current].TextPrimitive.labelStyle);
                    labels[current].TextPrimitive.bounds.Width = (int)Math.Ceiling(Math.Max(labelSize.Width, labels[current].TextPrimitive.bounds.Width));
                }
                boundsUsed = bounds;
                return true;
            }
        }

Children
No Data