We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
paper_bgcolor
1 parent 29dfc7b commit 2ac1af3Copy full SHA for 2ac1af3
openbb_platform/obbject_extensions/charting/openbb_charting/core/backend.py
@@ -198,6 +198,12 @@ def send_figure(
198
self.check_backend()
199
# pylint: disable=C0415
200
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
+
207
title = "Interactive Chart"
208
209
fig.layout.title.text = re.sub(
@@ -210,9 +216,8 @@ def send_figure(
210
216
export_image = Path(export_image).resolve()
211
217
212
218
json_data = json.loads(fig.to_json())
213
-
214
219
json_data.update(self.get_json_update(command_location))
215
220
+ json_data["layout"]["paper_bgcolor"] = paper_bg
221
outgoing = dict(
222
html=self.get_plotly_html(),
223
json_data=json_data,
0 commit comments