Commit 2aa6c063 authored by Kristian Tan's avatar Kristian Tan

format graph

parent 4c506a0a
......@@ -105,11 +105,10 @@ def main():
records = DailyUsage.query.all()
for record in records:
labels.append(record.date)
labels.append(date(record.date.year, record.date.month, record.date.day))
values.append(record.kwhUsed)
if record.kwhUsed > max:
max = record.kwhUsed
print(max)
template_data = {
'pins': pins,
......
......@@ -92,7 +92,7 @@
}
// get bar chart canvas
var mychart = document.getElementById("chart").getContext("2d");
steps = 10
steps = 0.0000001
max = {{ max }}
// draw bar chart
new Chart(mychart).Bar(barData, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment