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

Axis label format

7 Answers 117 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Chandana
Top achievements
Rank 1
Chandana asked on 29 Jun 2011, 06:29 PM
Hi,

I want to divide my Y-Axis label values by a million.
Setting the AutoRange property to true shows a "mil" beside the number.
Ex: 200,000,000 is shown as 200 mil.

But I want it to just show 200. If I set the AutoRange to false, what would the defaultlabelformat be?

Thanks & Regards,
Chandana

7 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 04 Jul 2011, 09:36 AM
Hello Chandana,

You can specify any Custom Numeric Format String to your Axis Labels. For your scenario - you can use the fact that using the "," custom specifier the number to be formatted is divided by 1000 for each comma and set the DefaultLabelFormat of the Axis to something like: "#VAL{0,,}".

Greetings,
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
Janaki
Top achievements
Rank 1
answered on 07 Jun 2013, 11:02 AM
Hi,

    im using rad chart in my project,

Im binding the chart x and y axis value from database. i want to bind some datas dynamiclly with the y value

For example 0 lt,5 lt,10 lt....and for something 0 kg,5 kg,10 kg like this i want in my y axis ...

i am to get tis values from database but how to bind with the chart...

  Chart.DefaultView.ChartArea.AxisY.DefaultLabelFormat = string.Format("{0}", QuarterSeries.unit);
0
Evgenia
Telerik team
answered on 12 Jun 2013, 07:09 AM
Hello Janaki,

 You can format the values along the y axis by using a standard IValueConverter. It will convert the default value, to whatever format/value suits your scenario best. You may find a sample demonstrating this approach in the following forum post.

Regards,
Evgenia
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Top achievements
Rank 1
answered on 13 Aug 2014, 02:30 AM
当我在做windows phone 一个图标上显示多条数据时,如何后台绑定数据。
横坐标能不能按时间自动增长,图表中的数据按照时间的顺序自动填充进去,
比如时间10:28能不能再横坐标上重复出现,如何使相同的横坐标不会自动合并
0
Martin Ivanov
Telerik team
answered on 13 Aug 2014, 12:25 PM
Hi,

I would ask you to post your question in English. This will help us to understand your requirement and assist you further.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Sumeet
Top achievements
Rank 1
answered on 19 Sep 2014, 08:46 PM
Hello Evgenia,

I used you example "#VAL{0,,}". But in the graph y axis show up like #val{0,,} screenshot is attached. I am using following code:

valueAxis: {
                    labels: {format: "#val{0,,}"},
                    line: {visible: true}
                },

Am I doing something wrong?

i need to get 1000000 to 1M
2000000 to 2M and so on
0
Martin Ivanov
Telerik team
answered on 23 Sep 2014, 07:20 AM
Hello Summet,

I noticed that your question is related to the Kendo UI chart. This is the Silverlight forum and this thread is related to the RadChart for Silverlight. Can you please post your question in new thread in the Kendo forum.

However, keep in mind that there is no default format string for such formatting. Instead you can consider using label template.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Chart
Asked by
Chandana
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Janaki
Top achievements
Rank 1
Top achievements
Rank 1
Martin Ivanov
Telerik team
Sumeet
Top achievements
Rank 1
Share this question
or