Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions plotly/io/_base_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def __init__(
auto_play=False,
post_script=None,
animation_opts=None,
include_plotlyjs=True,
):

self.config = dict(config) if config else {}
Expand All @@ -263,6 +264,7 @@ def __init__(
self.full_html = full_html
self.animation_opts = animation_opts
self.post_script = post_script
self.include_plotlyjs = "cdn" if self.connected else include_plotlyjs

def activate(self):
if self.global_init:
Expand Down Expand Up @@ -307,12 +309,7 @@ def to_mimebundle(self, fig_dict):

from plotly.io import to_html

if self.connected:
include_plotlyjs = "cdn"
include_mathjax = "cdn"
else:
include_plotlyjs = True
include_mathjax = "cdn"
include_mathjax = "cdn"

# build post script
post_script = [
Expand Down Expand Up @@ -352,7 +349,7 @@ def to_mimebundle(self, fig_dict):
fig_dict,
config=self.config,
auto_play=self.auto_play,
include_plotlyjs=include_plotlyjs,
include_plotlyjs=self.include_plotlyjs,
include_mathjax=include_mathjax,
post_script=post_script,
full_html=self.full_html,
Expand Down Expand Up @@ -385,6 +382,7 @@ def __init__(
auto_play=False,
post_script=None,
animation_opts=None,
include_plotlyjs=False,
):
super(NotebookRenderer, self).__init__(
connected=connected,
Expand All @@ -394,6 +392,7 @@ def __init__(
auto_play=auto_play,
post_script=post_script,
animation_opts=animation_opts,
include_plotlyjs=include_plotlyjs,
)


Expand Down Expand Up @@ -421,6 +420,7 @@ def __init__(
auto_play=auto_play,
post_script=post_script,
animation_opts=animation_opts,
include_plotlyjs=False,
)


Expand Down Expand Up @@ -448,6 +448,7 @@ def __init__(
auto_play=auto_play,
post_script=post_script,
animation_opts=animation_opts,
include_plotlyjs=False,
)


Expand Down