8000 Merge branch 'master' into gl3d-blend-rebase to resolve conflicts in … · plotly/plotly.js@7c9ff00 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7c9ff00

Browse files
committed
Merge branch 'master' into gl3d-blend-rebase to resolve conflicts in gl-plot3d
2 parents 3373d8c + 13947fc commit 7c9ff00

File tree

603 files changed

+67534
-39030
lines changed

Some content is hidden

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

603 files changed

+67534
-39030
lines changed

BUILDING.md

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,60 @@ browserify index.js > bundle.js
4242

4343
## Angular CLI
4444

45-
Currently Angular CLI uses Webpack under the hood to bundle and build your Angular application.
46-
Sadly it doesn't allow you to override its Webpack config in order to add the plugin mentioned in the [Webpack](#webpack) section.
47-
Without this plugin your build will fail when it tries to build glslify for WebGL plots.
45+
Since Angular uses webpack under the hood and doesn't allow easily to change it's webpack configuration, there is some work needed using a `custom-webpack` builder to get things going.
4846

49-
Currently 2 solutions exists to circumvent this issue:
47+
1. Install [`@angular-builders/custom-webpack`](https://www.npmjs.com/package/@angular-builders/custom-webpack) and [ify-loader@v1.1.0+](https://github.com/hughsk/ify-loader)
48+
2. Create a new `extra-webpack.config.js` beside `angular.json`.
5049

51-
1) If you need to use WebGL plots, you can create a Webpack config from your Angular CLI project with [ng eject](https://github.com/angular/angular-cli/wiki/eject). This will allow you to follow the instructions regarding Webpack.
52-
2) If you don't need to use WebGL plots, you can make a custom build containing only the required modules for your plots. The clean way to do it with Angular CLI is not the method described in the [Modules](https://github.com/plotly/plotly.js/blob/master/README.md#modules) section of the README but the following:
53-
54-
```typescript
55-
// in the Component you want to create a graph
56-
import * as Plotly from 'plotly.js';
50+
> extra-webpack.config.json
51+
```javascript
52+
module.exports = {
53+
module: {
54+
rules: [
55+
{
56+
test: /\.js$/,
57+
include: [
58+
path.resolve(__dirname, "node_modules/plotly.js")
59+
],
60+
loader: 'ify-loader'
61+
}
62+
]
63+
},
64+
};
5765
```
5866

67+
3. Change the builder in `angular.json` to `"@angular-builders/custom-webpack:browser` and configure it correctly to use our new webpack config.
68+
69+
> angular.json
5970
```json
60-
// in src/tsconfig.app.json
61-
// List here the modules you want to import
62-
// this example is for scatter plots
6371
{
64-
"compilerOptions": {
65-
"paths": {
66-
"plotly.js": [
67-
"../node_modules/plotly.js/lib/core.js",
68-
"../node_modules/plotly.js/lib/scatter.js"
69-
]
72+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
73+
"version": 1,
74+
"newProjectRoot": "projects",
75+
"projects": {
76+
"MY_PROJECT_NAME": {
77+
"root": "",
78+
"sourceRoot": "src",
79+
"projectType": "application",
80+
"prefix": "app",
81+
"schematics": {
82+
"@schematics/angular:component": {
83+
"styleext": "scss"
84+
}
85+
},
86+
"architect": {
87+
"build": {
88+
"builder": "@angular-builders/custom-webpack:browser",
89+
"options": {
90+
....
91+
"customWebpackConfig": {
92+
"path": "./extra-webpack.config.js",
93+
"replaceDuplicatePlugins": true,
94+
"mergeStrategies": {"module.rules": "merge"}
95+
}
96+
}
7097
}
71-
}
72-
}
98+
...
7399
```
100+
It's important to set `projects.x.architect.build.builder` and `projects.x.architect.build.options.customWebpackConfig`.
101+
If you have more projects in your `angular.json` make sure to adjust their settings accordingly.

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,77 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
99

1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

