Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
iCity
EnergyDashboard
Commits
8628915f
Commit
8628915f
authored
Oct 26, 2021
by
Pithon Kabiro
Browse files
Edit function: create series options line chart
Rename references
parent
dacc1844
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/js/src_modules/chartLine.mjs
View file @
8628915f
...
...
@@ -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
seriesColors
Arr
=
Highcharts
.
getOptions
().
colors
;
// Create a copy of the colors array
const
seriesColorsArr
=
[...
seriesColors
];
// Create a
local
copy of the colors array
const
seriesColors
ForLineChart
Arr
=
[...
seriesColors
Arr
];
// 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
:
seriesColors
ForLineChart
Arr
[
i
],
turboThreshold
:
Number
.
MAX_VALUE
,
// #3404, remove after 4.0.5 release
};
});
...
...
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