@@ -14,22 +14,46 @@ or the un-minified version as:
1414<script type =" text/javascript" src =" plotly.js" charset =" utf-8" ></script >
1515```
1616
17- To support IE9, put:
17+ ### To support IE9
18+
19+ * Before* the plotly.js script tag, add:
1820
1921``` html
2022<script >if (typeof window .Int16Array !== ' function' )document .write (" <scri" + " pt src='extras/typedarray.min.js'></scr" + " ipt>" ); </script >
2123<script >document .write (" <scri" + " pt src='extras/request_animation_frame.js'></scr" + " ipt>" ); </script >
2224```
2325
24- before the plotly.js script tag.
26+ ### To support MathJax
2527
26- To add MathJax, put
28+ * Before * the plotly.js script tag, add:
2729
2830``` html
2931<script type =" text/javascript" src =" mathjax/MathJax.js?config=TeX-AMS-MML_SVG" ></script >
3032```
3133
32- before the plotly.js script tag. You can grab the relevant MathJax files in ` ./dist/extras/mathjax/ ` .
34+ You can grab the relevant MathJax files in ` ./dist/extras/mathjax/ ` .
35+
36+ ### To include localization
37+
38+ Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.
39+ Many other localizations are available - here is an example using Swiss-German (de-CH),
40+ see the contents of this directory for the full list.
41+ They are also available on our CDN as https://cdn.plot.ly/plotly-locale-de-ch-latest.js OR https://cdn.plot.ly/plotly-locale-de-ch-1.31.2.js
42+ Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.
43+
44+ * After* the plotly.js script tag, add:
45+
46+ ``` html
47+ <script type =" text/javascript" src =" plotly-locale-de-ch.js" ></script >
48+ <script type =" text/javascript" >Plotly .setPlotConfig ({locale: ' de-CH' }) </script >
49+ ```
50+
51+ The first line loads and registers the locale definition with plotly.js, the second sets it as the default for all Plotly plots.
52+ You can also include multiple locale definitions and apply them to each plot separately as a ` config ` parameter:
53+
54+ ``` js
55+ Plotly .newPlot (graphDiv, data, layout, {locale: ' de-CH' })
56+ ```
3357
3458# Bundle information
3559
@@ -84,7 +108,7 @@ The `basic` partial bundle contains the `scatter`, `bar` and `pie` trace modules
84108
85109### plotly.js cartesian
86110
87- The ` cartesian ` partial bundle contains the ` scatter ` , ` bar ` , ` box ` , ` heatmap ` , ` histogram ` , ` histogram2d ` , ` histogram2dcontour ` , ` pie ` , ` contour ` and ` scatterternary ` trace modules.
111+ The ` cartesian ` partial bundle contains the ` scatter ` , ` bar ` , ` box ` , ` heatmap ` , ` histogram ` , ` histogram2d ` , ` histogram2dcontour ` , ` pie ` , ` contour ` , ` scatterternary ` and ` violin ` trace modules.
88112
89113| Way to import | Location |
90114| ---------------| ----------|
0 commit comments