Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
iCity
EnergyDashboard
Commits
e50e245c
Commit
e50e245c
authored
Jun 28, 2021
by
Sven Schneider
Browse files
minor. removed unused function from aggregation.js.
parent
49b24fe4
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/js/aggregation.js
View file @
e50e245c
...
...
@@ -25,26 +25,6 @@ function convertArray2JSON(arr) {
}
function
createDateFromDateTimeString
(
jsonData
)
{
let
datx
=
[];
let
daty
=
[];
const
MONTH
=
[
'
Jan
'
,
'
Feb
'
,
'
Mar
'
,
'
Apr
'
,
'
May
'
,
'
Jun
'
,
'
Jul
'
,
'
Aug
'
,
'
Sep
'
,
'
Oct
'
,
'
Nov
'
,
'
Dec
'
];
for
(
var
u
=
0
;
u
<
jsonData
.
length
;
u
++
)
{
daty
.
push
(
jsonData
[
u
].
temperature
);
let
date
=
new
Date
(
jsonData
[
u
].
datetime
);
let
datum
=
date
.
getDate
();
let
month
=
MONTH
[
date
.
getMonth
()];
let
hour
=
date
.
getHours
()
+
"
:00
"
;
let
newDateStr
=
datum
+
"
/
"
+
month
+
"
-
"
+
hour
;
datx
.
push
(
newDateStr
);
}
return
[
datx
,
daty
];
}
/**
* Format the response from SensorThings API to make it suitable for heatmap
* @param {Array} obsArray Response from SensorThings API as array
...
...
public/js/appCesium.js
View file @
e50e245c
...
...
@@ -343,8 +343,8 @@ const activate3DTileFeaturePicking = function() {
console
.
log
(
err
);
})
.
then
((
observationArr
)
=>
{
var
agg
=
aggregateResponse
(
observationArr
,
0
,
'
m
i
n
'
);
console
.
log
(
agg
);
var
agg
=
aggregateResponse
(
observationArr
,
0
,
'
m
ea
n
'
);
//
console.log(agg);
drawHeatMapHC
(
formatSTAResponseForHeatMap
(
agg
));
drawLineChartHC
(
formatSTAResponseForLineChart
(
agg
));
});
...
...
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