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