| 796 | ) |
| 797 | |
| 798 | def to_mimebundle(self, fig_dict): |
| 799 | from plotly.io import to_html |
| 800 | |
| 801 | if self.connected: |
| 802 | include_plotlyjs = "cdn" |
| 803 | include_mathjax = "cdn" |
| 804 | else: |
| 805 | include_plotlyjs = True |
| 806 | include_mathjax = "cdn" |
| 807 | |
| 808 | html = to_html( |
| 809 | fig_dict, |
| 810 | config=self.config, |
| 811 | auto_play=self.auto_play, |
| 812 | include_plotlyjs=include_plotlyjs, |
| 813 | include_mathjax=include_mathjax, |
| 814 | full_html=self.full_html, |
| 815 | animation_opts=self.animation_opts, |
| 816 | default_width="100%", |
| 817 | default_height=525, |
| 818 | validate=False, |
| 819 | ) |
| 820 | |
| 821 | return {"text/html": html} |
| 822 | |
| 823 | |
| 824 | class SphinxGalleryOrcaRenderer(ExternalRenderer): |