Hello,
I have a similar issue. I would like to change the Aligned Position of my labels on the chart to the bottom of the graph. I don't know whether the length of the labels is an issue since I am using times as the default label text. But no matter what I try I am unable to move the labels. I have tried to change both the series and the series item properties for Aligned Position, and also for position.x and position.y, and also for offset y and offset x. Below are the functions I am using to set the series and series item properties. I have also turned off Auto for the positions.
Here is the code behind in C#
SetSeriesAppearance(s0);
protected void SetSeriesAppearance(ChartSeries series)
{
series.YAxisType =
ChartYAxisType.Primary;
series.Appearance.TextAppearance.TextProperties.Font =
new Font("Tahoma", 8);
series.Appearance.TextAppearance.TextProperties.Color =
Color.Black;
series.Appearance.LabelAppearance.Position.Auto =
false;
series.Appearance.LabelAppearance.Position.AlignedPosition =
AlignedPositions.Bottom;
series.Appearance.TextAppearance.Position.AlignedPosition =
AlignedPositions.Bottom;
//series.Appearance.ShowLabelConnectors = true;
//appear to do nothing
series.Appearance.CenterXOffset = 100;
series.Appearance.CenterYOffset = 100;
}
protected void SetSeriesItemProperties(ChartSeriesItem seriesitem, int intTypeCode)
{
//seriesitem.Appearance.Border.Color = Color.Black;
//seriesitem.Label.Appearance.Border.Color = Color.Black;
seriesitem.Label.Appearance.FillStyle.MainColor =
Color.Transparent;
seriesitem.Label.Appearance.Dimensions.Paddings.Top = 2;
seriesitem.Label.Appearance.Dimensions.Paddings.Left = 0;
//appear to do nothing to labels.
//seriesitem.Label.Appearance.Dimensions.Margins.Top = 115;
//seriesitem.Label.Appearance.Dimensions.Margins.Left = 55;
seriesitem.Label.Appearance.Distance = 240;
seriesitem.Label.Appearance.LabelConnectorStyle.Visible =
true;
//seriesitem.Appearance.TextAppearance.TextProperties.Font = new Font("Tahoma", 8);
//seriesitem.Appearance.TextAppearance.TextProperties.Color = Color.Black;
//seriesitem.Appearance.LabelAppearance.Dimensions.Margins = new ChartMargins(5);
seriesitem.Label.Appearance.Distance = 0;
//seriesitem.Label.Appearance.Position.Auto = true;
//seriesitem.Appearance.FillStyle.FillSettings.ComplexGradient = true;
seriesitem.Label.Appearance.LabelConnectorStyle.PenStyle = System.Drawing.Drawing2D.
DashStyle.Dash;
seriesitem.Label.Appearance.LabelConnectorStyle.Color = System.Drawing.
Color.Blue;
//Absolute positioning of Labels DZ
seriesitem.Label.Appearance.Position.Auto =
false;
seriesitem.Label.Appearance.Position.X = 245;
seriesitem.Label.Appearance.Position.Y = 45;
seriesitem.Label.Appearance.Position.AlignedPosition =
AlignedPositions.BottomRight;
seriesitem.Label.Appearance.RotationAngle = 45;
// seriesitem.Label.Appearance.LabelLocation = StyleSeriesItemLabel.ItemLabelLocation.Auto;
}
Please let me know what properties are needed to achieve this and if the labels can be positioned below the bottom of the bar graph. I am using Y axis only at this point.