Skip to content

Commit

Permalink
Fix honouring of validate=False for interactive plots.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwardrop committed May 23, 2019
1 parent 6a85e4b commit 20d91af
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions plotly/io/_base_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def to_mimebundle(self, fig_dict):
format=self.format,
width=self.width,
height=self.height,
scale=self.scale)
scale=self.scale,
validate=False,
)

if self.b64_encode:
image_str = base64.b64encode(image_bytes).decode('utf8')
Expand Down Expand Up @@ -354,6 +356,7 @@ def to_mimebundle(self, fig_dict):
animation_opts=self.animation_opts,
default_width='100%',
default_height=525,
validate=False,
)

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

write_html(fig_dict,
filename,
config=self.config,
auto_play=self.auto_play,
include_plotlyjs='directory',
include_mathjax='cdn',
auto_open=False,
post_script=self.post_script,
animation_opts=self.animation_opts,
default_width='100%',
default_height=525,
validate=False)
write_html(
fig_dict,
filename,
config=self.config,
auto_play=self.auto_play,
include_plotlyjs='directory',
include_mathjax='cdn',
auto_open=False,
post_script=self.post_script,
animation_opts=self.animation_opts,
default_width='100%',
default_height=525,
validate=False,
)

# Build IFrame
iframe_html = """\
Expand Down Expand Up @@ -629,5 +634,6 @@ def render(self, fig_dict):
animation_opts=self.animation_opts,
default_width='100%',
default_height='100%',
validate=False,
)
open_html_in_browser(html, self.using, self.new, self.autoraise)

0 comments on commit 20d91af

Please sign in to comment.