how to aggregate in pie/donut chart?

1 Answer 133 Views
Charts Data Source General Discussions
Nazareth
Top achievements
Rank 1
Nazareth asked on 24 Aug 2021, 09:46 PM

Hey there, 

 

I am using Data query APIs to groupBy my data by priorities:

  this.piechartData = groupBy(chartData, [{field:"priority"}]);

Then I want to count the items per priority value to build the piechart. However, the aggregate="count" is not working for me. 

 

Is there

<kendo-chart>
                <kendo-chart-series>
                  <kendo-chart-series-item
                    type="donut"
                    *ngFor="let item of piechartData"
                    [data]="item.items"
                    [name]="item.value"
                    categoryField="priority"
                    aggregate="count"
                    field="taskName">
                  </kendo-chart-series-item>
                </kendo-chart-series>
                <kendo-chart-legend [visible]="false"></kendo-chart-legend>
            </kendo-chart>

a way around to do this?

I used this approach for barcharts and linecharts before and it worked.

 

Regards,

Nazareth

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 27 Aug 2021, 03:30 PM

Hello, Nazareth,

Please check our Aggregate Pie Chart article which should guide you to the correct configuration. If it does not help you to resolve the problem, kindly provide a small runnable dojo example where I can observe the problem.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Charts Data Source General Discussions
Asked by
Nazareth
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or