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

label formattig issue with comma

5 Answers 173 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Srikanth
Top achievements
Rank 1
Srikanth asked on 09 Feb 2016, 06:44 AM

label formattig issue with comma

 

for example ,

 

123456789

i need to display it as 1,23,456,789

see attached file

5 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 11 Feb 2016, 01:45 PM
Hi Srikanth,

If you need more information on how to format numbers, you can have a look at our help article on this topic.

On the other hand, if there is a problem with this functionality, can you send me a sample page that reproduces the issue, so I can inspect it on my side?

In addition, it will be very helpful if you can provide me with more information on the following things:
  1. Do you use English culture for the page and do you need to support other cultures as well?
  2. Is there a ClientTemplate or a DataFormatString set for the labels of the series?
The above details and the testing page will allow me to give you further assistance on the matter, so your effort will be highly appreciated.

Regards,
Stamo Gochev
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
MBEN
Top achievements
Rank 2
Veteran
answered on 29 Mar 2017, 05:15 PM

I am having a similar issue where the commas do not show up with a currency format.

I declare my bar series in code behind. Below is my code:

BarSeries barSeries = new BarSeries();
 
    //configure the series
    barSeries.DataFieldY = "yValue";
    barSeries.ColorField = "colorValue";
    barChart.PlotArea.XAxis.DataLabelsField = "xValue";
    string template = "#=kendo.format(\\'{0:C2}\\', dataItem.yValue)#";
    string tooltipTemplate = "#= dataItem.xValue# (#=kendo.format(\\'{0:C2}\\', dataItem.yValue)#)";
         
    barSeries.LabelsAppearance.ClientTemplate = template;
    barSeries.TooltipsAppearance.ClientTemplate = tooltipTemplate;
    barSeries.LabelsAppearance.Position = Telerik.Web.UI.HtmlChart.BarColumnLabelsPosition.OutsideEnd;
    barSeries.LabelsAppearance.TextStyle.Margin = "0";
    barSeries.LabelsAppearance.TextStyle.FontFamily = "proxima-nova, arial, sans-serif";
    barSeries.LabelsAppearance.TextStyle.FontSize = Unit.Pixel(12);
    barSeries.LabelsAppearance.TextStyle.Bold = true;
 
    barChart.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0:C2}";
    barChart.PlotArea.Series.Add(barSeries);
 
    //databind the chart
    barChart.DataSource = GetData(xValues, yValues, colors, rowCount);
    barChart.DataBind();
0
Stamo Gochev
Telerik team
answered on 03 Apr 2017, 08:11 AM
Hi,

Can you try the ideas from the following localization article and inform me if you are able to display the data in the format you want:

http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/accessibility-and-internationalization/localization

If not, can you modify your example, so that it shows which culture are you using and send a hard-coded list of values that you get from the GetData() method? This will allow me to investigate the case and give you further suggestions.

Regards,
Stamo Gochev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
MBEN
Top achievements
Rank 2
Veteran
answered on 03 Apr 2017, 08:29 PM
I submitted a support ticket with a runnable project on the same.
0
Stamo Gochev
Telerik team
answered on 06 Apr 2017, 05:21 AM
Hello,

A member of the support team will have a look at your ticket and provide you with suggestions about your questions.

Regards,
Stamo Gochev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Chart (HTML5)
Asked by
Srikanth
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
MBEN
Top achievements
Rank 2
Veteran
Share this question
or