From 6b22e19090159b91d3df73158a586c569db05767 Mon Sep 17 00:00:00 2001 From: Nate Radebaugh Date: Fri, 18 Aug 2023 13:26:18 -0500 Subject: [PATCH] Make line/radar chart markers support transparent --- src/gen-charts.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gen-charts.ts b/src/gen-charts.ts index efe0c95e..b3d28400 100644 --- a/src/gen-charts.ts +++ b/src/gen-charts.ts @@ -899,7 +899,14 @@ function makeChartType (chartType: CHART_NAME, data: IOptsChartData[], opts: ICh strXml += ' ' if (opts.lineDataSymbolSize) strXml += `` // Defaults to "auto" otherwise (but this is usually too small, so there is a default) strXml += ' ' - strXml += ` ${createColorElement(opts.chartColors[obj._dataIndex + 1 > opts.chartColors.length ? Math.floor(Math.random() * opts.chartColors.length) : obj._dataIndex])}` + + const markerColor = opts.chartColors[obj._dataIndex + 1 > opts.chartColors.length ? Math.floor(Math.random() * opts.chartColors.length) : obj._dataIndex] + if (markerColor === 'transparent') { + strXml += ' '; + } else { + strXml += " ".concat(createColorElement(markerColor), ""); + } + strXml += ` ${createColorElement(opts.lineDataSymbolLineColor || seriesColor)}` strXml += ' ' strXml += ' '