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

How do I have the X axis show a label every 20 pixels?

5 Answers 63 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
matt
Top achievements
Rank 1
matt asked on 21 Oct 2010, 06:47 PM
The problem is the labels at the bottom are too crowded together... I need some way for the chart to know this and to only give a x axis label ever 20 picels for example...

Can this be done ?

5 Answers, 1 is accepted

Sort by
0
matt
Top achievements
Rank 1
answered on 25 Oct 2010, 10:33 PM
no?

:\

0
Evgenia
Telerik team
answered on 26 Oct 2010, 11:26 AM
Hi matt,

You can get rid of label overlapping by rotating the Item Labels of XAxis 45 degrees for example.
Here is how you can achieve this:
<telerik:RadChart ID="RadChart1" runat="server">
            <PlotArea>
                <XAxis>
                    <Appearance>
                    <LabelAppearance RotationAngle="45"></LabelAppearance>
                    </Appearance>
                </XAxis>
            </PlotArea>
        </telerik:RadChart>

You can use an additional setting, which will improve the text quality for the rotated labels:
RadChart1.Appearance.TextQuality = Telerik.Charting.Styles.TextQuality.AntiAlias;

Best wishes,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
matt
Top achievements
Rank 1
answered on 26 Oct 2010, 03:07 PM
I know about that.. here is the picture attached...

It wants a x asix label for EVERY label.. ... How do I tell it to.. for example... make a lable for every 4 steps in the X axis? That make sense ?

0
Accepted
Evgenia
Telerik team
answered on 27 Oct 2010, 11:06 AM
Hi matt,

You can control the label step of the XAxis by using LabelStep property. It specifies the value indicating that only one out of n-axis labels should be visible, where n is the value of the property. For example if you want label on every 4 steps you can do this:
RadChart1.PlotArea.XAxis.LabelStep = 2;

I hope this information helps.

All the best,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
matt
Top achievements
Rank 1
answered on 27 Oct 2010, 04:09 PM
yes!
Tags
Chart (Obsolete)
Asked by
matt
Top achievements
Rank 1
Answers by
matt
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or