plotly / plotly.js

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

MathJax does not render in hover labels #559

Open nibage opened 8 years ago

nibage commented 8 years ago

In the example at https://plot.ly/javascript/LaTeX/ when hovering over the plotted points, the graph shows latex code instead of rendered math text.

mdtusz commented 8 years ago

Confirmed as a bug. Thanks for reporting this!.

etpinard commented 8 years ago

Yep, thanks for reporting. This has been a bug ever since we added support for MathJax more than two years ago.

etpinard commented 8 years ago

It might worthwhile to look into swapping MathJax for KaTeX.

sglyon commented 8 years ago

@etpinard has any testing been done on moving to KaTeX?

etpinard commented 8 years ago

@spencerlyon2 No. This is not a high priority for us at the moment,

archmoj commented 2 years ago

It might worthwhile to look into swapping MathJax for KaTeX.

The following page could be helpful for comparing MathJax v3 and KaTeX: https://news.ycombinator.com/item?id=22582343

ChasingZenith commented 2 years ago

From my browser, it look like this, maybe escape sequence prefix is needed, for example '\\alpha' instead of '\alpha'

on Chrome

Screenshot_20220913_210136

Also, I find that on firefox, the legend size is not correct. (Maybe I should open another issue.)

On firefox

Screenshot_20220913_210346

Another example for incorrect legend in firefox

on firefox

Screenshot_20220913_210715

on chrome

Screenshot_20220913_210847

khumarahn commented 1 month ago

Now latex doesn't render in the basic example here: https://plotly.com/javascript/LaTeX/ image