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
920
Y Axis Labels Clipped with WrapTextAxisLabelLayoutBehavior
posted

Hi,

I have a StackBarChart and the Y axis are long (approx 50 characters).  I have used WrapTextAxisLabelLayoutBehavior to wrap the Y axis labels over two lines. 

The problem I have is that the labels are clipped at the top and bottom.  Is it possible to change the height of a label?

Any help greatly appreciated.

Regards

James O'Doherty

 

Parents
  • 26458
    Offline posted

    I wonder if you need to increase chart.Axis.Y.Extent to accomodate the extra space. You might also want to try setting EnableRollback to false on your layout behavior. Can you provide a screenshot?

  • 920
    Offline posted in reply to Max Rivlin [Infragistics]

    Hi Max,

    Thanks for the reply.

    Here's a screenshot.

    Here's the code

                                        .Axis.Y.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal
                                        .Axis.Y.Labels.SeriesLabels.HorizontalAlign = StringAlignment.Far
                                        .Axis.Y.Labels.SeriesLabels.VerticalAlign = StringAlignment.Center
     
                                        .Axis.Y.Labels.SeriesLabels.Layout.Behavior = Infragistics.UltraChart.Shared.Styles.AxisLabelLayoutBehaviors.UseCollection
     
                                        Dim behavior = New Infragistics.UltraChart.Resources.Appearance.WrapTextAxisLabelLayoutBehavior()
                                        behavior.Enabled = True
                                        behavior.EnableRollback = False
                                        behavior.UseOnlyToPreventCollisions = False
     
                                        .Axis.Y.Labels.SeriesLabels.Layout.BehaviorCollection.Add(behavior)
     
                                        .Axis.X.Extent = 30
                                        .Axis.Y.Extent = 120

     

Reply Children