From 1c20baa2d6e6e734a6ddce720095c61a9e2fedf5 Mon Sep 17 00:00:00 2001 From: etpinard Date: Sun, 15 Nov 2015 10:28:47 -0500 Subject: [PATCH 01/11] update README.md --- README.md | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 8fc10a2d2a3..d333d8a5a68 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -# [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) +[![npm version](https://img.shields.io/npm/v/plotly.svg)](https://www.npmjs.com/package/plotly.js) -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 +22,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 +36,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 (tagged [`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). +* 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) or similar delivery mechanisms for maximum discoverability. * 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 +75,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). @@ -87,6 +92,6 @@ plotly.js charts can also be created and saved online for free at [plot.ly/plot] ## Copyright and license -Code and documentation copyright 2015 Plotly, Inc. -Code released under [the MIT license](https://github.com/plotly/plotly.js/blob/master/LICENSE). +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). From 0b1843463f1828d6c448f137df880d06a9665562 Mon Sep 17 00:00:00 2001 From: etpinard Date: Sun, 15 Nov 2015 10:29:15 -0500 Subject: [PATCH 02/11] add Contributing.md first pass --- CONTRIBUTING.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9766716e2b3..440ef0b6c9a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,69 @@ -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** Build plotly.js + +``` +npm run build +``` + +The build script combines: + +- `npm run preprocess`, which converts `scss` and `svg` assets to `js` and +- `npm run bundle`, which runs + [browserify](https://github.com/substack/node-browserify) on the source files + +**Step 3** Start test dashboard + +``` +npm run start-test_dashboard +``` + +This command bundles up the source files with source maps, starts +[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. + +### Testing + +``` +npm test +``` + +Jasmine tests are run in a browser using +[karma](https://github.com/karma-runner/karma) + +``` +npm run test-jasmine +``` + +Image pixel comparison tests are run in a docker container + +``` +npm run test-image +``` + +### Repo organization + +### Coding style From f3c6ff664cfaa6aa30942f0c64ea7bd4e426263e Mon Sep 17 00:00:00 2001 From: etpinard Date: Sun, 15 Nov 2015 10:29:32 -0500 Subject: [PATCH 03/11] update the package.json description --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 70795cbb6d5..6be0ae870b6 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", "repository": { "type": "git", From 344cf5b47bf077caa9ef6d63f4c975e372ccd562 Mon Sep 17 00:00:00 2001 From: etpinard Date: Mon, 16 Nov 2015 19:19:30 -0500 Subject: [PATCH 04/11] rm contributors section in package.json (stick to README.md) --- package.json | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/package.json b/package.json index 5e8e70c809f..7c02e71949b 100644 --- a/package.json +++ b/package.json @@ -12,28 +12,6 @@ "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" - } - ], "keywords": [ "graphing", "plotting", From 9508dc84ff4abea74e742e042f132d9eb1e6b27d Mon Sep 17 00:00:00 2001 From: etpinard Date: Mon, 16 Nov 2015 19:19:58 -0500 Subject: [PATCH 05/11] add Chelsea to Creators section in README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d333d8a5a68..8f9a58e307e 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ 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 From 8a8d731a238ccbc78e4bc82e94f4beacd8209955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Mon, 16 Nov 2015 23:02:02 -0500 Subject: [PATCH 06/11] rm npm badge (for now) --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8f9a58e307e..5038d2ff1a7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # [plotly.js](https://plot.ly/javascript) -[![npm version](https://img.shields.io/npm/v/plotly.svg)](https://www.npmjs.com/package/plotly.js) 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 From 1fa824f92a1bfbf1f23435c6a45e0d2281b02565 Mon Sep 17 00:00:00 2001 From: etpinard Date: Mon, 16 Nov 2015 23:07:42 -0500 Subject: [PATCH 07/11] small README edits --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8f9a58e307e..a7998407497 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Official plotly.js documentation is hosted on [plot.ly/javascript](https://plot. 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 (tagged [`plotly-js`](http://community.plot.ly/c/plotly-js). +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 @@ -56,13 +56,13 @@ Please read through our [contributing guidelines](https://github.com/plotly/plot Get updates on plotly.js's development and chat with the project maintainers and community members. * 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) or similar delivery mechanisms for maximum discoverability. +* 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 -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](https://github.com/plotly/plotly.js/releases) of our GitHub project for changelogs for each release version of plotly.js. @@ -94,5 +94,7 @@ plotly.js charts can also be created and saved online for free at [plot.ly/plot] ## Copyright and license Code and documentation copyright 2015 Plotly, Inc. -Code released under [the MIT license](https://github.com/plotly/plotly.js/blob/master/LICENSE). + +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). From d63390a0698239c9ab33f62bc5fdccf7ef126ff8 Mon Sep 17 00:00:00 2001 From: etpinard Date: Mon, 16 Nov 2015 23:09:53 -0500 Subject: [PATCH 08/11] make package.json author match README --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8669097d38f..aa4c22dc43d 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "bugs": { "url": "https://github.com/plotly/plotly.js/issues" }, - "author": "Plotly Technologies Inc.", + "author": "Plotly Inc.", "keywords": [ "graphing", "plotting", From d4efd4ea78706f94d7568c91f69014f1b6b81eb9 Mon Sep 17 00:00:00 2001 From: etpinard Date: Mon, 16 Nov 2015 23:29:13 -0500 Subject: [PATCH 09/11] update CONTRIBUTING and image-test README --- CONTRIBUTING.md | 46 ++++++++++++++++++++++++-------------------- test/image/README.md | 11 ++++++----- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 440ef0b6c9a..de2c48ba511 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,47 +22,51 @@ cd plotly.js npm install ``` -**Step 2** Build plotly.js +**Step 2** Start the test dashboard ``` -npm run build +npm run start-test_dashboard ``` -The build script combines: +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. -- `npm run preprocess`, which converts `scss` and `svg` assets to `js` and -- `npm run bundle`, which runs - [browserify](https://github.com/substack/node-browserify) on the source files +**Step 3** Open up the console and start developing -**Step 3** Start test dashboard +Make some modification to the source, refresh the page and check the results +by for example pasting in the console: -``` -npm run start-test_dashboard +```js +Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2]}]); ``` -This command bundles up the source files with source maps, starts -[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. +**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 -``` -npm test -``` +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) +[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 +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). -``` -npm run test-image -``` ### Repo organization diff --git a/test/image/README.md b/test/image/README.md index 200379425cb..aa43bfdcfed 100644 --- a/test/image/README.md +++ b/test/image/README.md @@ -8,27 +8,28 @@ Test plotly.js with Plotly Image-Server docker 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 +53,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. From 000fb102f553b5511793e8a22b107393c95fe377 Mon Sep 17 00:00:00 2001 From: etpinard Date: Mon, 16 Nov 2015 23:51:07 -0500 Subject: [PATCH 10/11] add CHANGELOG --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 CHANGELOG.md 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. From e93fa4eba3479b12ea407bc745ebb52bb4045422 Mon Sep 17 00:00:00 2001 From: etpinard Date: Tue, 17 Nov 2015 00:00:54 -0500 Subject: [PATCH 11/11] minor tweak to test image README --- test/image/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/image/README.md b/test/image/README.md index aa43bfdcfed..2f7f0e900c9 100644 --- a/test/image/README.md +++ b/test/image/README.md @@ -1,7 +1,6 @@ # 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