Weird Symbols show up when using Local version compared to CDN
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
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.
- Open this code pen here
- You will see that the y-axis is formatted normally as expected.
- Now instead of using the CDN, copy paste the
plotly-cartesian.min.jscontents between the <script> tags in the html. - You will then see the weird characters show up.
This is the weird symbols using the local version
This is the normal version using the CDN
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodePen and compare the CDN build with the inline contents of plotly-cartesian.min.js while using tickformat '.1e'. Reproduce the unexpected symbols for values between 0 and 1, then verify that the local and CDN versions render matching y-axis labels without requiring additional charset configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100