plotly / plotly/plotly.js

Weird Symbols show up when using Local version compared to CDN

Aperta
#7,052 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug P3
Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 12h
PR unite (30g)
28

Descrizione

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 <script> tags in the html.
  4. You will then see the weird characters show up.

This is the weird symbols using the local version

image

This is the normal version using the CDN

image

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con il CodePen collegato e confronta la build CDN con il contenuto inline di plotly-cartesian.min.js usando tickformat '.1e'. Riproduci i simboli imprevisti per i valori compresi tra 0 e 1, quindi verifica che le versioni locale e CDN eseguano il rendering di etichette corrispondenti sull’asse y senza richiedere una configurazione aggiuntiva del set di caratteri.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.