Is there a way i can set the X Axis of my Line chart to display the Lables in MultiLIne?
The reason i want to implement this is, becuase my labels on the X-Axis have more than 50 characters, it does'nt fit in the chart boundary, i can't rotatethe labels, i cant reduce the size of the lables and the requirement is to show all the data in one chart, and since the chart currently is emmbeded as an image inside a wingrid cell doesnt help the cause of increasing the height, but yes the widht can be increased as per the requirement. So apart from telling me to put it as horizontal or increase the X Extent, i need some other advice.
Thanks
Kartik
Hi Kartik,
Try using the new line character in your ItemFormatString value. For example the following string will be positioned at three rows:
this.ultraChart1.Axis.X.Labels.ItemFormatString = "test string \n on more than \n one row";
As a follow up if the above solution is not an option for you, you could just use the WrapText property of the Axis labels:
this.ultraChart1.Axis.X.Labels.WrapText = true;
Excuse me for the late answer. I was out of office due to some health problems.
Does the problem still exist?
hmm this baffels me, the picture doesnt quite correlate to sandMAN....
Anyways, the trick actually worked great , thanks.
Since the labels i use were actually pretty big i had to increase the widht of the chart column to 1080 to line the lables correctly so i decided to do a LINE3dchart instead with rotation and zoom inside the grid.
But for the 3d Chart the labels seem to not wrap, i tried using hte wraptext() it didnt work, also i tried the method above it didnt work either, to replicate this issue you need to change the chart type in the solution to Line 3D Chart.
It seems that the WrapText doesn't work for vertical text layout.
Try using behaviors and increase the width of the chart itself:
............ e.WinChart.AutoSizeMode = AutoSizeMode.GrowOnly;e.WinChart.Legend.Visible = true;e.WinChart.Axis.Y.Visible = true; e.WinChart.Axis.Y.ScrollScale.Visible = true;e.WinChart.Axis.X.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.UseCollection;e.WinChart.Axis.X.Labels.Layout.BehaviorCollection.Add(new WrapTextAxisLabelLayoutBehavior()); e.WinChart.Data.DataSource = modData;e.WinChart.Data.DataBind();...........
Hi
I have a project i am working on the ClipText and Wrap Text work fine when the chart is dragged from the toolbox and dropped onto a form but if i try to add it at runtime the ClipText and Wrap Text do not work. I have a small project i am working on and would like have your insight into it.
THe problem i have is the UltraChart in the WinGrid Cell doesnt not cliptext nor wrap text on the X axis.
I have attached a demo project if you can look at it and adivse me , would be helpful.
The properties ClipText and WrapText are not fully tested which is why they are hidden. As they work for your case you may use them. Maybe it will be fixed in future versions.