Skip to content

Latest commit

 

History

History
81 lines (54 loc) · 2.69 KB

README.md

File metadata and controls

81 lines (54 loc) · 2.69 KB

Using distributed files

All plotly.js dist bundles inject an object Plotly into the global scope.

Import plotly.js as:

<script type="text/javascript" src="plotly.min.js"></script>

or the un-minified version as:

<script type="text/javascript" src="plotly.js" charset="utf-8"></script>

To support IE9, put:

<script>if(typeof window.Int16Array !== 'function')document.write("<scri"+"pt src='extras/typedarray.min.js'></scr"+"ipt>");</script>
<script>document.write("<scri"+"pt src='extras/request_animation_frame.js'></scr"+"ipt>");</script>

before the plotly.js script tag.

To add MathJax, put

<script type="text/javascript" src="mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script>

before the plotly.js script tag. You can grab the relevant MathJax files in ./dist/extras/mathjax/.

Bundle information

The main plotly.js bundle includes all the official (non-beta) trace modules.

It be can imported as minified javascript

or as raw javascript:

If you would like to have access to the attribute meta information (including attribute descriptions as on the schema reference page), use dist file dist/plotly-with-meta.js

The main plotly.js bundle weights in at:

plotly.js plotly.min.js plotly.min.js + gzip plotly-with-meta.js
5.1 MB 2.1 MB 634.4 kB 5.2 MB

Partial bundles

Starting in v1.15.0, plotly.js also ships with several partial bundles:

plotly.js sankey

The sankey partial bundle contains the scatter and sankey trace modules.

Way to import Location
dist bundle dist/plotly-sankey.js
dist bundle (minified) dist/plotly-sankey.min.js
CDN URL (latest) https://cdn.plot.ly/plotly-sankey-latest.js
CDN URL (latest minified) https://cdn.plot.ly/plotly-sankey-latest.min.js
CDN URL (tagged) https://cdn.plot.ly/plotly-sankey-1.25.2.js
CDN URL (tagged minified) https://cdn.plot.ly/plotly-sankey-1.25.2.min.js
CommonJS require('plotly.js/lib/index-sankey')
Raw size Minified size Minified + gzip size
1.7 MB 665.9 kB 216.4 kB

This file is auto-generated by npm run stats. Please do not edit this file directly.