File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 4343 <!-- Plotly.js hardcoded to 1.x due to Plotly.plot() -->
4444 < script src ="https://cdn.plot.ly/plotly-1.58.4.min.js "> </ script >
4545 < script src ="/all_static/r_files/r_dependencies.js "> </ script >
46+ {% elsif page.language == "julia" or page.language == "matlab" %}
47+ <!-- Plotly.js hardcoded to 2.x for RequireJS/AMD compatibility -->
48+ < script type ="text/javascript " src ="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.2/require.js "> </ script >
49+ < script type ="text/javascript ">
50+ if ( typeof require !== "undefined" ) {
51+ require . undef ( "plotly" ) ;
52+ requirejs . config ( {
53+ paths : {
54+ plotly : [
55+ "https://cdn.plot.ly/plotly-2.35.3.min" ,
56+ ] ,
57+ } ,
58+ } ) ;
59+ require ( [ "plotly" ] , function ( Plotly ) {
60+ window . _Plotly = Plotly ;
61+ } ) ;
62+ }
63+
64+ </ script >
4665 {% else %}
4766 <!-- Plotly.js -->
4867 < script src ="https://cdn.plot.ly/plotly-{{site.data.jsversion.version}}.min.js "> </ script >
49- {% endif %} {% if page.language == "julia" or page.language == "matlab" or
50- page.language == "ggplot2" %}
5168 {% endif %} {% endif %}
5269 <!--
5370 //// Stylesheets
You can’t perform that action at this time.
0 commit comments