@@ -14,22 +14,46 @@ or the un-minified version as:
14
14
<script type =" text/javascript" src =" plotly.js" charset =" utf-8" ></script >
15
15
```
16
16
17
- To support IE9, put:
17
+ ### To support IE9
18
+
19
+ * Before* the plotly.js script tag, add:
18
20
19
21
``` html
20
22
<script >if (typeof window .Int16Array !== ' function' )document .write (" <scri" + " pt src='extras/typedarray.min.js'></scr" + " ipt>" ); </script >
21
23
<script >document .write (" <scri" + " pt src='extras/request_animation_frame.js'></scr" + " ipt>" ); </script >
22
24
```
23
25
24
- before the plotly.js script tag.
26
+ ### To support MathJax
25
27
26
- To add MathJax, put
28
+ * Before * the plotly.js script tag, add:
27
29
28
30
``` html
29
31
<script type =" text/javascript" src =" mathjax/MathJax.js?config=TeX-AMS-MML_SVG" ></script >
30
32
```
31
33
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
+ ```
33
57
34
58
# Bundle information
35
59
@@ -84,7 +108,7 @@ The `basic` partial bundle contains the `scatter`, `bar` and `pie` trace modules
84
108
85
109
### plotly.js cartesian
86
110
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.
88
112
89
113
| Way to import | Location |
90
114
| ---------------| ----------|
0 commit comments