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

Legend Label with percentage

1 Answer 76 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Plinio
Top achievements
Rank 1
Plinio asked on 14 Sep 2011, 10:04 PM
Hi i want customize my percentage  in chart,  i have the value 12.5 but when i use  

       myChart.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "#VAL{#,00%}";    show: 1.250% 

      -> i need show in chart 12,50%

i also try use 
         myChart.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "p"; but show 1.250,00
                                                           

 

    myChart.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "#VAL{#,#.00%}"; show 1.250,00

I tried several options without success, would have something to culture? I would use pt-BR.

Thanks,
Best Regards.

1 Answer, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 20 Sep 2011, 11:44 AM
Hello Plinio,

First of all - yes, the Custom Numeric Format Strings are Culture dependant. To be able to format the 12.5 to 12,50 for example you should set the following format:
RadChart1.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "#VAL{#0.00}";

Also have in mind that the % added to the format string multiplies a number by 100 and inserts a localized percentage symbol in the result string. However in your case there is no need of this. Use the above format and just append the % char to the current YAxis Label string.

Kind regards,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Plinio
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or