label formattig issue with comma

6 posts, 0 answers
  1. Srikanth
    Srikanth avatar
    14 posts
    Member since:
    Mar 2012

    Posted 09 Feb 2016 Link to this post

    label formattig issue with comma

     

    for example ,

     

    123456789

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

    see attached file

  2. Stamo Gochev
    Admin
    Stamo Gochev avatar
    186 posts

    Posted 11 Feb 2016 Link to this post

    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
  3. MBEN
    MBEN avatar
    174 posts
    Member since:
    Nov 2011

    Posted 29 Mar in reply to Stamo Gochev Link to this post

    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();
  4. Stamo Gochev
    Admin
    Stamo Gochev avatar
    186 posts

    Posted 03 Apr Link to this post

    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.
  5. MBEN
    MBEN avatar
    174 posts
    Member since:
    Nov 2011

    Posted 03 Apr in reply to Stamo Gochev Link to this post

    I submitted a support ticket with a runnable project on the same.
  6. Stamo Gochev
    Admin
    Stamo Gochev avatar
    186 posts

    Posted 06 Apr Link to this post

    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.
Back to Top