Skip to content

Commit 53caa47

Browse files
committed
Rename global plotly library object in JavaScript
The global plotly library object was renamed from 'Plotly' to '_Plotly' in plotly.py 3.4.0 to avoid a naming conflict when a Jupyter Notebook heading contained the text 'Plotly' See: plotly/plotly.py#816 plotly/plotly.py#1250
1 parent 4c33fc5 commit 53caa47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: holoviews/plotting/plotly/plotlywidgets.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ var PlotlyMethods = {
3232
plot.data[i][key] = data.data[i][key];
3333
}
3434
}
35-
Plotly.relayout(plot, data.layout);
36-
Plotly.redraw(plot);
35+
_Plotly.relayout(plot, data.layout);
36+
_Plotly.redraw(plot);
3737
}
3838
}
3939

Diff for: holoviews/plotting/plotly/renderer.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
plot.data[i][key] = obj[key];
2020
}});
2121
}});
22-
Plotly.relayout(plot, data.layout);
23-
Plotly.redraw(plot);
22+
_Plotly.relayout(plot, data.layout);
23+
_Plotly.redraw(plot);
2424
"""
2525

2626
PLOTLY_WARNING = """
@@ -98,7 +98,7 @@ def _figure_data(self, plot, fmt=None, divuuid=None, comm=True, as_script=False,
9898
'</script>')
9999

100100
script = '\n'.join([
101-
'Plotly.plot("{id}", {data}, {layout}, {config}).then(function() {{',
101+
'_Plotly.plot("{id}", {data}, {layout}, {config}).then(function() {{',
102102
' var elem = document.getElementById("{id}.loading"); elem.parentNode.removeChild(elem);',
103103
'}})']).format(id=divuuid,
104104
data=jdata,

0 commit comments

Comments
 (0)