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

group daily values to show day of week averages

2 Answers 21 Views
Charts
This is a migrated thread and some comments may be shown as answers.
dan
Top achievements
Rank 1
dan asked on 21 Jan 2014, 05:36 PM
Hello,

I have a datasource with daily values and I want to know if there is a way to group these values to show day of week averages (Monday, Tuesday, ...).

The goal for this is to show to users different options (based on this http://jsbin.com/oDOkAne/7/edit ) that will allow to see with the same datasource the daily, weekly, monthly, yearly values + the day of week values.

Example:
 var stats = [
                    { value: 10, date: new Date("2013/12/20") }, //Friday
                    { value: 10, date: new Date("2013/12/21") }, //Saturday
                    { value: 10, date: new Date("2013/12/22") }, //Sunday
                    { value: 20, date: new Date("2013/12/23") }, //Monday
                    { value: 20, date: new Date("2013/12/24") }, //Tuesday
                    { value: 20, date: new Date("2013/12/25") }, //Wednesday
                    { value: 20, date: new Date("2013/12/26") }, //Thursday
                    { value: 20, date: new Date("2013/12/27") }, //Friday
                    { value: 20, date: new Date("2013/12/28") }, //Saturday
                    { value: 20, date: new Date("2013/12/29") }, //Sunday
                    { value: 30, date: new Date("2013/12/30") }, //Monday
                    { value: 30, date: new Date("2013/12/31") }, //Tuesday
                ];

Will show the 7 following points (when agregate is "avg"):
Monday => 25
Tuesday => 25
Wednesday => 20
Thursday => 20
Friday => 15
Saturday => 15
Sunday => 15

Thank you,
Dan

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 23 Jan 2014, 04:15 PM
Hi Dan,

This scenario is not supported by Kendo UI Chart and there is no a suitable workaround I can suggest. Please accept my apologies for the inconvenience caused.

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
dan
Top achievements
Rank 1
answered on 23 Jan 2014, 04:19 PM
Hi Iliana,

Thank you for your answer.

No problem, I will manage this using multiple dataSources.

Kind regards,
Dan
Tags
Charts
Asked by
dan
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
dan
Top achievements
Rank 1
Share this question
or