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

Changing the Format

5 Answers 130 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 2
Michael asked on 05 Mar 2008, 01:21 PM
I'm trying to set the format to currency for the numbers that sit on top of the horizontal bars in my graph.  I was able to do this quite easily for the Y-axis by setting the ValueFormat = Currency, but I'm not sure how this is done for the numbers in the actual bar graph itself.

Thanks.

5 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 06 Mar 2008, 10:05 AM
Hello Michael,

You can use DefaultLabelValue property of the ChartSeries. Set it to "#Y{C}". You can find more details in this help topic:

http://www.telerik.com/help/aspnet/chart/?UnderstandingElementsSeriesDefaultValues.html

Hope this helps.

Sincerely yours,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael
Top achievements
Rank 2
answered on 06 Mar 2008, 12:36 PM
Interesting - I can see the change at design time but when I run the project the dollar values aren't there...
0
Giuseppe
Telerik team
answered on 06 Mar 2008, 02:29 PM
Hello Michael,

We are unable to reproduce any problem with the describe approach -- please review the attached sample application and let us know how it goes.


Regards,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael
Top achievements
Rank 2
answered on 06 Mar 2008, 04:33 PM
Seems like the RadChart doesn't like my objectdatasource.  Here's an update:

1.) Your stand-alone project works just fine.
2.) Ripping your chart code and placing it in my page with the other charts that don't work properly, works fine.
3.) Taking your chart example and giving it a datasourceid of my objectdatasource is problematic.  It does not show the formatted $ properly.

My objectdatasource pulls back a datatable.  The query behind it does a sum() of a float column in SQL Server.

Keep in mind, the designer shows the correct currency format.  However, at runtime I'm getting one long string of digits.

P.S - my dollar amounts are in the millions...


0
Giuseppe
Telerik team
answered on 10 Mar 2008, 12:08 PM
Hi Michael,

We are still unable to reproduce the problem on our end. Could you review the modified sample application that uses an ObjectDataSource control and let us know how can we observe the erroneous issue.

Looking forward to your reply.


Sincerely yours,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
Michael
Top achievements
Rank 2
Answers by
Ves
Telerik team
Michael
Top achievements
Rank 2
Giuseppe
Telerik team
Share this question
or