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

How to change format of pie chart with MVVM Kendo?

1 Answer 65 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 15 Jun 2017, 10:28 AM

I have a pie chart. This is the code:

 

<div data-role="chart"data-legend="{ position: 'bottom' }"data-series-defaults="{ type: 'column' }"data-category-axis="{
                        field: 'name',
                    }"data-value-axis="[
                        { name: 'name'},
                    ]"data-series-colors="['#DDDDDD','#FFFF00','#FF0000','#00CC00']"data-series="[
                                { field: 'doc1', name: 'doc', labels: {visible: true} },
                                { field: 'doc2', name: 'doc', labels: {visible: true} },
                                { field: 'doc3', name: 'doc', labels: {visible: true} },
                                { field: 'doc4', name: 'doc', labels: {visible: true} }
                             ]"data-bind="source: DocSource,
                            events: { seriesHover: onSeriesHover }"></div>

I wuold like set data with '%' using MVVM of kendo

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 19 Jun 2017, 05:27 AM
Hello,

The format can be set the same way when using the declarative initialization - via the series or seriesDefaults labels format option e.g.
data-series-defaults="{ type: 'column', labels: { format: '{0}%' } }"
Please check this documentation topic for information on setting the options with the data attribute initialization.


Regards,
Daniel
Progress Telerik
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
Charts
Asked by
Federico
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or