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

Bar chart Y axis label

4 Answers 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 20 Jul 2017, 10:49 AM

I have a bar chart on my report with hours of the day on the Y-axis. See the attached image. Instead of displaying 1-24 I would like it to display , etc

Is there a way to custom format these labels?

4 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 24 Jul 2017, 01:41 PM
Hi Craig,

This can be achieved with a custom format string set for the GraphAxis.LabelFormat property. For example, you can use "{0:h tt}" format string.

More detailed information about custom Date and Time Format Strings can be found in this article.

Hope this will help.


Regards,
Katia
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Craig
Top achievements
Rank 1
answered on 24 Jul 2017, 10:42 PM
Thanks. this doesn't work. The axis is not a date column, they are just numbers 1-24. When I add this format string in it seems to have no effect.
0
Craig
Top achievements
Rank 1
answered on 25 Jul 2017, 07:39 AM
Ignore that, I converted the column to be a date/time type and it is now ok. One thing I would like to know is how to ensure it always shows all bars even if the value is zero.
0
Katia
Telerik team
answered on 27 Jul 2017, 10:51 AM
Hello Craig,

If the value fo the series is zero, the bar will not be displayed. You can still display the DataPointLabel for this bar by setting Series.DataPointLabelStyle.Visible property to true.


Regards,
Katia
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Craig
Top achievements
Rank 1
Answers by
Katia
Telerik team
Craig
Top achievements
Rank 1
Share this question
or