I have a problem with series labels not showing - it can easily be reproduced. Taking the standard example for column charts:
DataTable dt = new DataTable();dt.Columns.Add("col1", typeof(string));dt.Columns.Add("col2", typeof(int));dt.Columns.Add("col3", typeof(int));dt.Rows.Add( new object[{"Series1", 10, 20});dt.Rows.Add( new object[{"Series2", 30, 40});
chart.Data.DataSource = dt;
This will work just fine.
But as soon as one of the column's names gets longer, like "column 2 with a rather long name" the series label is no longer shown. The only way to show the series label in this situation is to manually assign a large extent for the X axis. This is rather disturbing when creating these charts dynamically, or for localized charts.
Is there any other way to ensure the series labels are always shown, even when the item labels' strings are not known during design time, and they could potentially be long?
Another question: Is it possible to show series labels in bar charts at all?
Thank you,
Stefan
You can try:
this.ultraChart1.Axis.Y.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto;
Hi,
I am doing the same thing with Series Labels, but now working out, can u pls help me out o this.
this.ultraChart1.Axis.Y.Labels.SeriesLabels.Layout.BehaviorCollection.Add(new Infragistics.UltraChart.Resources.Appearance.WrapTextAxisLabelLayoutBehavior());
You can try using:
this.ultraChart1.Axis.X.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.UseCollection;
this.ultraChart1.Axis.X.Labels.Layout.BehaviorCollection.Add(new WrapTextAxisLabelLayoutBehavior());
In the BarChart series labels are on the Y-axis.