diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000000..094de1fb3c6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,28 @@ +# plotly.js changelog. + +For more context information, please read through the +[release notes](https://github.com/plotly/plotly.js/releases). + +## [1.0.0] -- 2015-11-17 + +First fully open source release. + +### Added +- Add 2D WebGL plot engine + +### Changed +- Save to cloud is now done via a modebar button by default, + the `'Edit chart'` link is still available through the + `'showLink'` plot config. +- Better double-click notifier CSS + +### Fixed +- Fix `Plotly.newPlot` 3D and geo bug. +- Fix `plotly_click` event bug in latest Chrome and Firefox. + +### Known limitations +- Different plot types cannot be mixed in subplots. +- 2D WebGL has no image test support. +- Click and hover events are not hooked for gl3d, geo and gl2d + plot types. +- Polar chart are under-developed. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9766716e2b3..de2c48ba511 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,73 @@ -yolos! +# Contributing to plotly.js + +### Opening issues + +Search for existing and closed issues. If your problem or idea is not addressed +yet, [please open a new issue](https://github.com/plotly/plotly.js/issues/new). + +### Development + +**Prerequisites**: + +- git +- [node.js](https://nodejs.org/en/). We recommend using node.js 4.2.1 (LTS). + Upgrading and managing node versions can be easily done using + [`nvm`](https://github.com/creationix/nvm) or its Windows alternatives. + +**Step 1** Clone the plotly.js repo and install its dependencies + +``` +git clone https://github.com/plotly/plotly.js.git +cd plotly.js +npm install +``` + +**Step 2** Start the test dashboard + +``` +npm run start-test_dashboard +``` + +This command bundles up the source files with source maps, starts +a [watchify](https://github.com/substack/watchify) file watcher (making the your +dev plotly.js bundle update every time a source file is saved) and opens up +a tab in your browser. + +**Step 3** Open up the console and start developing + +Make some modification to the source, refresh the page and check the results +by for example pasting in the console: + +```js +Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2]}]); +``` + +**Other npm scripts**: + +- `npm run preprocess`: pre-processes the css and svg source file in js. This + script is run automatically on `npm install`. +- `npm run watch`: starts a watchify file watcher just like the test dashboard but + without booting up a server. +- `npm run lint`: runs jshint on all source files + +### Testing + +Both jasmine and image test are run on +[CircleCI](https://circleci.com/gh/plotly/plotly.js) on every pushes to this +repo. + +Jasmine tests are run in a browser using +[karma](https://github.com/karma-runner/karma). To run them locally: + +``` +npm run test-jasmine +``` + +Image pixel comparison tests are run in a docker container. For more +information on how to run them locally, please refer to [image test +README](https://github.com/plotly/plotly.js/blob/master/test/image/README.md). + + +### Repo organization + +### Coding style diff --git a/README.md b/README.md index 8fc10a2d2a3..9ab6311bd90 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -# [plotly.js](https://plot.ly/javascript/getting-started/) +# [plotly.js](https://plot.ly/javascript) -[![npm version](https://img.shields.io/npm/v/plotly.svg)](https://www.npmjs.com/package/plotly) -To get started, check out ! +Built on top of [d3.js](http://d3js.org/) and [stack.gl](http://stack.gl/), +plotly.js is a high-level, declarative charting library. plotly.js ships with 20 +chart types, including 3D charts, statistical graphs, and SVG maps. ## Table of contents @@ -20,9 +21,9 @@ To get started, check out ! Several quick start options are available: -* [Download the latest release](https://github.com/plotly/plotly.js/releases/v1.0.0/plotly.js.zip). +* [Download the latest release](https://github.com/plotly/plotly.js/releases/). * Clone the repo: `git clone https://github.com/plotly/plotly.js.git`. -* Install with [npm](https://www.npmjs.com): `npm install plotly`. +* Install with [npm](https://www.npmjs.com): `npm install plotly.js`. * Use the plotly.js CDN hosted by Fastly: ```html @@ -34,32 +35,35 @@ Read the [Getting started page](https://plot.ly/javascript/getting-started/) for ## Bugs and feature requests -Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/plotly/plotly.js/issues/new). +Have a bug or a feature request? Please first read the [issues guidelines](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md). ## Documentation -Plotly.js documentation, in the repo documentation, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at . The docs may also be run locally. +Official plotly.js documentation is hosted on [plot.ly/javascript](https://plot.ly/javascript). -You can also suggest new documentation examples by submitting a [Codepen](http://codepen.io/tag/plotly/) on community.plot.ly (tagged [`plotly-js`](community.plot.ly/c/plotly-js). +These pages are generated by the Plotly [documentation repo](https://github.com/plotly/documentation/tree/gh-pages) built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages. +For more info about contributing to Plotly documentation, please read through [contributing guidelines](https://github.com/plotly/documentation/blob/source/Contributing.md). + +You can also suggest new documentation examples by submitting a [Codepen](http://codepen.io/tag/plotly/) on community.plot.ly with tag [`plotly-js`](http://community.plot.ly/c/plotly-js). ## Contributing -Please read through our [contributing guidelines](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. +Please read through our [contributing guidelines](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md). Included are directions for opening issues, using plotly.js in your project and notes on development. ## Community Get updates on plotly.js's development and chat with the project maintainers and community members. -* Follow [@plotlygraphs on Twitter](https://twitter.com/plotlygraphs). -* Implementation help may be found at Stack Overflow (tagged [`plotly`](https://stackoverflow.com/questions/tagged/plotly)) or community.plot.ly (tagged [`plotly-js`](http://community.plot.ly/c/plotly-js). -* Developers should use the keyword `plotly` on packages which modify or add to the functionality of plotly.js when distributing through [npm](https://www.npmjs.com/browse/keyword/plotly) or similar delivery mechanisms for maximum discoverability. +* Follow [@plotlygraphs](https://twitter.com/plotlygraphs) on Twitter. +* Implementation help may be found at Stack Overflow (tagged [`plotly`](https://stackoverflow.com/questions/tagged/plotly)) or community.plot.ly (tagged [`plotly-js`](http://community.plot.ly/c/plotly-js)). +* Developers should use the keyword `plotly` on packages which modify or add to the functionality of plotly.js when distributing through [npm](https://www.npmjs.com/browse/keyword/plotly). * Direct developer email support can be purchased through a [Plotly Pro](https://plot.ly/products/cloud/) plan. ## Versioning -For transparency into our release cycle and in striving to maintain backward compatibility, plotly.js is maintained under [the Semantic Versioning guidelines](http://semver.org/). +plotly.js is maintained under the [Semantic Versioning guidelines](http://semver.org/). -See [the Releases section of our GitHub project](https://github.com/plotly/plotly.js/releases) for changelogs for each release version of plotly.js. +See the [Releases section](https://github.com/plotly/plotly.js/releases) of our GitHub project for changelogs for each release version of plotly.js. ## Clients for R, Python, and MATLAB @@ -70,8 +74,8 @@ Open-source clients to the plotly.js APIs are available at these links: |**R / RStudio**| [ropensci/plotly](https://github.com/ropensci/plotly) | [plot.ly/r/getting-started](https://plot.ly/r/getting-started) | |**Python / Pandas / IPython notebook**| [plotly/plotly.py](https://github.com/plotly/plotly.py) | [plot.ly/python/getting-started](https://plot.ly/python/getting-started) | |**MATLAB**| [plotly/matlab-api](https://github.com/plotly/matlab-api) | [plot.ly/matlab/getting-started](https://plot.ly/matlab/getting-started) | -|**node.js**| [plotly/plotly-nodejs](https://github.com/plotly/plotly-nodejs) | [plot.ly/nodejs/getting-started/](https://plot.ly/nodejs/getting-started/) | -|**Julia**| [plotly/Plotly.jl](https://github.com/plotly/Plotly.jl) | [plot.ly/julia/getting-started/](https://plot.ly/julia/getting-started/) | +|**node.js**| [plotly/plotly-nodejs](https://github.com/plotly/plotly-nodejs) | [plot.ly/nodejs/getting-started/](https://plot.ly/nodejs/getting-started) | +|**Julia**| [plotly/Plotly.jl](https://github.com/plotly/Plotly.jl) | [plot.ly/julia/getting-started/](https://plot.ly/julia/getting-started) | plotly.js charts can also be created and saved online for free at [plot.ly/plot](https://plot.ly/plot). @@ -84,9 +88,12 @@ plotly.js charts can also be created and saved online for free at [plot.ly/plot] |**Mikola Lysenko**| [@mikolalysenko](https://github.com/mikolalysenko) | [@MikolaLysenko](https://twitter.com/MikolaLysenko) | |**Ben Postlethwaite**| [@bpostlethwaite](https://github.com/bpostlethwaite) | | |**Chris Parmer**| [@chriddyp](https://github.com/chriddyp) | | +|**Chelsea Douglas**| [@cldougl](https://github.com/cldougl) | | ## Copyright and license -Code and documentation copyright 2015 Plotly, Inc. +Code and documentation copyright 2015 Plotly, Inc. + Code released under [the MIT license](https://github.com/plotly/plotly.js/blob/master/LICENSE). + Docs released under [Creative Commons](https://github.com/plotly/documentation/blob/source/LICENSE). diff --git a/package.json b/package.json index a9dec47a3dc..aa4c22dc43d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "plotly.js", "version": "1.0.0", - "description": "The premier javascript graphing library", + "description": "The open source javascript graphing library that powers plotly", "license": "MIT", "main": "./src/index.js", "repository": { @@ -11,29 +11,7 @@ "bugs": { "url": "https://github.com/plotly/plotly.js/issues" }, - "author": "Plotly Technologies Inc.", - "contributors": [ - { - "name": "Alex Johnson", - "email": "alex@plot.ly", - "url": "http://environment.harvard.edu/about/fellows/alex-johnson" - }, - { - "name": "Mikola Lysenko", - "email": "mikolalysenko@gmail.com", - "url": "http://0fps.net" - }, - { - "name": "Étienne Tétreault-Pinard", - "email": "etienne@plot.ly", - "url": "https://github.com/etpinard" - }, - { - "name": "Ben Postlethwaite", - "email": "ben@plot.ly", - "url": "http://benpostlethwaite.ca" - } - ], + "author": "Plotly Inc.", "keywords": [ "graphing", "plotting", diff --git a/test/image/README.md b/test/image/README.md index 200379425cb..2f7f0e900c9 100644 --- a/test/image/README.md +++ b/test/image/README.md @@ -1,34 +1,34 @@ # plotly.js image testing ------ -Test plotly.js with Plotly Image-Server docker container. +Test plotly.js with the Plotly Image-Server docker container. ### Run the container Under your `plotly.js` folder, run ```bash -$ docker run -d --name imagetest \ +docker run -d --name imagetest \ -v $PWD:/var/www/streambed/image_server/plotly.js \ -p 9010:9010 -p 2022:22 plotly/imageserver:[version] ``` where `[version]` is the latest Plotly Image-Server docker container version as listed on -[hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/). +[hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/) and +`imagetest` is the name of the docker container. ### Run the tests Under your `plotly.js` folder, run ```bash -$ npm run test-image +npm run test-image ``` ### SSH into docker ```bash -$ ssh -p 2022 root@localhost # with password `root` +ssh -p 2022 root@localhost # with password `root` ``` If you got this error: @@ -52,7 +52,7 @@ Host key verification failed. simply run ```bash -$ ssh-keygen -f "${HOME}/.ssh/known_hosts" -R [localhost]:2022 +ssh-keygen -f "${HOME}/.ssh/known_hosts" -R [localhost]:2022 ``` to remove host information.