Commit 9d2a363c authored by Pithon Kabiro's avatar Pithon Kabiro
Browse files

Add documentation for mapping function; line chart tweaks

parent 716ef393
......@@ -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: [
......
Markdown is supported
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