Adding week aggregation with no age limit + small big fix where charts did cast all floating data points to int.
Former-commit-id: e8f027e2272271f1e54a5bb822529df7a8af6a6c
This commit is contained in:
parent
5352f876e9
commit
14608d80eb
5 changed files with 44 additions and 51 deletions
|
|
@ -12,6 +12,10 @@
|
|||
<H1>All History (kWh/day)</H1>
|
||||
<div id="day-power-chart" style="height:450px;"></div>
|
||||
</div>
|
||||
<div class="row placeholders">
|
||||
<H1>All History (kWh/week)</H1>
|
||||
<div id="week-power-chart" style="height:450px;"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
|
|
@ -40,6 +44,13 @@
|
|||
{ y: Date.now() }
|
||||
]
|
||||
);
|
||||
chartData("week-power-chart",
|
||||
[{{#weekData}}
|
||||
{ y: {{.timestamp}}, "{{.username}}": {{.data}} },
|
||||
{{/weekData}}
|
||||
{ y: Date.now() }
|
||||
]
|
||||
);
|
||||
});
|
||||
var userArray = [ {{#username}} "{{.getUsername()}}", {{/username}} ];
|
||||
function chartData(elementId, data){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue