Commit ca034ffd authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

device data nans representation fixed

parent 5f1670bf
...@@ -154,6 +154,9 @@ ...@@ -154,6 +154,9 @@
{% if total > 0 %} {% if total > 0 %}
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
// used to represent nans sent from the platform
var nan = null;
google.charts.load('current', {'packages':['corechart']}); google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(show_first_page); google.charts.setOnLoadCallback(show_first_page);
...@@ -169,7 +172,10 @@ ...@@ -169,7 +172,10 @@
var tscroll = init_scroll(); var tscroll = init_scroll();
function drawChart(dname, ddata) { function drawChart(dname, ddata) {
var data = google.visualization.arrayToDataTable(ddata); var data = new google.visualization.DataTable();
data.addColumn('datetime', 'Time');
data.addColumn('number', 'Data');
data.addRows(ddata);
var options = { var options = {
title: '{{ dev[0] }} > '+dname, title: '{{ dev[0] }} > '+dname,
...@@ -185,7 +191,7 @@ ...@@ -185,7 +191,7 @@
legend: { position: 'none' }, legend: { position: 'none' },
height: 600, height: 600,
/* width: 900, */ /* width: 900, */
// interpolateNulls: true, interpolateNulls: true,
chartArea: { left: '5%', width: '90%', height: '80%' } chartArea: { left: '5%', width: '90%', height: '80%' }
}; };
......
Supports Markdown
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