Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Rykov
THSO.server
Commits
ca034ffd
Commit
ca034ffd
authored
Jun 09, 2020
by
Vladislav Rykov
Browse files
device data nans representation fixed
parent
5f1670bf
Changes
1
Show whitespace changes
Inline
Side-by-side
app/app/templates/new/public/device.html
View file @
ca034ffd
...
@@ -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%
'
}
};
};
...
...
Write
Preview
Supports
Markdown
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