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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user