Skip to content

Commit fa57b7d

Browse files
committed
add info about utf-8 charset
1 parent 8502123 commit fa57b7d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ Then elsewhere in your code:
6969
var Plotly = require('./path/to/custom-plotly');
7070
```
7171

72+
**IMPORTANT**: the plotly.js code base contains some non-ascii characters. Therefore, please make sure to set the `chartset` attribute to `"utf-8"` in the script tag that imports your plotly.js bundle. For example:
73+
74+
```html
75+
<script type="text/javascript" src="my-plotly-bundle.js" charset="utf-8"></script>
76+
```
77+
78+
7279
#### Webpack Usage with Modules
7380

7481
Browserify [transforms](https://github.com/substack/browserify-handbook#transforms) are required to build plotly.js, namely, [glslify](https://github.com/stackgl/glslify) to transform WebGL shaders and [cwise](https://github.com/scijs/cwise) to compile component-wise array operations. To make the trace module system work with Webpack, you will need to install [ify-loader](https://github.com/hughsk/ify-loader) and add it to your `webpack.config.json` for your build to correctly bundle plotly.js files.

0 commit comments

Comments
 (0)