plotly / plotly/plotly.js

Weird Symbols show up when using Local version compared to CDN

Abierto
#7,052 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug P3
Lenguaje dominante
JavaScript
Estrellas
18.3k
Forks
2k
Merge medio
2 d 12 h
PR fusionados (30 d)
28

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el CodePen enlazado y compara el build de CDN con el contenido inline de plotly-cartesian.min.js usando tickformat '.1e'. Reproduce los símbolos inesperados para valores entre 0 y 1 y, después, verifica que las versiones local y de CDN rendericen etiquetas coincidentes en el eje y sin requerir configuración adicional del juego de caracteres.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
data-visualization
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.