plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash
https://plotly.com/javascript/
MIT License
17.06k stars 1.87k forks source link

Weird Symbols show up when using Local version compared to CDN #7052

Open tkalp opened 3 months ago

tkalp commented 3 months ago

Hello,

I am currently trying to plot a graph using plotly-cartesian.min.js. We are currently limited to downloading and using a local copy rather than the CDN. I am plotting a graph that use the tickformat '.1e' for the y axis.

When I run the code using the local version, I get some rather weird symbols when the values are between 0 and 1. It looks like there is some encoding issue but the html I am running has the tags <meta charset="utf-8" /> as well as the script has the charset specified.

When I run the CDN version, the values are what are to be expected so I am just wondering if there is something else I need to specify in the configuration of either the web server we are running, or within the html itself.

You can reproduce this by using the following.

  1. Open this code pen here
  2. You will see that the y-axis is formatted normally as expected.
  3. Now instead of using the CDN, copy paste the plotly-cartesian.min.js contents between the Githubissues.
  4. Githubissues is a development platform for aggregating issues.