Commit b8025c77 by Torkel Ödegaard Committed by GitHub

Sparkline: Fixes issue with sparkline that sent in custom fillColor instead of fillOpacity (#29825)

* Sparkline: Fixes issue with sparkline that sent in custom fillColor instead of fillOpacity

* Updated
parent c2cad26c
......@@ -73,14 +73,19 @@ export class UPlotSeriesBuilder extends PlotConfigBuilder<SeriesProps, Series> {
let fillConfig: any | undefined;
let fillOpacityNumber = fillOpacity ?? 0;
if (fillColor && fillOpacityNumber !== 0) {
if (fillColor) {
fillConfig = {
fill: tinycolor(fillColor)
.setAlpha(fillOpacityNumber / 100)
.toRgbString(),
fill: fillColor,
};
}
if (fillOpacityNumber !== 0) {
fillConfig.fill = tinycolor(fillColor ?? lineColor)
.setAlpha(fillOpacityNumber / 100)
.toRgbString();
}
return {
scale: scaleKey,
spanGaps: spanNulls,
......
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