12+
## [1.54.4] -- 2020-06-22
13+
### Changed
14+
- Bump `ecstatic`, `gl-selet-static`, `gl-plot2d` & `gl-plot3d` and drop `cwise` to simplify build process & address security warnings [#4929, #4930, #4934]
15+
16+
### Fixed
17+
- Fix setting width and color of lines via template various attributes namely `tickcolor`, `tickwidth`, `ticklen`, `linecolor`, `linewidth`, `zerolinecolor`, `zerolinewidth`, `gridcolor`, `gridwidth`, etc. [#4904]
18+
19+
20+
## [1.54.3] -- 2020-06-16
21+
### Fixed
22+
- Fix `autosize` case of hidden div with non-px size [#4925]
23+
24+
25+
## [1.54.2] -- 2020-06-10
26+
### Changed
27+
- Bump `regl` dependency to v1.6.1 [#4881]
28+
- Bump `ndarray` dependency to v1.0.19 [#4910]
29+
- Bump `mapbox-gl` dependency to v1.10.1 [#4859]
30+
- Improve docs about building Plotly with Angular [#4182]
31+
32+
### Fixed
33+
- Fix wheel event for IE-11 [#4385]
34+
- Fix `plot_bgcolor` react [#4816]
35+
- Fix `legend.title` react [#4827]
36+
- Fix `rangebreaks` on `candlestick` & `ohlc` traces [#4814]
37+
- Fix `rangebreaks` on `heatmap` traces with 2-D `z` array [#4821]
38+
- Fix `rangebreaks` on `histogram2d` traces [#4829]
39+
- Fix `rangebreaks` overlapping and tick positions [#4831]
40+
- Fix "array" `tickmode` on date & log axes [#4851]
41+
- Fix category order of matching axes when calling react [#4832]
42+
- Fix for bypassing non-string ids during matching axes [#4858]
43+
- Fix selection of single value `dimensions` in `parcoords` traces [#4878]
44+
- Fix `bar` lengths in milliseconds from `base` [#4900]
45+
- Fix gl3d ticks when converting dates to milliseconds
46+
(regression introduced in 1.21.0) [#4903]
47+
48+
49+
## [1.54.1] -- 2020-05-04
50+
51+
### Changed
52+
- Update dependencies in package.json & package-lock.json [#4799, #4800, #4802, #4805, #4811]
53+
54+
### Fixed
55+
- Set pointer-events only for editable shapes to allow pan, zoom & hover
56+
events to work inside shapes (regression introduced in 1.54.0) [#4810]
57+
- Update and validate various mocks [#4762]
58+
59+
60+
## [1.54.0] -- 2020-04-30
61+
62+
### Added
63+
- Introduce new drag modes "drawline", "drawrect", "drawcircle", "drawopenpath", "drawclosedpath" &
64+
add optional modebar buttons for drawing & removing new shapes inside cartesian subplots &
65+
add `newshape` and `activeshape` attributes to `layout` &
66+
add `editable` and `fillrule` attributes to `layout.shapes` [#4775]
67+
- Add `angle` and `allowoverlap` attributes to `marker` of `scattermapbox` traces [#4575, #4794]
68+
- Add Portuguese (Portugal) `pt-pt` locale [#4736]
69+
70+
### Changed
71+
- Bump WebGL modules including mapbox-gl and is-mobile [#4731, #4752, #4791]
72+
- Bump jsdom, d3-force, minify-stream, topojson-client and es6-promise [#4751, #4768, #4772, #4773, #4774]
73+
74+
### Fixed
75+
- Sanitize `sourceattribution` in mapbox `layers` [#4793]
76+
- Fix `react`to mapbox `style` changes [#4720]
77+
- Fix transform sort order with gaps [#4783]
78+
- Fix autorange for `bar` and `waterfall` when `base` is present [#4714]
79+
- Fix "extremes" `opacityscale` option for `volume` and `surface` [#4725]
80+
- Fix no-WebGL warning for `scattergl` and `splom` traces [#4777]
81+
- Fix notifier CSS to have a fallback in font stack [#4778]
82+
1283

1384
## [1.53.0] -- 2020-03-31
1485

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,16 @@ and more.
3434

3535
### Install with npm
3636

37-
```bash
37+
```sh
3838
npm install plotly.js-dist
3939
```
4040

41-
and import plotly.js as `import Plotly from 'plotly.js-dist';` or `var Plotly = require('plotly.js-dist');`.
41+
and import plotly.js as
42+
```js
43+
import Plotly from 'plotly.js-dist'
44+
// Or using require,
45+
var Plotly = require('plotly.js-dist')
46+
```
4247

4348
### Use the plotly.js CDN hosted by Fastly
4449

build/plotcss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var rules = {
5151
"X .select-outline": "fill:none;stroke-width:1;shape-rendering:crispEdges;",
5252
"X .select-outline-1": "stroke:white;",
5353
"X .select-outline-2": "stroke:black;stroke-dasharray:2px 2px;",
54-
Y: "font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;",
54+
Y: "font-family:'Open Sans', verdana, arial, sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;",
5555
"Y p": "margin:0;",
5656
"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;",
5757
"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;",

devtools/test_dashboard/devtools.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* global Plotly:false */
44

5-
var Fuse = require('fuse.js');
5+
var Fuse = require('fuse.js/dist/fuse.common.js');
66
var mocks = require('../../build/test_dashboard_mocks.json');
77
var credentials = require('../../build/credentials.json');
88
var Lib = require('@src/lib');
@@ -160,7 +160,17 @@ setInterval(function() {
160160
}, 1000);
161161

162162
// Mocks search and plotting
163-
var f = new Fuse(mocks, {
163+
var fuse = new Fuse(mocks, {
164+
// isCaseSensitive: false,
165+
// includeScore: false,
166+
// shouldSort: true,
167+
// includeMatches: false,
168+
// findAllMatches: false,
169+
// minMatchCharLength: 1,
170+
// location: 0,
171+
// threshold: 0.6,
172+
// distance: 100,
173+
// useExtendedSearch: false,
164174
keys: [{
165175
name: 'name',
166176
weight: 0.7
@@ -198,15 +208,15 @@ function searchMocks(e) {
198208
mocksList.removeChild(mocksList.firstChild);
199209
}
200210

201-
var results = f.search(e.target.value);
211+
var results = fuse.search(e.target.value);
202212

203213
results.forEach(function(r) {
214+
var mockName = r.item.name;
204215
var result = document.createElement('span');
205-
result.className = getResultClass(r.name);
206-
result.innerText = r.name;
216+
result.className = getResultClass(mockName);
217+
result.innerText = mockName;
207218

208219
result.addEventListener('click', function() {
209-
var mockName = r.file.slice(0, -5);
210220
window.location.hash = mockName;
211221

212222
// Clear plots and plot selected.

0 commit comments

Comments
 (0)
0