Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bfa4931

Browse files
downgrading
1 parent 5759eeb commit bfa4931

File tree

2,115 files changed

+427803
-685689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,115 files changed

+427803
-685689
lines changed

CHANGELOG.md

100644100755
Lines changed: 0 additions & 427 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

100644100755
Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,25 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra
1717
| `type: bug` | bug report confirmed by a plotly team member |
1818
| `type: regression` | bug that introduced a change in behavior from one version to the next |
1919
| `type: feature` | planned feature additions |
20-
| `type: translation` | localization-related tasks |
2120
| `type: performance` | performance related tasks |
2221
| `type: maintenance` | source code cleanup resulting in no enhancement for users |
2322
| `type: documentation` | API doc or attribute description improvements |
2423
| `type: community` | issue left open for community input and pull requests |
2524
| `type: duplicate` | *self-explanatory* |
2625
| `type: wontfix` | *self-explanatory* |
27-
| `status: discussion needed` | Issue or PR that required discussion among maintainers before moving forward |
28-
| `status: in progress` | PRs that required some initial feedback but not ready to merge |
26+
| `status: discussion needed` | Issue or PR that required discussion among maintaners before moving forward |
27+
| `status: in progress` | PRs that required some intial feedback but not ready to merge |
2928
| `status: reviewable` | PRs that are completed from the author's perspective |
3029
| `status: on hold` | PRs that are put on hold |
3130

3231
## Development
3332

34-
#### Prerequisites
33+
#### Perequisites
3534

