bito-code-review[bot] commented on PR #43456:
URL: https://github.com/apache/superset/pull/43456#issuecomment-5394994520
<!-- Bito Reply -->
The flagged issue is correct. The current implementation forces
`backgroundColor: 'transparent'` when re-rendering ECharts canvases for export,
which causes charts with solid backgrounds to lose their configured background
color. To resolve this, you should pass the chart's actual background color to
`renderToCanvas` instead of hardcoding `'transparent'`. You can retrieve the
background color from the ECharts instance configuration.
**superset-frontend/src/utils/downloadAsImage.tsx**
```
const hiResCanvas = instance.renderToCanvas({
pixelRatio: EXPORT_CANVAS_PIXEL_RATIO,
backgroundColor: instance.getOption().backgroundColor ||
'transparent',
});
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]