Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
3 years ago
by
Pithon Kabiro
Browse files
Options
Download
Email Patches
Plain Diff
Add documentation for mapping function; line chart tweaks
parent
716ef393
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/js/appChart.js
+16
-3
public/js/appChart.js
with
16 additions
and
3 deletions
+16
-3
public/js/appChart.js
+
16
-
3
View file @
9d2a363c
...
@@ -6,6 +6,13 @@
...
@@ -6,6 +6,13 @@
export
const
BASE_URL
=
"
http://193.196.39.91:8080/frost-icity-tp31/v1.1
"
;
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
(
export
const
getDatastreamIdFromBuildingNumber
=
function
(
buildingNumber
,
buildingNumber
,
phenomenon
,
phenomenon
,
...
@@ -138,7 +145,7 @@ export const formatSTAResponseForHeatMap = function (obsArray) {
...
@@ -138,7 +145,7 @@ export const formatSTAResponseForHeatMap = function (obsArray) {
/**
/**
* Draw a heatmap using Highcharts library
* 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
* @returns {Object} Highcharts library heatmap object
*/
*/
export
const
drawHeatMapHC
=
function
(
formattedObsArrayForHeatmap
)
{
export
const
drawHeatMapHC
=
function
(
formattedObsArrayForHeatmap
)
{
...
@@ -248,7 +255,7 @@ export const formatSTAResponseForLineChart = function (obsArray) {
...
@@ -248,7 +255,7 @@ export const formatSTAResponseForLineChart = function (obsArray) {
/**
/**
* Draw a line chart using Highcharts library
* 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
* @returns {Object} Highcharts library line chart object
*/
*/
export
const
drawLineChartHC
=
function
(
formattedObsArrayForLineChart
)
{
export
const
drawLineChartHC
=
function
(
formattedObsArrayForLineChart
)
{
...
@@ -263,7 +270,13 @@ export const drawLineChartHC = function (formattedObsArrayForLineChart) {
...
@@ -263,7 +270,13 @@ export const drawLineChartHC = function (formattedObsArrayForLineChart) {
},
},
title
:
{
title
:
{
text
:
"
AAPL Stock Price
"
,
text
:
"
Inlet flow (Vorlauf)
"
,
"
align
"
:
"
left
"
,
},
subtitle
:
{
text
:
"
Temperature variation by hour in 2020
"
,
align
:
"
left
"
,
},
},
series
:
[
series
:
[
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets