This is a migrated thread and some comments may be shown as answers.

bar chart bar alignment issue

3 Answers 85 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 09 Jul 2008, 04:22 PM

Hi there,

I'm having an issue getting the bars aligned with XAxix.Items.TextBlock.Text (xaxis label). 

I have tried various versions of the following without any luck.

PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.

AlignedPositions.TopRight;

Any insight is appreciated.

I'm using the latest RadChart control.

thanks,
Rob

3 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 10 Jul 2008, 07:23 AM
Hi Rob,

I am not really sure about this part "getting the bars aligned".

This line
PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopRight;

will affect the positioning of X axis item labels.

For the bar labels you can use this code:
RadChart1.Series[0].Appearance.LabelAppearance.LabelLocation = StyleSeriesItemLabel.ItemLabelLocation.Inside;
RadChart1.Series[0].Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopRight;

Hope this helps.

Sincerely,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rob
Top achievements
Rank 1
answered on 10 Jul 2008, 02:46 PM
Thanks for the reply Ves.  Sorry for the confusion.

What I mean by "getting the bars aligned" is that the bars aren't lining up with item labels.  So you have a bar for day 3 but it's not above day 3 it's between day 2 and 3. 

Not sure it it matters that I'm adding the item labels dynamically by date range.  This specific example is from May 25 - June 25.

I tried:
PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopRight;

and TopLeft, center etc..

without any luck.  Any other suggestions?

Thanks,
Rob


0
Ves
Telerik team
answered on 10 Jul 2008, 04:44 PM
Hi Rob,

You can control this through XAxis.LayoutMode property. You can find more details here.

Regards,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
Rob
Top achievements
Rank 1
Answers by
Ves
Telerik team
Rob
Top achievements
Rank 1
Share this question
or