From 56951b4eb11001fabafbc91eb7950a5f120b67ae Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 29 Sep 2022 11:11:48 +0200 Subject: [PATCH] fix: avoid ES2022 functions (#1300) (#1344) --- src/visualizations/config/generators/highcharts/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/visualizations/config/generators/highcharts/index.js b/src/visualizations/config/generators/highcharts/index.js index a129f9f8f..78e14432f 100644 --- a/src/visualizations/config/generators/highcharts/index.js +++ b/src/visualizations/config/generators/highcharts/index.js @@ -30,13 +30,17 @@ function drawLegendSymbolWrap() { this.chart.renderer .path(['M', x, ys, 'A', 1, 1, 0, 0, 0, x, ye, 'V', ys]) .attr({ - fill: legends.at(legends.length >= 5 ? 1 : 0).color, + fill: legends[legends.length >= 5 ? 1 : 0].color, }) .add(this.legendGroup) this.chart.renderer .path(['M', x, ye, 'A', 1, 1, 0, 0, 0, x, ys, 'V', ye]) .attr({ - fill: legends.at(legends.length >= 5 ? -2 : -1).color, + fill: legends[ + legends.length >= 5 + ? legends.length - 2 + : legends.length - 1 + ].color, }) .add(this.legendGroup) } else {