Code Monkey home page Code Monkey logo

plotly.js's Introduction

npm version circle ci MIT License

Plotly.js 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.py and Plotly.R).

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.

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 using require,
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');

Alternatively you could browserify a custom bundle of desired trace modules e.g. pie and choropleth using npm run partial-bundle pie choropleth --name=custom

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 open a Github issue keeping in mind the issue guidelines. You may also want to read about how changes get made to Plotly.js

Documentation

Official plotly.js documentation is hosted at https://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.
  • 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.

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:

GitHub Twitter Status
Alex C. Johnson @alexcjohnson Active, Maintainer
Mojtaba Samimi @archmoj @solarchvision Active, Maintainer
Antoine Roy-Gobeil @antoinerg Active, Maintainer
Nicolas Kruchten @nicolaskruchten @nicolaskruchten Active
Jon Mease @jonmmease @jonmmease Active
Étienne Tétreault-Pinard @etpinard @etpinard Hall of Fame
Mikola Lysenko @mikolalysenko @MikolaLysenko Hall of Fame
Ricky Reusser @rreusser @rickyreusser Hall of Fame
Dmitry Yv. @dy @DimaYv Hall of Fame
Robert Monfera @monfera @monfera Hall of Fame
Robert Möstl @rmoestl @rmoestl Hall of Fame
Nicolas Riesco @n-riesco Hall of Fame
Miklós Tusz @mdtusz @mdtusz Hall of Fame
Chelsea Douglas @cldougl Hall of Fame
Ben Postlethwaite @bpostlethwaite Hall of Fame
Chris Parmer @chriddyp Hall of Fame
Alex Vados @alexander-daniel Hall of Fame

Copyright and license

Code and documentation copyright 2021 Plotly, Inc.

Code released under the MIT license.

plotly.js's People

Contributors

etpinard avatar archmoj avatar alexcjohnson avatar jackparmer avatar bpostlethwaite avatar antoinerg avatar alexander-daniel avatar rreusser avatar theengineear avatar andrefarzat avatar monfera avatar mdtusz avatar dy avatar scjody avatar chriddyp avatar n-riesco avatar mikolalysenko avatar bronsolo avatar rmoestl avatar carmeloosh avatar mkcor avatar nicholas-esterer avatar doeg avatar troiska avatar nicolaskruchten avatar nicolemgf avatar jonmmease avatar cldougl avatar abourget avatar tomdemulierchevret avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.