Plotly charts not displaying in IE

Hi, I’ve seen a few of these posts on here but nothing that’s been able to help me. I’m able to open up a plotly chart I make in Chrome, but it just comes up blank in IE. I’m working in Python

Example below. I’m using Plotly version 4.0.0

import plotly.graph_objects as go
import plotly
import numpy as np

N = 100
random_x = np.linspace(0, 1, N)
random_y0 = np.random.randn(N) + 5
random_y1 = np.random.randn(N)
random_y2 = np.random.randn(N) - 5

fig = go.Figure()
fig.add_trace(go.Scatter(x=random_x, y=random_y0,
mode=‘lines’,
name=‘lines’))
fig.add_trace(go.Scatter(x=random_x, y=random_y1,
mode=‘lines+markers’,
name=‘lines+markers’))
fig.add_trace(go.Scatter(x=random_x, y=random_y2,
mode=‘markers’, name=‘markers’))

plotly.offline.plot(fig, filename=‘file.html’)

Thanks for reporting.

Your graph renders fine for me when testing it out in IE11

image

running on Windows 7.

Can you share a bit more information to help us debug e.g.:

  • which exact version of IE11 are you using
  • which Windows version are you using
  • are there any error messages in the developer tool (hit F12) console?

Thanks Etienne.

  • IE version = 11.0.9600.19377CO
  • Windows 7 Enterprise
  • I’m getting a SCRIPT1010: Expected identifier & a SCRIPT5009: ‘Plotly’ is undefined error.

EDIT: if I move the plotly-latest.min.js script into the body tag then it seems to work on both IE and Chrome.

Thanks

three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online