Text format with locale fails on iOS

2 posts, 0 answers
  1. Marcello
    Marcello avatar
    8 posts
    Member since:
    Mar 2017

    Posted 30 Jun Link to this post

    The values in the chart are exhibited as "%'.2f" on iOS while on Android it works fine, outputting something like "12,345.67".

    Since the textFormat documentation links to http://pubs.opengroup.org/onlinepubs/009695399/functions/printf.html I think it should as expected on both platforms.

    Here is the code block on iOS:

    <BarSeries tkCartesianSeries seriesName="inbound"
        [items]="inbound" categoryProperty="description"
        showLabels="true"
        valueProperty="value" selectionMode="none">
        <PointLabelStyle tkBarLabelStyle textFormat="%'.2f" strokeColor="Transparent"
            fillColor="white" textColor="#808080" textSize="12">
        </PointLabelStyle>
    </BarSeries>

     

    Here is the code block on Android:

    <BarSeries tkCartesianSeries seriesName="inbound"
        [items]="inbound" categoryProperty="description"
        showLabels="true"
        valueProperty="value" selectionMode="none">
        <PointLabelStyle tkBarLabelStyle textFormat="%,.2f" fillColor="#F4BB57" textColor="white" textSize="15"></PointLabelStyle>
    </BarSeries>

     

    Also tried with the same textFormat for both but th requires a slightly different syntax.

  2. Nikolay Iliev
    Admin
    Nikolay Iliev avatar
    294 posts

    Posted 03 Jul Link to this post

    Hi Marcello,

    Indeed the observed behavior is not consistent with the text format specifications and may result in unexpected results when using some formats. This problem was reported some time ago via this issue and the good news is that our development team has planned its fix for the upcoming release.
    Please keep track on the logged issue where the information for the related fix will be posted once a stable solution is found.

    Once again please excuse us for any inconvenience this issue might have caused! The next release is expected approximately at the end of July and the mid of August.

    Regards,
    Nikolay Iliev
    Progress Telerik
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Back to Top