Commit 4e1cab1e by Torkel Ödegaard Committed by GitHub

GraphNG: Do not set fillColor from GraphNG only opacity (#29851)

* GraphNG: Do not set fillColor from GraphNG only opacity

* use color settings if they exist

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
parent f3694935
......@@ -157,14 +157,13 @@ export const GraphNG: React.FC<GraphNGProps> = ({
builder.addSeries({
scaleKey,
drawStyle: customConfig.drawStyle!,
lineColor: seriesColor,
lineColor: customConfig.lineColor ?? seriesColor,
lineWidth: customConfig.lineWidth,
lineInterpolation: customConfig.lineInterpolation,
showPoints,
pointSize: customConfig.pointSize,
pointColor: seriesColor,
pointColor: customConfig.pointColor ?? seriesColor,
fillOpacity: customConfig.fillOpacity,
fillColor: seriesColor,
spanNulls: customConfig.spanNulls || false,
});
......
......@@ -81,9 +81,11 @@ export class UPlotSeriesBuilder extends PlotConfigBuilder<SeriesProps, Series> {
}
if (fillOpacityNumber !== 0) {
fillConfig.fill = tinycolor(fillColor ?? lineColor)
.setAlpha(fillOpacityNumber / 100)
.toRgbString();
fillConfig = {
fill: tinycolor(fillColor ?? lineColor)
.setAlpha(fillOpacityNumber / 100)
.toRgbString(),
};
}
return {
......
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