Hi
I have long series names in a legend so I have set AutoTextWrap = true, but they wrap too much!
1 of the series names is wrapping over 3 lines instead of 2 lines, so I thought I'd make the legend box wider to accomodate it, but it ignores everything I've tried. I've attached a pic.
These lines do nothing:
Here is the markup:
and here is the relevant code behind:
What am I doing wrong?
I have long series names in a legend so I have set AutoTextWrap = true, but they wrap too much!
1 of the series names is wrapping over 3 lines instead of 2 lines, so I thought I'd make the legend box wider to accomodate it, but it ignores everything I've tried. I've attached a pic.
These lines do nothing:
- RadChart1.Legend.Appearance.Dimensions.Width = new Telerik.Charting.Styles.Unit(50);
- RadChart1.Legend.Appearance.ItemTextAppearance.Dimensions.Width = new Telerik.Charting.Styles.Unit(150);
- RadChart1.Legend.Appearance.Dimensions.AutoSize = false;
Here is the markup:
<telerik:RadChart ID="RadChart1" runat="server" Height="500px" Width="1200px" SkinsOverrideStyles="false" ChartTitle-Visible="false"></telerik:RadChart>and here is the relevant code behind:
RadChart1.Chart.Appearance.Border.Visible = false;RadChart1.Appearance.TextQuality = Telerik.Charting.Styles.TextQuality.ClearTypeGridFit;RadChart1.PlotArea.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;RadChart1.PlotArea.Appearance.FillStyle.MainColor = Color.White;RadChart1.PlotArea.Appearance.Border.Color = Color.LightGray;RadChart1.PlotArea.Appearance.Dimensions.Margins.Top = new Telerik.Charting.Styles.Unit(5);RadChart1.PlotArea.Appearance.Dimensions.Margins.Right = new Telerik.Charting.Styles.Unit(200);RadChart1.PlotArea.Appearance.Dimensions.Margins.Left = new Telerik.Charting.Styles.Unit(90);RadChart1.PlotArea.Appearance.Dimensions.Margins.Bottom = new Telerik.Charting.Styles.Unit(60);RadChart1.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopRight;RadChart1.Legend.Appearance.ItemTextAppearance.AutoTextWrap = Telerik.Charting.Styles.AutoTextWrap.True;RadChart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;RadChart1.PlotArea.XAxis.Appearance.CustomFormat = "d MMM";RadChart1.PlotArea.XAxis.DataLabelsColumn = "SHIFT_DATE";RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black;RadChart1.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Normal;RadChart1.PlotArea.XAxis.Appearance.LabelAppearance.Dimensions.Margins.Top = new Telerik.Charting.Styles.Unit(5);RadChart1.PlotArea.XAxis.IsZeroBased = false;RadChart1.PlotArea.XAxis.AddRange(startdate.ToOADate(), enddate.ToOADate(), 1);RadChart1.PlotArea.XAxis.LabelStep = Convert.ToInt32(Math.Floor(Convert.ToDecimal((enddate - startdate).Days / 8)));RadChart1.PlotArea.YAxis.Appearance.MajorGridLines.Visible = true;RadChart1.PlotArea.YAxis.Appearance.MajorGridLines.Color = Color.Gray;RadChart1.PlotArea.YAxis.IsZeroBased = true;RadChart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Metres (RC)";RadChart1.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = Color.Black;RadChart1.PlotArea.YAxis.AxisLabel.Visible = true;RadChart1.PlotArea.YAxis.Appearance.CustomFormat = "N0";RadChart1.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black;RadChart1.PlotArea.YAxis2.IsZeroBased = true;RadChart1.PlotArea.YAxis2.AxisLabel.TextBlock.Text = "m / day";RadChart1.PlotArea.YAxis2.AxisLabel.TextBlock.Appearance.TextProperties.Color = Color.Black;RadChart1.PlotArea.YAxis2.AxisLabel.Visible = true;RadChart1.PlotArea.YAxis2.Appearance.CustomFormat = "N0";RadChart1.PlotArea.YAxis2.Appearance.TextAppearance.TextProperties.Color = Color.Black;RadChart1.PlotArea.YAxis2.AxisLabel.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Left;What am I doing wrong?