From 8628915f557c9d577a4afc63d55f85e78d66d78b Mon Sep 17 00:00:00 2001 From: Pithon Kabiro <pithon.kabiro@hft-stuttgart.de> Date: Tue, 26 Oct 2021 14:36:56 +0200 Subject: [PATCH] Edit function: create series options line chart Rename references --- public/js/src_modules/chartLine.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/src_modules/chartLine.mjs b/public/js/src_modules/chartLine.mjs index 8a44bf1..cd698f9 100644 --- a/public/js/src_modules/chartLine.mjs +++ b/public/js/src_modules/chartLine.mjs @@ -33,10 +33,10 @@ const createSeriesOptionsForLineChart = function ( buildingIdsPhenomenonNamesArr ) { // An array of colors, in hexadecimal format, provided by the global Highcharts object - const seriesColors = Highcharts.getOptions().colors; + const seriesColorsArr = Highcharts.getOptions().colors; - // Create a copy of the colors array - const seriesColorsArr = [...seriesColors]; + // Create a local copy of the colors array + const seriesColorsForLineChartArr = [...seriesColorsArr]; // Create an array of seriesOptions objects // Assumes that the observation array of arrays and building IDs + phenomenon names array are of equal length @@ -53,7 +53,7 @@ const createSeriesOptionsForLineChart = function ( return { name: `${buildingIdsPhenomenonNamesArr[i]}`, data: formattedObsArray, - color: seriesColorsArr[i], + color: seriesColorsForLineChartArr[i], turboThreshold: Number.MAX_VALUE, // #3404, remove after 4.0.5 release }; }); -- GitLab