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
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