Skip to content

Commit 2ac1af3

Browse files
[BugFix] Make paper_bgcolor transparent in PyWry backend (#6385)
* make paper_bgcolor transparent in PyWry backend * black --------- Co-authored-by: Henrique Joaquim <[email protected]>
1 parent 29dfc7b commit 2ac1af3

File tree

1 file changed

+7
-2
lines changed
  • openbb_platform/obbject_extensions/charting/openbb_charting/core

1 file changed

+7
-2
lines changed

openbb_platform/obbject_extensions/charting/openbb_charting/core/backend.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ def send_figure(
198198
self.check_backend()
199199
# pylint: disable=C0415
200200

201+
paper_bg = (
202+
"rgba(0,0,0,0)"
203+
if self.charting_settings.chart_style == "dark"
204+
else "rgba(255,255,255,0)"
205+
)
206+
201207
title = "Interactive Chart"
202208

203209
fig.layout.title.text = re.sub(
@@ -210,9 +216,8 @@ def send_figure(
210216
export_image = Path(export_image).resolve()
211217

212218
json_data = json.loads(fig.to_json())
213-
214219
json_data.update(self.get_json_update(command_location))
215-
220+
json_data["layout"]["paper_bgcolor"] = paper_bg
216221
outgoing = dict(
217222
html=self.get_plotly_html(),
218223
json_data=json_data,

0 commit comments

Comments
 (0)