Hello,
I am using stacked column chart and i want to be able to wrap the text of my X axis labels. I tried implementing a custom behavior and set it to use behavior, but it doesn't seem to do anything. The sample Output like below
my code looked like this
chartCOM.Axis.X.Labels.WrapText = True
chartCOM.Axis.X.Labels.ClipText = False
chartCOM.Axis.X.Labels.SeriesLabels.Orientation = Styles.TextOrientation.VerticalLeftFacing
chartCOM.Axis.X.Labels.Layout.Behavior = Styles.AxisLabelLayoutBehaviors.UseCollection
wrapText.UseOnlyToPreventCollisions =
chartCOM.Axis.X.Labels.Layout.BehaviorCollection.Add(wrapText)
Hi,
Give a try of using a WrapTextAxisLabelLayoutBehavior behavior, described at:
http://forums.infragistics.com/forums/p/11663/81391.aspx#81391
and let me know if it works for you.
Thanks for your reply.
Please refer the below figure.
What I need as the actual output is in Fig A . I either get Fig B or Fig C as the output
after customization. I am not able to break the text into two halves on the X-Axis
when it is in vertical mode More over its difficul to adjust the width of the coulmn.
Is there any possibility to leave some space between the first coulmn and the y axis
Note the space between the margin and the column from Fig A and Fig B.
Kindly help me.
I have quoted the code snippet to help you further.
chartCOM.TitleTop.HorizontalAlign = Drawing.StringAlignment.Center
chartCOM.DataBind()
chartCOM.ColorModel.ModelStyle = Styles.ColorModels.CustomLinear
chartCOM.ColorModel.CustomPalette =
New Drawing.Color() {Drawing.Color.Red, Drawing.Color.Yellow, Drawing.Color.Green}
chartCOM.ColumnChart.ColumnSpacing = 3
chartCOM.ColumnChart.SeriesSpacing = 3
chartCOM.ColumnChart.NullHandling = Styles.NullHandling.Zero
chartCOM.Axis.Y.TickmarkStyle = Styles.AxisTickStyle.Smart
chartCOM.Axis.X.Labels.ItemFormatString =
"ITEM_LABEL\n;"
chartCOM.Axis.X.Labels.SeriesLabels.Orientation = Styles.TextOrientation.Custom
chartCOM.Axis.X.Labels.SeriesLabels.Layout.Behavior = Styles.AxisLabelLayoutBehaviors.UseCollection
Thanks for your reply :)
I believe this is ansered here now:http://forums.infragistics.com/forums/p/49268/261625.aspx#261625