Commit 48389746 authored by Pithon Kabiro's avatar Pithon Kabiro
Browse files

Edit function: create series options scatter plot

- Rename references

- Do not reverse the array of colors
parent 8628915f
...@@ -136,14 +136,14 @@ const createSeriesOptionsForScatterPlot = function ( ...@@ -136,14 +136,14 @@ const createSeriesOptionsForScatterPlot = function (
// An array of colors, in hexadecimal format, provided by the global Highcharts object // An array of colors, in hexadecimal format, provided by the global Highcharts object
const highchartsColorsArr = Highcharts.getOptions().colors; const highchartsColorsArr = Highcharts.getOptions().colors;
// Create a reversed copy of the colors array // Create a local copy of the colors array
const highchartsColorsReversedArr = [...highchartsColorsArr].reverse(); const highchartsColorsForScatterPlotArr = [...highchartsColorsArr];
// Opacity value for symbol // Opacity value for symbol
const SERIES_SYMBOL_COLOR_OPACITY = ".3"; const SERIES_SYMBOL_COLOR_OPACITY = ".3";
// Create array of colors in RGBA format // Create array of colors in RGBA format
const seriesColors = highchartsColorsReversedArr.map( const seriesColorsArr = highchartsColorsForScatterPlotArr.map(
(hexColorCode) => (hexColorCode) =>
`rgba(${convertHexColorToRGBColor( `rgba(${convertHexColorToRGBColor(
hexColorCode hexColorCode
...@@ -169,7 +169,7 @@ const createSeriesOptionsForScatterPlot = function ( ...@@ -169,7 +169,7 @@ const createSeriesOptionsForScatterPlot = function (
return { return {
name: `${phenomenonNamesYAxisArr[i]}, ${phenomenonNameXAxis}`, name: `${phenomenonNamesYAxisArr[i]}, ${phenomenonNameXAxis}`,
data: formattedObsArray, data: formattedObsArray,
color: seriesColors[i], color: seriesColorsArr[i],
}; };
}); });
} }
......
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