Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7f17018

Browse filesBrowse files
matthewwardropjonmmease
authored andcommitted
Fix honouring of validate=False for interactive plots. (plotly#1576)
All renderers should skip validation since this is handled upstream
1 parent acc9421 commit 7f17018
Copy full SHA for 7f17018

File tree

Expand file treeCollapse file tree

1 file changed

+19
-13
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+19
-13
lines changed

‎plotly/io/_base_renderers.py

Copy file name to clipboardExpand all lines: plotly/io/_base_renderers.py
+19-13Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def to_mimebundle(self, fig_dict):
122122
format=self.format,
123123
width=self.width,
124124
height=self.height,
125-
scale=self.scale)
125+
scale=self.scale,
126+
validate=False,
127+
)
126128

127129
if self.b64_encode:
128130
image_str = base64.b64encode(image_bytes).decode('utf8')
@@ -354,6 +356,7 @@ def to_mimebundle(self, fig_dict):
354356
animation_opts=self.animation_opts,
355357
default_width='100%',
356358
default_height=525,
359+
validate=False,
357360
)
358361

359362
return {'text/html': html}
@@ -503,18 +506,20 @@ def to_mimebundle(self, fig_dict):
503506
# Make directory for
504507
os.makedirs(dirname, exist_ok=True)
505508

506-
write_html(fig_dict,
507-
filename,
508-
config=self.config,
509-
auto_play=self.auto_play,
510-
include_plotlyjs='directory',
511-
include_mathjax='cdn',
512-
auto_open=False,
513-
post_script=self.post_script,
514-
animation_opts=self.animation_opts,
515-
default_width='100%',
516-
default_height=525,
517-
validate=False)
509+
write_html(
510+
fig_dict,
511+
filename,
512+
config=self.config,
513+
auto_play=self.auto_play,
514+
include_plotlyjs='directory',
515+
include_mathjax='cdn',
516+
auto_open=False,
517+
post_script=self.post_script,
518+
animation_opts=self.animation_opts,
519+
default_width='100%',
520+
default_height=525,
521+
validate=False,
522+
)
518523

519524
# Build IFrame
520525
iframe_html = """\
@@ -629,5 +634,6 @@ def render(self, fig_dict):
629634
animation_opts=self.animation_opts,
630635
default_width='100%',
631636
default_height='100%',
637+
validate=False,
632638
)
633639
open_html_in_browser(html, self.using, self.new, self.autoraise)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.