Skip to content

Commit

Permalink
set background color to white for d3 output
Browse files Browse the repository at this point in the history
  • Loading branch information
akissinger committed May 3, 2024
1 parent 6b6cf68 commit 5a6b2f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyzx/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def draw_d3(
with open(os.path.join(settings.javascript_location, 'zx_viewer.inline.js'), 'r') as f:
library_code = f.read() + '\n'

text = """<div style="overflow:auto" id="graph-output-{id}"></div>
text = """<div style="overflow:auto; background-color: white" id="graph-output-{id}"></div>
<script type="module">
var d3;
if (d3 == null) {{ d3 = await import("https://cdn.skypack.dev/d3@5"); }}
Expand All @@ -361,7 +361,7 @@ def draw_d3(
if get_mode() == "notebook":
display(HTML(text))
else:
d = html.DIV(style={"overflow": "auto"}, id="graph-output-{}".format(graph_id))
d = html.DIV(style={"overflow": "auto", "background-color": "white"}, id="graph-output-{}".format(graph_id))
source = """
require(['zx_viewer'], function(zx_viewer) {{
zx_viewer.showGraph('#graph-output-{0}',
Expand Down

0 comments on commit 5a6b2f6

Please sign in to comment.