Any help would be very much appreciated.
Thank you.
Sincerely,
Jeff
6 Answers, 1 is accepted
Unfortunately, it is not possible to alternate the X axis labels this way. As you cannot leave any label out, the LabelStep property of X axis would not help here -- it can be used to force the chart to display only certain labels like every other or every third label.
So, the only way to show all of them without overlapping is to rotate them. You can use an additional setting, which will improve the text quality for the rotated labels:
RadChart1.Appearance.TextQuality = Telerik.Charting.Styles.TextQuality.AntiAlias;
Hope this is applicable.
Best regards,
Ves
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
All the text elements in RadChart have border, which is transparent by default. All you need to do is provide a color for that border. Additionally, you can set the border style and width:
<XAxis> |
<Appearance> |
<LabelAppearance RotationAngle="20"> |
<Border Color="Red" PenStyle="Dot" Width="1" /> |
</LabelAppearance> |
</Appearance> |
</XAxis> |
Hope this helps.
Best wishes,
Ves
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Thanks! One more small question. I need to format my Yaxis labels. Problem is...
this
.RadChart1.PlotArea.YAxis.Appearance.CustomFormat = "{0:#,#;(#,#);0}";
does not yield the correct results.
And neither does...
this.RadChart1.PlotArea.YAxis.Appearance.CustomFormat = "0:#,#;(#,#);0";
I basically need two requirements:
a. That a comma appears after every 3 digits.
b. That negative numbers are displayed with parenthesis instead of a negative sign.
You can probably see I was trying to fullfill those requirements with the code above. If anyone can lend me some helpful tips or advice, I would appreciate it.
Thanks.
Sincerely,
Jeff
RadChart will accept all the valid Standard Numeric Format Strings and Custom Numeric Format Strings. So, as long as your format string works in a call to ToString() method, it will work as a custom format for the Y axis.
Here is how you can achieve this:
this.RadChart1.PlotArea.YAxis.Appearance.CustomFormat = "#,#;(#,#)";
Best regards,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Hi Jef,
Bit late, but I was looking for something similar. Had very long X-labels and didn't want to rotate or abbreviate.
So all I did was pop every second label's text to another line.
For i As Integer = 1 To RadChart1.PlotArea.XAxis.Items.Count - 1 Step 2 |
RadChart1.PlotArea.XAxis.Item(i).TextBlock.Text = vbCrLf & RadChart1.PlotArea.XAxis.Item(i).TextBlock.Text |
Next |
Hope this helps.