plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
16.38k stars 2.56k forks source link

write_html: locale config does not work #2302

Open silberzwiebel opened 4 years ago

silberzwiebel commented 4 years ago

Hi!

I'm using plotly to generate a standalone HTML-file that contains only my plot. I do want the axes to be localized in German (one axis has Dates).

This code does not work:

fig.write_html("index.html",
  include_plotlyjs="cdn",
  config={"locale": "de"}
)

The reason is that the following line is missing in the generated HTML-file (cf. plotly.js documentation)

<script src="https://cdn.plot.ly/plotly-locale-de-latest.js"></script>

I suggest to add a locale argument to the write_html function that does two things (think of de as exchangeable):

lingyanmeng commented 2 years ago

Same issue here with 5.5.0

capyvara commented 2 years ago

Bump