3635
- git
37-
- [node.js](https://nodejs.org/en/). We recommend using node.js v8.x, but all
38-
versions starting from v4 should work. Upgrading and managing node versions
39-
can be easily done using [`nvm`](https://github.com/creationix/nvm) or its
40-
Windows alternatives.
41-
- [`npm`](https://www.npmjs.com/) v5.x and up (which ships by default with
42-
node.js v8.x) to ensure that the
43-
[`package-lock.json`](https://docs.npmjs.com/files/package-lock.json) file is
44-
used and updated correctly.
36+
- [node.js](https://nodejs.org/en/). We recommend using node.js v6.x or v4.x (both LTS).
37+
Upgrading and managing node versions can be easily done using
38+
[`nvm`](https://github.com/creationix/nvm) or its Windows alternatives.
4539

4640
#### Step 1: Clone the plotly.js repo and install its dependencies
4741

@@ -177,27 +171,6 @@ which shows the baseline image, the generated image, the diff and the json mocks
177171

178172
To view the results of a run on CircleCI, download the `build/test_images/` and `build/test_images_diff/` artifacts into your local repo and then run `npm run start-image_viewer`.
179173

180-
### Writing interaction tests
181-
Keep in mind that the interaction coordinates are relative to the top-left corner of the plot, including the margins. To produce a reliable interaction test,
182-
it may be necessary to fix the width, height, margins, X axis range and Y axis range of the plot. For example:
183-
184-
```
185-
Plotly.newPlot(gd, [{
186-
x: [1, 1, 1, 2, 2, 2, 3, 3, 3],
187-
y: [1, 2, 3, 1, 2, 3, 1, 2, 3],
188-
mode: 'markers'
189-
}], {
190-
width: 400, height: 400,
191-
margin: {l: 100, r: 100, t: 100, b: 100},
192-
xaxis: {range: [0, 4]},
193-
yaxis: {range: [0, 4]}
194-
});
195-
```
196-
197-
This will produce the following plot, and say you want to simulate a selection path of (175, 175) to (225, 225):
198-
199-
<img src="https://user-images.githubusercontent.com/31989842/38890553-0bc6190c-4282-11e8-8efc-077bf05ca565.png">
200-
201174

202175
## Repo organization
203176

LICENSE

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 Plotly, Inc
3+
Copyright (c) 2017 Plotly, Inc
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

100644100755
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
[![npm version](https://badge.fury.io/js/plotly.js.svg)](https://badge.fury.io/js/plotly.js)
44
[![circle ci](https://circleci.com/gh/plotly/plotly.js.png?&style=shield&circle-token=1f42a03b242bd969756fc3e53ede204af9b507c0)](https://circleci.com/gh/plotly/plotly.js)
5-
[![MIT License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://github.com/plotly/plotly.js/blob/master/LICENSE)
65

76
Built on top of [d3.js](http://d3js.org/) and [stack.gl](http://stack.gl/),
8-
plotly.js is a high-level, declarative charting library. plotly.js ships with over 30
7+
plotly.js is a high-level, declarative charting library. plotly.js ships with over 20
98
chart types, including scientific charts, 3D graphs, statistical charts, SVG maps, financial charts,
109
and more.
1110

@@ -20,7 +19,6 @@ and more.
2019

2120
* [Quick start options](#quick-start-options)
2221
* [Modules](#modules)
23-
* [Building plotly.js](#building-plotlyjs)
2422
* [Bugs and feature requests](#bugs-and-feature-requests)
2523
* [Documentation](#documentation)
2624
* [Contributing](#contributing)
@@ -56,13 +54,13 @@ and require plotly.js using CommonJS as `var Plotly = require('plotly.js');` or
5654
#### Use the plotly.js CDN hosted by Fastly
5755
```html
5856
<!-- Latest compiled and minified plotly.js JavaScript -->
59-
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
57+
<script type="text/javascript" src="https://cdn.plot.ly/plotly-latest.min.js"></script>
6058

6159
<!-- OR use a specific plotly.js release (e.g. version 1.5.0) -->
62-
<script src="https://cdn.plot.ly/plotly-1.5.0.min.js"></script>
60+
<script type="text/javascript" src="https://cdn.plot.ly/plotly-1.5.0.min.js"></script>
6361

6462
<!-- OR an un-minified version is also available -->
65-
<script src="https://cdn.plot.ly/plotly-latest.js"></script>
63+
<script type="text/javascript" src="https://cdn.plot.ly/plotly-latest.js"></script>
6664
```
6765

6866
and use the `Plotly` object in the window scope.
@@ -101,12 +99,13 @@ To learn more about the plotly.js module architecture, refer to our [modularizin
10199
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:
102100

103101
```html
104-
<script src="my-plotly-bundle.js" charset="utf-8"></script>
102+
<script type="text/javascript" src="my-plotly-bundle.js" charset="utf-8"></script>
105103
```
106104

107-
## Building plotly.js
108105

109-
Building instructions using `webpack`, `browserify` and other build frameworks are in [`BUILDING.md`](https://github.com/plotly/plotly.js/blob/master/BUILDING.md)
106+
#### Webpack Usage with Modules
107+
108+
Browserify [transforms](https://github.com/substack/browserify-handbook#transforms) are required to build plotly.js, namely, [glslify](https://github.com/stackgl/glslify) to transform WebGL shaders and [cwise](https://github.com/scijs/cwise) to compile component-wise array operations. To make the trace module system work with Webpack, you will need to install [ify-loader](https://github.com/hughsk/ify-loader) and add it to your `webpack.config.json` for your build to correctly bundle plotly.js files.
110109

111110
## Bugs and feature requests
112111

@@ -162,7 +161,6 @@ plotly.js charts can also be created and saved online for free at [plot.ly/creat
162161
|**Alex C. Johnson**| [@alexcjohnson](https://github.com/alexcjohnson) | |
163162
|**Étienne Tétreault-Pinard**| [@etpinard](https://github.com/etpinard) | [@etpinard](https://twitter.com/etpinard) |
164163
|**Mikola Lysenko**| [@mikolalysenko](https://github.com/mikolalysenko) | [@MikolaLysenko](https://twitter.com/MikolaLysenko) |
165-
| **Dmitry Yv.** | [@dy](https://github.com/dy) | [@DimaYv](https://twitter.com/dimayv)|
166164
|**Ricky Reusser**| [@rreusser](https://github.com/rreusser) | [@rickyreusser](https://twitter.com/rickyreusser) |
167165
|**Robert Monfera**| [@monfera](https://github.com/monfera) | [@monfera](https://twitter.com/monfera) |
168166
|**Nicolas Riesco**| [@n-riesco](https://github.com/n-riesco) | |
@@ -175,7 +173,7 @@ plotly.js charts can also be created and saved online for free at [plot.ly/creat
175173

176174
## Copyright and license
177175

178-
Code and documentation copyright 2018 Plotly, Inc.
176+
Code and documentation copyright 2017 Plotly, Inc.
179177

180178
Code released under the [MIT license](https://github.com/plotly/plotly.js/blob/master/LICENSE).
181179

SECURITY.md

100644100755
File mode changed.

bower.json

100644100755
File mode changed.

build/README.md

100644100755
File mode changed.

build/plotcss.js

100644100755
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ var rules = {
3030
"X .cursor-nw-resize": "cursor:nw-resize;",
3131
"X .cursor-n-resize": "cursor:n-resize;",
3232
"X .cursor-ne-resize": "cursor:ne-resize;",
33-
"X .cursor-grab": "cursor:-webkit-grab;cursor:grab;",
3433
"X .modebar": "position:absolute;top:2px;right:2px;z-index:1001;background:rgba(255,255,255,0.7);",
3534
"X .modebar--hover": "opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;",
3635
"X:hover .modebar--hover": "opacity:1;",
@@ -51,7 +50,7 @@ var rules = {
5150
"X .select-outline-2": "stroke:black;stroke-dasharray:2px 2px;",
5251
Y: "font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;",
5352
"Y p": "margin:0;",
54-
"Y .notifier-note": "min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;",
53+
"Y .notifier-note": "min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;",
5554
"Y .notifier-close": "color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;",
5655
"Y .notifier-close:hover": "color:#444;text-decoration:none;cursor:pointer;"
5756
};

build/ploticon.js

100644100755
File mode changed.

circle.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
general:
2+
artifacts:
3+
- build/test_images/
4+
- build/test_images_diff/
5+
6+
machine:
7+
node:
8+
version: 6.1.0
9+
timezone:
10+
America/Anchorage
11+
services:
12+
- docker
13+
14+
dependencies:
15+
override:
16+
- npm install && npm dedupe && npm prune && npm install
17+
- npm ls || true
18+
- npm run docker -- pull
19+
- npm run pretest
20+
- npm run docker -- run
21+
- npm run cibuild
22+
- npm run docker -- setup
23+
24+
test:
25+
override:
26+
- ./tasks/ci_test.sh:
27+
parallel: true

composer.json

100644100755
File mode changed.

devtools/.eslintrc

100644100755
File mode changed.

devtools/image_viewer/index.html

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<div id="plot-images"></div>
88
<pre id="plot-mock"></pre>
99

10-
<script src="../../build/image_viewer-bundle.js"></script>
10+
<script type="text/javascript" src="../../build/image_viewer-bundle.js"></script>
1111
</body>
1212
</html>

devtools/image_viewer/server.js

100644100755
File mode changed.

devtools/image_viewer/viewer.js

100644100755
File mode changed.

devtools/test_dashboard/devtools.js

100644100755
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function searchMocks(e) {
202202

203203
results.forEach(function(r) {
204204
var result = document.createElement('span');
205-
result.className = getResultClass(r.name);
205+
result.className = 'search-result';
206206
result.innerText = r.name;
207207

208208
result.addEventListener('click', function() {
@@ -212,10 +212,6 @@ function searchMocks(e) {
212212
// Clear plots and plot selected.
213213
Tabs.purge();
214214
Tabs.plotMock(mockName);
215-
216-
mocksList.querySelectorAll('span').forEach(function(el) {
217-
el.className = getResultClass(el.innerText);
218-
});
219215
});
220216

221217
mocksList.appendChild(result);
@@ -226,16 +222,8 @@ function searchMocks(e) {
226222
});
227223
}
228224

229-
function getNameFromHash() {
230-
return window.location.hash.replace(/^#/, '');
231-
}
232-
233-
function getResultClass(name) {
234-
return 'search-result' + (getNameFromHash() === name ? ' search-result__selected' : '');
235-
}
236-
237225
function plotFromHash() {
238-
var initialMock = getNameFromHash();
226+
var initialMock = window.location.hash.replace(/^#/, '');
239227

240228
if(initialMock.length > 0) {
241229
Tabs.plotMock(initialMock);

devtools/test_dashboard/index.html

100644100755
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@
1919
</div>
2020
<div id="snapshot"></div>
2121

22-
<!-- uncomment below for IE9/10 support -->
23-
<!-- <script>if(typeof window.Int16Array !== 'function')document.write("<scri"+"pt src='../../dist/extras/typedarray.min.js'></scr"+"ipt>");</script>
24-
<script>document.write("<scri"+"pt src='../../dist/extras/request_animation_frame.js'></scr"+"ipt>");</script> -->
25-
26-
<script src="../../dist/extras/mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script>
27-
<script id="source" src="../../build/plotly.js"></script>
28-
<script src="../../build/test_dashboard-bundle.js"></script>
22+
<script type="text/javascript" src="../../dist/extras/mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script>
23+
<script id="source" type="text/javascript" src="../../build/plotly.js"></script>
24+
<script type="text/javascript" src="../../build/test_dashboard-bundle.js"></script>
2925
</body>
3026
</html>

devtools/test_dashboard/perf.js

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ window.timeit = function(f, n, nchunk, arg) {
4242
times.sort();
4343
var min = (times[0]).toFixed(4);
4444
var max = (times[n - 1]).toFixed(4);
45-
var median = (times[Math.min(Math.ceil(n / 2), n - 1)]).toFixed(4);
45+
var median = (times[Math.ceil(n / 2)]).toFixed(4);
4646
var mean = (totalTime / n).toFixed(4);
4747
console.log((f.name || 'function') + ' timing (ms) - min: ' + min +
4848
' max: ' + max +

devtools/test_dashboard/server.js

100644100755
File mode changed.

devtools/test_dashboard/style.css

100644100755
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ header span{
5656
color: #fff;
5757
background-color: #4983EC;
5858
}
59-
.search-result__selected{
60-
background-color: #DDDDEE;
61-
}
6259
#plots{
6360
overflow: scroll;
6461
}

0 commit comments

Comments
 (0)