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

Local format value in kendo chart labels - tooltip

0 Answers 11 Views
Charts
This is a migrated thread and some comments may be shown as answers.
alex
Top achievements
Rank 1
Iron
Veteran
alex asked on 05 Feb 2021, 09:40 AM

I would like to format the numerical value of the labels and the tooltip with the Italian monetary value, with 2 decimal digits separated by commas and the thousands separated by a point.
something like this:

125.500,45 €

<kendo-chart
            renderAs="canvas"
            [pannable]="{ lock: 'y' }"
            [zoomable]="{ mousewheel: { lock: 'y' } }"
            (seriesClick)="onSeriesClick($event)">
        <kendo-chart-series>
          <kendo-chart-series-item
                  type="pie"
                  [data]="datasource"
                  field="valTot"
                  categoryField="category" [overlay]="{gradient: 'roundedBevel'}">
                 <kendo-chart-series-item-labels
                     [format]="'c2'"
                     color="#000000" background="none">
                 </kendo-chart-series-item-labels>
            <kendo-chart-series-item-tooltip>
           <ng-template let-value="value" let-category="category" let-series="series" let-dataItem="dataItem">
                <div>{{category}}: {{value.toLocaleString('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2})}} €</div>
                   </ng-template>
           </kendo-chart-series-item-tooltip>
        </kendo-chart-series-item>
      </kendo-chart-series>
 </kendo-chart>

No answers yet. Maybe you can help?

Tags
Charts
Asked by
alex
Top achievements
Rank 1
Iron
Veteran
Share this question
or