use c3 for stacked spline

This commit is contained in:
Eric Hulburd
2016-03-08 15:21:16 -06:00
parent bfdebcf8f9
commit 2dd9389694
12 changed files with 249 additions and 93 deletions

View File

@@ -24,16 +24,20 @@ class PowerDatum {
return house.toDate(power_datum.data.time);
}
get net_consumption(){
return Math.max(0, Math.round(this.data.consumption - this.data.production));
}
get time_to_s(){
var power_datum = this,
moment_tz = moment.tz(power_datum.data.time * 1000, power_datum.house.data.timezone);
return moment_tz.format('YYYY-MM-DD HH:mm');
}
get consumption_to_s(){
get consumption(){
var power_datum = this;
return Math.round(power_datum.data.consumption);
}
get production_to_s(){
get production(){
var power_datum = this;
return Math.round(power_datum.data.production);
}