Question to labels in bar series
Posted: Thu Feb 22, 2007 8:01 am
Hi,
I would like to add a label to each bar in multiple bar series. I use custom AxesLabelItems with the same x-value of the bar. If a bar of another series have the same x-value, the label of the previous bar will overlaped.
Example code:
Chart1.Axes.Bottom.Labels.Angle = 90;
Bar bar1 = new Bar(Chart1);
bar1.MultiBar = Multibars.Side;
bar1.Add(1, 0.6);
bar1.Add(2, 0.7);
bar1.Add(3, 0.9);
AxisItemLabel lbl1 = new AxisItemLabel(Chart1);
lbl1.Transparent = true;
lbl1.Value = 1;
lbl1.Text = "Bar 1 - Label 1";
bar1.Labels.Items.Add(lbl1);
Bar bar2 = new Bar(Chart1);
bar2.MultiBar = Multibars.Side;
bar2.Add(1, 0.3);
bar2.Add(2, 0.5);
bar2.Add(3, 0.4);
AxisItemLabel lbl2 = new AxisItemLabel(Chart1);
lbl2.Transparent = true;
lbl2.Value = 1;
lbl2.Text = "Bar2 - Label 2";
bar2.Labels.Items.Add(lbl2);
In this case the label of bar2 series overlapped the label of bar1. How can I place the labels exactly below the bars?
Thanks in advance,
Thomas
I would like to add a label to each bar in multiple bar series. I use custom AxesLabelItems with the same x-value of the bar. If a bar of another series have the same x-value, the label of the previous bar will overlaped.
Example code:
Chart1.Axes.Bottom.Labels.Angle = 90;
Bar bar1 = new Bar(Chart1);
bar1.MultiBar = Multibars.Side;
bar1.Add(1, 0.6);
bar1.Add(2, 0.7);
bar1.Add(3, 0.9);
AxisItemLabel lbl1 = new AxisItemLabel(Chart1);
lbl1.Transparent = true;
lbl1.Value = 1;
lbl1.Text = "Bar 1 - Label 1";
bar1.Labels.Items.Add(lbl1);
Bar bar2 = new Bar(Chart1);
bar2.MultiBar = Multibars.Side;
bar2.Add(1, 0.3);
bar2.Add(2, 0.5);
bar2.Add(3, 0.4);
AxisItemLabel lbl2 = new AxisItemLabel(Chart1);
lbl2.Transparent = true;
lbl2.Value = 1;
lbl2.Text = "Bar2 - Label 2";
bar2.Labels.Items.Add(lbl2);
In this case the label of bar2 series overlapped the label of bar1. How can I place the labels exactly below the bars?
Thanks in advance,
Thomas