Plotly.js

Plotly.jsarrow-up-right is a standalone Javascript data visualization library, and it also powers the Python and R modules named plotly in those respective ecosystems (referred to as Plotly.pyarrow-up-right and Plotly.Rarrow-up-right).

Plotly.js can be used to produce dozens of chart types and visualizations, including statistical charts, 3D graphs, scientific charts, SVG and tile maps, financial charts and more.

Table of contents

Quick start options

Install with npm

and import plotly.js as

Use the plotly.js CDN hosted by Fastly

and use the Plotly object in the window scope.

Fastly supports Plotly.js with free CDN service. Read more at https://www.fastly.com/open-sourcearrow-up-right

Download the latest release

Latest Release on GitHubarrow-up-right

and use the plotly.js dist file(s). More info herearrow-up-right.

Read the Getting started page for more examples.

Modules

Starting in v1.15.0, plotly.js ships with several partial bundles (more info herearrow-up-right).

Starting in v1.39.0, plotly.js publishes distributed npm packages with no dependencies. For example, run npm install plotly.js-geo-dist and add import Plotly from 'plotly.js-geo-dist'; to your code to start using the plotly.js geo package.

If none of the distributed npm packages meet your needs, and you would like to manually pick which plotly.js modules to include, you'll first need to run npm install plotly.js and then create a custom bundle by using plotly.js/lib/core, and loading only the trace types that you need (e.g. pie or choropleth). The recommended way to do this is by creating a bundling file. For example, in CommonJS:

Then elsewhere in your code:

Non-ascii characters

Important: the plotly.js code base contains some non-ascii characters. Therefore, please make sure to set the charset attribute to "utf-8" in the script tag that imports your plotly.js bundle. For example:

Building plotly.js

Building instructions using webpack, browserify and other build frameworks are in BUILDING.mdarrow-up-right

Bugs and feature requests

Have a bug or a feature request? Please open a Github issuearrow-up-right keeping in mind the issue guidelinesarrow-up-right. You may also want to read about how changes get made to Plotly.jsarrow-up-right

Documentation

Official plotly.js documentation is hosted at https://plotly.com/javascriptarrow-up-right.

These pages are generated by the Plotly graphing-library-docs repoarrow-up-right built with Jekyllarrow-up-right and publicly hosted on GitHub Pages. For more info about contributing to Plotly documentation, please read through contributing guidelinesarrow-up-right.

Contributing

Please read through our contributing guidelinesarrow-up-right. Included are directions for opening issues, using plotly.js in your project and notes on development.

Community

Versioning

This project is maintained under the Semantic Versioning guidelinesarrow-up-right.

See the Releases sectionarrow-up-right of our GitHub project for changelogs for each release version of plotly.js.

Notable Contributors

Plotly.js is at the core of a large and dynamic ecosystem with many contributors who file issues, reproduce bugs, suggest improvements, write code in this repo (and other upstream or downstream ones) and help users in the Plotly community forum. The following people deserve special recognition for their outsized contributions to this ecosystem:

รายละเอียดเพิ่มเติม

Reference : https://github.com/plotly/plotly.jsarrow-up-right

Last updated