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

[Solved] Y Axis Formatting

3 Answers 175 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Rob Diamant
Top achievements
Rank 1
Rob Diamant asked on 30 Apr 2009, 10:29 PM
I am creating a Line chart from vb and need to manage the formatting of the Y Axis values. For example, data value is 11,000,000 so I want the Y Axis to display 11 and I will set the AxisLabel.Textblock.Text = "Revenue (Millions)".

I was able to do this with a single series by having two columns in my dataset, one for the real value and one for the display. Then plotting the display and setting the tooltip to show the real value (as not to clutter the chart). However, now I have multiple series (4-8) and this trick no longer works, the value is always assigned to the last column of data regardless of setting the .DataYColumn.

Any suggestions would be helpful.
Rob

3 Answers, 1 is accepted

Sort by
0
Dessy
Telerik team
answered on 04 May 2009, 12:39 PM
Hi Rob Diamant,

In order to achieve this, you could use the YAxis appearance properties for label formatting - ValueFormat and CustomFormat.

ValueFormat
is an enumeration and CustomFormat can take   Standard Numeric Formats
 and   Custom Numeric Formats   values.
Here is an example how to generate Custom Format Label  showing the values in millions:

<YAxis >    
     <Appearance CustomFormat="#,,">     
     </Appearance>    
</YAxis>    
 

Hope that helps.

Best wishes,
Dessy
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.
0
Rob Diamant
Top achievements
Rank 1
answered on 27 May 2009, 01:09 PM
So what format would you use to display only the million's digit only?
0
Ves
Telerik team
answered on 01 Jun 2009, 12:22 PM
Hello Rob,

I believe the answer, provided by Dessy shows it -- you can use this format string: "#,,". Does it not work on your side?

All the best,
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.
Tags
Chart (Obsolete)
Asked by
Rob Diamant
Top achievements
Rank 1
Answers by
Dessy
Telerik team
Rob Diamant
Top achievements
Rank 1
Ves
Telerik team
Share this question
or