Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
energy
bmon
Commits
a6e78433
Commit
a6e78433
authored
Feb 05, 2015
by
Alan Mitchell
Browse files
Protect against Error with no Chart Values
parent
577cb371
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
bmsapp/reports/timeseries.py
bmsapp/reports/timeseries.py
+2
-1
No files found.
bmsapp/reports/timeseries.py
View file @
a6e78433
...
...
@@ -50,7 +50,8 @@ class TimeSeries(basechart.BaseChart):
times
=
ser
.
index
# Highcharts uses milliseconds for timestamps, and convert to float because weirdly, integers have
# problems with JSON serialization.
times
=
times
*
1000.0
if
len
(
times
):
times
=
times
*
1000.0
# Create series data, each item being an [ts, val] pair.
# The 'yAxis' property indicates the id of the Y axis where the data should be plotted.
# Our convention is to use the unit label for the axis as the id.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment