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
9d2a363c
Commit
9d2a363c
authored
Jun 24, 2021
by
Pithon Kabiro
Browse files
Add documentation for mapping function; line chart tweaks
parent
716ef393
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/js/appChart.js
View file @
9d2a363c
...
...
@@ -6,6 +6,13 @@
export
const
BASE_URL
=
"
http://193.196.39.91:8080/frost-icity-tp31/v1.1
"
;
/**
* Retrieve the datastream ID that corresponds to a particular building
* @param {*} buildingNumber Integer representing the building ID
* @param {*} phenomenon String representing the phenomenon of interest
* @param {*} samplingRate String representing the sampling rate of the observations
* @returns {Number} Datastream corresponding to the input building
*/
export
const
getDatastreamIdFromBuildingNumber
=
function
(
buildingNumber
,
phenomenon
,
...
...
@@ -138,7 +145,7 @@ export const formatSTAResponseForHeatMap = function (obsArray) {
/**
* Draw a heatmap using Highcharts library
* @param {Array}
obsArray
Response from SensorThings API
* @param {Array}
formattedObsArrayForHeatmap
Response from SensorThings API
formatted for use in a heatmap
* @returns {Object} Highcharts library heatmap object
*/
export
const
drawHeatMapHC
=
function
(
formattedObsArrayForHeatmap
)
{
...
...
@@ -248,7 +255,7 @@ export const formatSTAResponseForLineChart = function (obsArray) {
/**
* Draw a line chart using Highcharts library
* @param {Array}
obsArray
- Response from SensorThings API
* @param {Array}
formattedObsArrayForLineChart
- Response from SensorThings API
formatted for use in a line chart
* @returns {Object} Highcharts library line chart object
*/
export
const
drawLineChartHC
=
function
(
formattedObsArrayForLineChart
)
{
...
...
@@ -263,7 +270,13 @@ export const drawLineChartHC = function (formattedObsArrayForLineChart) {
},
title
:
{
text
:
"
AAPL Stock Price
"
,
text
:
"
Inlet flow (Vorlauf)
"
,
"
align
"
:
"
left
"
,
},
subtitle
:
{
text
:
"
Temperature variation by hour in 2020
"
,
align
:
"
left
"
,
},
series
:
[
...
...
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