Skip to content
Open-source JavaScript charting library behind Plotly and Dash
JavaScript Other
Branch: master
Clone or download

Latest commit

archmoj Merge pull request #4714 from plotly/bar-with-base-tozero
Skip zeroline when negative sizes are present on positive base and vice versa
Latest commit 30f3ddc Apr 6, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci use node 12.13.0 (LTS) on CircleCI Oct 30, 2019
.github Create FUNDING.yml May 28, 2019
build mv build/ploticon.js -> src/fonts/ploticon.js Jul 18, 2019
devtools add utf-8 charset to test_dashboard Feb 5, 2020
dist 1.53.0 Mar 31, 2020
lib use Chart Studio instead of plot.ly in French locale Mar 27, 2020
src Merge pull request #4714 from plotly/bar-with-base-tozero Apr 6, 2020
tasks update various links Mar 26, 2020
test Merge pull request #4714 from plotly/bar-with-base-tozero Apr 6, 2020
.eslintignore move (old) polar code to legacy/ folder Nov 28, 2017
.eslintrc bump eslint to 6.1.0 + disable `no-prototype-builtins` rule Jul 23, 2019
.gitignore mv build/ploticon.js -> src/fonts/ploticon.js Jul 18, 2019
.npmignore mv build/ploticon.js -> src/fonts/ploticon.js Jul 18, 2019
BUILDING.md rm info about compress_attributes transform Sep 10, 2018
CHANGELOG.md changelog v1.53.0 Mar 31, 2020
CONTRIBUTING.md make `_module.convert` more clear. Mar 12, 2020
LICENSE update year 2020 in LICENSE and README Jan 2, 2020
README.md update examples - add utf8 charset Mar 27, 2020
SECURITY.md update various links Mar 26, 2020
appveyor.yml use node "12" on AppVeyor Oct 30, 2019
bower.json update various links Mar 26, 2020
composer.json update various links Mar 26, 2020
package-lock.json bump fast-isnumeric at v1.1.4 Apr 6, 2020
package.json bump fast-isnumeric at v1.1.4 Apr 6, 2020

README.md

npm version circle ci MIT License

Built on top of d3.js and stack.gl, plotly.js is a high-level, declarative charting library. plotly.js ships with over 40 chart types, including scientific charts, 3D graphs, statistical charts, SVG maps, financial charts, and more.

Contact us for Plotly.js consulting, dashboard development, application integration, and feature additions.

Table of contents

Quick start options

Install with npm

npm install plotly.js-dist

and import plotly.js as import Plotly from 'plotly.js-dist'; or var Plotly = require('plotly.js-dist');.

Use the plotly.js CDN hosted by Fastly

<!-- Latest compiled and minified plotly.js JavaScript -->
<script src="https://cdn.plot.ly/plotly-latest.min.js" charset="utf-8"></script>

<!-- OR use a specific plotly.js release (e.g. version 1.52.3) -->
<script src="https://cdn.plot.ly/plotly-1.52.3.min.js" charset="utf-8"></script>

<!-- OR an un-minified version is also available -->
<script src="https://cdn.plot.ly/plotly-latest.js" charset="utf-8"></script>

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-source

Download the latest release

Latest Release on GitHub

and use the plotly.js dist file(s). More info here.

Read the Getting started page for more examples.

Modules

Starting in v1.15.0, plotly.js ships with several partial bundles (more info here).

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:

// in custom-plotly.js
var Plotly = require('plotly.js/lib/core');

// Load in the trace types for pie, and choropleth
Plotly.register([
    require('plotly.js/lib/pie'),
    require('plotly.js/lib/choropleth')
]);

module.exports = Plotly;

Then elsewhere in your code:

var Plotly = require('./path/to/custom-plotly');

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:

<script src="my-plotly-bundle.js" charset="utf-8"></script>

Building plotly.js

Building instructions using webpack, browserify and other build frameworks are in BUILDING.md

Bugs and feature requests

Have a bug or a feature request? Please first read the issues guidelines.

Documentation

Official plotly.js documentation is hosted on plotly.com/javascript.

These pages are generated by the Plotly graphing-library-docs repo built with Jekyll and publicly hosted on GitHub Pages. For more info about contributing to Plotly documentation, please read through contributing guidelines.

Contributing

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

Community

  • Follow @plotlygraphs on Twitter for the latest Plotly news.
  • Follow @plotly_js on Twitter for plotly.js release updates.
  • Implementation help may be found on community.plot.com (tagged plotly-js) or on Stack Overflow (tagged plotly).
  • Developers should use the keyword plotly on packages which modify or add to the functionality of plotly.js when distributing through npm.

Versioning

This project is maintained under the Semantic Versioning guidelines.

See the Releases section of our GitHub project for changelogs for each release version of plotly.js.

Clients for R, Python, Node, and MATLAB

Open-source clients to the plotly.js APIs are available at these links:

GitHub repo Getting started
R / RStudio ropensci/plotly plotly/r/getting-started
Python / Pandas / IPython notebook plotly/plotly.py plotly/python/getting-started
MATLAB plotly/matlab-api plotly/matlab/getting-started
node.js / Tonicdev / Jupyter notebook plotly/plotly-notebook-js

Creators

Active

GitHub Twitter
Alex C. Johnson @alexcjohnson
Γ‰tienne TΓ©treault-Pinard @etpinard @etpinard
Antoine Roy-Gobeil @antoinerg
Mojtaba Samimi @archmoj @solarchvision

Hall of Fame

GitHub Twitter
Mikola Lysenko @mikolalysenko @MikolaLysenko
Ricky Reusser @rreusser @rickyreusser
Dmitry Yv. @dy @DimaYv
Robert Monfera @monfera @monfera
Robert MΓΆstl @rmoestl @rmoestl
Nicolas Riesco @n-riesco
MiklΓ³s Tusz @mdtusz @mdtusz
Chelsea Douglas @cldougl
Ben Postlethwaite @bpostlethwaite
Chris Parmer @chriddyp
Alex Vados @alexander-daniel

Copyright and license

Code and documentation copyright 2020 Plotly, Inc.

Code released under the MIT license.

Docs released under the Creative Commons license.

You can’t perform that action at this time.