Commit 6838b0dd authored by Pithon Kabiro's avatar Pithon Kabiro
Browse files

Edit function: create full title for chart

Create a full title for line and column charts.

Ensure that title contains all the selected data points when
aggregation is selected. Before this fix, only the first data point
was included
parent 4c983cf6
......@@ -32,7 +32,7 @@
<!-- Higcharts -->
<!-- `highcharts.js` does not play well with `highstock.js`; see: https://www.highcharts.com/errors/16/-->
<!-- <script src="https://code.highcharts.com/highcharts.js"></script> -->
<!-- <script src="https://code.highcharts.com/highcharts.js"></script> -->
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/data.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
......
......@@ -152,7 +152,7 @@ LOAD_DETAILED_BLDG225
/**
* Activate feature picking for the displayed 3DTiles
* @param {*}
* @returns {undefined}
* @returns {undefined} undefined
*/
const activate3DTileFeaturePicking = function () {
// HTML overlay for showing feature name on mouseover
......
......@@ -25,6 +25,7 @@ const createTimeStringsForInterval = function (phenomenonSamplingRate) {
if (phenomenonSamplingRate === fifteenMinutes) {
return [startTime, endTimeFifteenMinutes];
}
// 60 min sampling rate
if (phenomenonSamplingRate === sixtyMinutes) {
return [startTime, endTimeSixtyMinutes];
......
......@@ -148,7 +148,7 @@ const drawColumnChartHighcharts = function (
yAxis: {
min: 0,
title: {
text: "Rainfall (mm)",
text: `${phenomenonName} [${unitOfMeasurementSymbol}]`,
},
},
......
......@@ -266,7 +266,7 @@ const createFullTitleForLineOrColumnChart = function (
return `${createPartialTitleForLineOrColumnChart(
aggregationInterval,
aggregationType
)} ${phenomenonNamesArr[0]}`;
)}: ${createCombinedTextDelimitedByComma(phenomenonNamesArr)}`;
};
/**
......
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