Skip to content

Commit caf29a2

Browse files
committed
Merge pull request #3 from plotly/doc-updates
README and CONTRIBUTING updates
2 parents ef09109 + e93fa4e commit caf29a2

File tree

5 files changed

+134
-49
lines changed

5 files changed

+134
-49
lines changed

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# plotly.js changelog.
2+
3+
For more context information, please read through the
4+
[release notes](https://github.com/plotly/plotly.js/releases).
5+
6+
## [1.0.0] -- 2015-11-17
7+
8+
First fully open source release.
9+
10+
### Added
11+
- Add 2D WebGL plot engine
12+
13+
### Changed
14+
- Save to cloud is now done via a modebar button by default,
15+
the `'Edit chart'` link is still available through the
16+
`'showLink'` plot config.
17+
- Better double-click notifier CSS
18+
19+
### Fixed
20+
- Fix `Plotly.newPlot` 3D and geo bug.
21+
- Fix `plotly_click` event bug in latest Chrome and Firefox.
22+
23+
### Known limitations
24+
- Different plot types cannot be mixed in subplots.
25+
- 2D WebGL has no image test support.
26+
- Click and hover events are not hooked for gl3d, geo and gl2d
27+
plot types.
28+
- Polar chart are under-developed.

CONTRIBUTING.md

+73-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,73 @@
1-
yolos!
1+
# Contributing to plotly.js
2+
3+
### Opening issues
4+
5+
Search for existing and closed issues. If your problem or idea is not addressed
6+
yet, [please open a new issue](https://github.com/plotly/plotly.js/issues/new).
7+
8+
### Development
9+
10+
**Prerequisites**:
11+
12+
- git
13+
- [node.js](https://nodejs.org/en/). We recommend using node.js 4.2.1 (LTS).
14+
Upgrading and managing node versions can be easily done using
15+
[`nvm`](https://github.com/creationix/nvm) or its Windows alternatives.
16+
17+
**Step 1** Clone the plotly.js repo and install its dependencies
18+
19+
```
20+
git clone https://github.com/plotly/plotly.js.git
21+
cd plotly.js
22+
npm install
23+
```
24+
25+
**Step 2** Start the test dashboard
26+
27+
```
28+
npm run start-test_dashboard
29+
```
30+
31+
This command bundles up the source files with source maps, starts
32+
a [watchify](https://github.com/substack/watchify) file watcher (making the your
33+
dev plotly.js bundle update every time a source file is saved) and opens up
34+
a tab in your browser.
35+
36+
**Step 3** Open up the console and start developing
37+
38+
Make some modification to the source, refresh the page and check the results
39+
by for example pasting in the console:
40+
41+
```js
42+
Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2]}]);
43+
```
44+
45+
**Other npm scripts**:
46+
47+
- `npm run preprocess`: pre-processes the css and svg source file in js. This
48+
script is run automatically on `npm install`.
49+
- `npm run watch`: starts a watchify file watcher just like the test dashboard but
50+
without booting up a server.
51+
- `npm run lint`: runs jshint on all source files
52+
53+
### Testing
54+
55+
Both jasmine and image test are run on
56+
[CircleCI](https://circleci.com/gh/plotly/plotly.js) on every pushes to this
57+
repo.
58+
59+
Jasmine tests are run in a browser using
60+
[karma](https://github.com/karma-runner/karma). To run them locally:
61+
62+
```
63+
npm run test-jasmine
64+
```
65+
66+
Image pixel comparison tests are run in a docker container. For more
67+
information on how to run them locally, please refer to [image test
68+
README](https://github.com/plotly/plotly.js/blob/master/test/image/README.md).
69+
70+
71+
### Repo organization
72+
73+
### Coding style

README.md

+24-17
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# [plotly.js](https://plot.ly/javascript/getting-started/)
1+
# [plotly.js](https://plot.ly/javascript)
22

3-
[![npm version](https://img.shields.io/npm/v/plotly.svg)](https://www.npmjs.com/package/plotly)
43

5-
To get started, check out <https://plot.ly/javascript/getting-started/>!
4+
Built on top of [d3.js](http://d3js.org/) and [stack.gl](http://stack.gl/),
5+
plotly.js is a high-level, declarative charting library. plotly.js ships with 20
6+
chart types, including 3D charts, statistical graphs, and SVG maps.
67

78
## Table of contents
89

@@ -20,9 +21,9 @@ To get started, check out <https://plot.ly/javascript/getting-started/>!
2021

2122
Several quick start options are available:
2223

23-
* [Download the latest release](https://github.com/plotly/plotly.js/releases/v1.0.0/plotly.js.zip).
24+
* [Download the latest release](https://github.com/plotly/plotly.js/releases/).
2425
* Clone the repo: `git clone https://github.com/plotly/plotly.js.git`.
25-
* Install with [npm](https://www.npmjs.com): `npm install plotly`.
26+
* Install with [npm](https://www.npmjs.com): `npm install plotly.js`.
2627
* Use the plotly.js CDN hosted by Fastly:
2728

2829
```html
@@ -34,32 +35,35 @@ Read the [Getting started page](https://plot.ly/javascript/getting-started/) for
3435
3536
## Bugs and feature requests
3637
37-
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).
38+
Have a bug or a feature request? Please first read the [issues guidelines](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md).
3839
3940
## Documentation
4041
41-
Plotly.js documentation, in the repo documentation, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at <https://plot.ly/javascript/getting-started/>. The docs may also be run locally.
42+
Official plotly.js documentation is hosted on [plot.ly/javascript](https://plot.ly/javascript).
4243
43-
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).
44+
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.
45+
For more info about contributing to Plotly documentation, please read through [contributing guidelines](https://github.com/plotly/documentation/blob/source/Contributing.md).
46+
47+
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).
4448
4549
## Contributing
4650
47-
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.
51+
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.
4852
4953
## Community
5054
5155
Get updates on plotly.js's development and chat with the project maintainers and community members.
5256
53-
* Follow [@plotlygraphs on Twitter](https://twitter.com/plotlygraphs).
54-
* 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).
55-
* 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.
57+
* Follow [@plotlygraphs](https://twitter.com/plotlygraphs) on Twitter.
58+
* 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)).
59+
* 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).
5660
* Direct developer email support can be purchased through a [Plotly Pro](https://plot.ly/products/cloud/) plan.
5761
5862
## Versioning
5963
60-
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/).
64+
plotly.js is maintained under the [Semantic Versioning guidelines](http://semver.org/).
6165
62-
See [the Releases section of our GitHub project](https://github.com/plotly/plotly.js/releases) for changelogs for each release version of plotly.js.
66+
See the [Releases section](https://github.com/plotly/plotly.js/releases) of our GitHub project for changelogs for each release version of plotly.js.
6367
6468
## Clients for R, Python, and MATLAB
6569
@@ -70,8 +74,8 @@ Open-source clients to the plotly.js APIs are available at these links:
7074
|**R / RStudio**| [ropensci/plotly](https://github.com/ropensci/plotly) | [plot.ly/r/getting-started](https://plot.ly/r/getting-started) |
7175
|**Python / Pandas / IPython notebook**| [plotly/plotly.py](https://github.com/plotly/plotly.py) | [plot.ly/python/getting-started](https://plot.ly/python/getting-started) |
7276
|**MATLAB**| [plotly/matlab-api](https://github.com/plotly/matlab-api) | [plot.ly/matlab/getting-started](https://plot.ly/matlab/getting-started) |
73-
|**node.js**| [plotly/plotly-nodejs](https://github.com/plotly/plotly-nodejs) | [plot.ly/nodejs/getting-started/](https://plot.ly/nodejs/getting-started/) |
74-
|**Julia**| [plotly/Plotly.jl](https://github.com/plotly/Plotly.jl) | [plot.ly/julia/getting-started/](https://plot.ly/julia/getting-started/) |
77+
|**node.js**| [plotly/plotly-nodejs](https://github.com/plotly/plotly-nodejs) | [plot.ly/nodejs/getting-started/](https://plot.ly/nodejs/getting-started) |
78+
|**Julia**| [plotly/Plotly.jl](https://github.com/plotly/Plotly.jl) | [plot.ly/julia/getting-started/](https://plot.ly/julia/getting-started) |
7579
7680
plotly.js charts can also be created and saved online for free at [plot.ly/plot](https://plot.ly/plot).
7781
@@ -84,9 +88,12 @@ plotly.js charts can also be created and saved online for free at [plot.ly/plot]
8488
|**Mikola Lysenko**| [@mikolalysenko](https://github.com/mikolalysenko) | [@MikolaLysenko](https://twitter.com/MikolaLysenko) |
8589
|**Ben Postlethwaite**| [@bpostlethwaite](https://github.com/bpostlethwaite) | |
8690
|**Chris Parmer**| [@chriddyp](https://github.com/chriddyp) | |
91+
|**Chelsea Douglas**| [@cldougl](https://github.com/cldougl) | |
8792
8893
## Copyright and license
8994
90-
Code and documentation copyright 2015 Plotly, Inc.
95+
Code and documentation copyright 2015 Plotly, Inc.
96+
9197
Code released under [the MIT license](https://github.com/plotly/plotly.js/blob/master/LICENSE).
98+
9299
Docs released under [Creative Commons](https://github.com/plotly/documentation/blob/source/LICENSE).

package.json

+2-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "plotly.js",
33
"version": "1.0.0",
4-
"description": "The premier javascript graphing library",
4+
"description": "The open source javascript graphing library that powers plotly",
55
"license": "MIT",
66
"main": "./src/index.js",
77
"repository": {
@@ -11,29 +11,7 @@
1111
"bugs": {
1212
"url": "https://github.com/plotly/plotly.js/issues"
1313
},
14-
"author": "Plotly Technologies Inc.",
15-
"contributors": [
16-
{
17-
"name": "Alex Johnson",
18-
"email": "[email protected]",
19-
"url": "http://environment.harvard.edu/about/fellows/alex-johnson"
20-
},
21-
{
22-
"name": "Mikola Lysenko",
23-
"email": "[email protected]",
24-
"url": "http://0fps.net"
25-
},
26-
{
27-
"name": "Étienne Tétreault-Pinard",
28-
"email": "[email protected]",
29-
"url": "https://github.com/etpinard"
30-
},
31-
{
32-
"name": "Ben Postlethwaite",
33-
"email": "[email protected]",
34-
"url": "http://benpostlethwaite.ca"
35-
}
36-
],
14+
"author": "Plotly Inc.",
3715
"keywords": [
3816
"graphing",
3917
"plotting",

test/image/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
# plotly.js image testing
2-
-----
32

4-
Test plotly.js with Plotly Image-Server docker container.
3+
Test plotly.js with the Plotly Image-Server docker container.
54

65
### Run the container
76

87
Under your `plotly.js` folder, run
98

109
```bash
11-
$ docker run -d --name imagetest \
10+
docker run -d --name imagetest \
1211
-v $PWD:/var/www/streambed/image_server/plotly.js \
1312
-p 9010:9010 -p 2022:22 plotly/imageserver:[version]
1413
```
1514

1615
where `[version]` is the latest Plotly Image-Server docker container version
1716
as listed on
18-
[hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/).
17+
[hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/) and
18+
`imagetest` is the name of the docker container.
1919

2020
### Run the tests
2121

2222
Under your `plotly.js` folder, run
2323

2424
```bash
25-
$ npm run test-image
25+
npm run test-image
2626
```
2727

2828
### SSH into docker
2929

3030
```bash
31-
$ ssh -p 2022 root@localhost # with password `root`
31+
ssh -p 2022 root@localhost # with password `root`
3232
```
3333

3434
If you got this error:
@@ -52,7 +52,7 @@ Host key verification failed.
5252
simply run
5353

5454
```bash
55-
$ ssh-keygen -f "${HOME}/.ssh/known_hosts" -R [localhost]:2022
55+
ssh-keygen -f "${HOME}/.ssh/known_hosts" -R [localhost]:2022
5656
```
5757

5858
to remove host information.

0 commit comments

Comments
 (0)