Skip to content

Commit fe8fca4

Browse files
authored
Merge pull request #4426 from plotly/release-1.51.3
Merge back v1.51.3 into master
2 parents b2102a5 + 6b31158 commit fe8fca4

26 files changed

+251
-115
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

1212

13+
## [1.51.3] -- 2019-12-16
14+
15+
### Fixed
16+
- Fix `Plotly.Plots.resize` edge cases ensuring now that
17+
its promises always resolve [#4392]
18+
- Fix position of link hover labels in vertical `sankey` [#4404]
19+
- Fix `box` autorange for traces with "inverted" notched [#4388]
20+
21+
1322
## [1.51.2] -- 2019-11-25
1423

1524
### Fixed

dist/README.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ object. This property must be set before the plotly.js script tag, for example:
5151
Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.
5252
Many other localizations are available - here is an example using Swiss-German (de-CH),
5353
see the contents of this directory for the full list.
54-
They are also available on our CDN as https://cdn.plot.ly/plotly-locale-de-ch-latest.js OR https://cdn.plot.ly/plotly-locale-de-ch-1.51.2.js
54+
They are also available on our CDN as https://cdn.plot.ly/plotly-locale-de-ch-latest.js OR https://cdn.plot.ly/plotly-locale-de-ch-1.51.3.js
5555
Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.
5656

5757
*After* the plotly.js script tag, add:
@@ -74,12 +74,12 @@ The main plotly.js bundle includes all the official (non-beta) trace modules.
7474

7575
It be can imported as minified javascript
7676
- using dist file `dist/plotly.min.js`
77-
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.51.2.min.js
77+
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.51.3.min.js
7878

7979
or as raw javascript:
8080
- using the `plotly.js-dist` npm package (starting in `v1.39.0`)
8181
- using dist file `dist/plotly.js`
82-
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.51.2.js
82+
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.51.3.js
8383
- using CommonJS with `require('plotly.js')`
8484

8585
If you would like to have access to the attribute meta information (including attribute descriptions as on the [schema reference page](https://plot.ly/javascript/reference/)), use dist file `dist/plotly-with-meta.js`
@@ -88,7 +88,7 @@ The main plotly.js bundle weights in at:
8888

8989
| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |
9090
|-----------|---------------|----------------------|---------------------|
91-
| 6.8 MB | 3.1 MB | 948.4 kB | 7.1 MB |
91+
| 6.8 MB | 3.1 MB | 948.5 kB | 7.1 MB |
9292

9393
## Partial bundles
9494

@@ -114,16 +114,16 @@ The `basic` partial bundle contains trace modules `scatter`, `bar` and `pie`.
114114

115115
| Raw size | Minified size | Minified + gzip size |
116116
|------|-----------------|------------------------|
117-
| 2.3 MB | 844.8 kB | 277.5 kB |
117+
| 2.3 MB | 844.9 kB | 277.5 kB |
118118

119119
#### CDN links
120120

121121
| Flavor | URL |
122122
| ------ | --- |
123123
| Latest | https://cdn.plot.ly/plotly-basic-latest.js |
124124
| Latest minified | https://cdn.plot.ly/plotly-basic-latest.min.js |
125-
| Tagged | https://cdn.plot.ly/plotly-basic-1.51.2.js |
126-
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.51.2.min.js |
125+
| Tagged | https://cdn.plot.ly/plotly-basic-1.51.3.js |
126+
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.51.3.min.js |
127127

128128
#### npm package (starting in `v1.39.0`)
129129

@@ -167,16 +167,16 @@ The `cartesian` partial bundle contains trace modules `scatter`, `bar`, `box`, `
167167

168168
| Raw size | Minified size | Minified + gzip size |
169169
|------|-----------------|------------------------|
170-
| 2.7 MB | 970.4 kB | 317.1 kB |
170+
| 2.7 MB | 970.6 kB | 317.1 kB |
171171

172172
#### CDN links
173173

174174
| Flavor | URL |
175175
| ------ | --- |
176176
| Latest | https://cdn.plot.ly/plotly-cartesian-latest.js |
177177
| Latest minified | https://cdn.plot.ly/plotly-cartesian-latest.min.js |
178-
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.51.2.js |
179-
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.51.2.min.js |
178+
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.51.3.js |
179+
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.51.3.min.js |
180180

181181
#### npm package (starting in `v1.39.0`)
182182

@@ -220,16 +220,16 @@ The `geo` partial bundle contains trace modules `scatter`, `scattergeo` and `cho
220220

221221
| Raw size | Minified size | Minified + gzip size |
222222
|------|-----------------|------------------------|
223-
| 2.3 MB | 855.8 kB | 282.8 kB |
223+
| 2.3 MB | 856 kB | 282.8 kB |
224224

225225
#### CDN links
226226

227227
| Flavor | URL |
228228
| ------ | --- |
229229
| Latest | https://cdn.plot.ly/plotly-geo-latest.js |
230230
| Latest minified | https://cdn.plot.ly/plotly-geo-latest.min.js |
231-
| Tagged | https://cdn.plot.ly/plotly-geo-1.51.2.js |
232-
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.51.2.min.js |
231+
| Tagged | https://cdn.plot.ly/plotly-geo-1.51.3.js |
232+
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.51.3.min.js |
233233

234234
#### npm package (starting in `v1.39.0`)
235235

@@ -281,8 +281,8 @@ The `gl3d` partial bundle contains trace modules `scatter`, `scatter3d`, `surfac
281281
| ------ | --- |
282282
| Latest | https://cdn.plot.ly/plotly-gl3d-latest.js |
283283
| Latest minified | https://cdn.plot.ly/plotly-gl3d-latest.min.js |
284-
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.51.2.js |
285-
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.51.2.min.js |
284+
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.51.3.js |
285+
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.51.3.min.js |
286286

287287
#### npm package (starting in `v1.39.0`)
288288

@@ -326,16 +326,16 @@ The `gl2d` partial bundle contains trace modules `scatter`, `scattergl`, `splom`
326326

327327
| Raw size | Minified size | Minified + gzip size |
328328
|------|-----------------|------------------------|
329-
| 3.5 MB | 1.4 MB | 456.2 kB |
329+
| 3.5 MB | 1.4 MB | 456.3 kB |
330330

331331
#### CDN links
332332

333333
| Flavor | URL |
334334
| ------ | --- |
335335
| Latest | https://cdn.plot.ly/plotly-gl2d-latest.js |
336336
| Latest minified | https://cdn.plot.ly/plotly-gl2d-latest.min.js |
337-
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.51.2.js |
338-
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.51.2.min.js |
337+
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.51.3.js |
338+
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.51.3.min.js |
339339

340340
#### npm package (starting in `v1.39.0`)
341341

@@ -387,8 +387,8 @@ The `mapbox` partial bundle contains trace modules `scatter`, `scattermapbox`, `
387387
| ------ | --- |
388388
| Latest | https://cdn.plot.ly/plotly-mapbox-latest.js |
389389
| Latest minified | https://cdn.plot.ly/plotly-mapbox-latest.min.js |
390-
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.51.2.js |
391-
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.51.2.min.js |
390+
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.51.3.js |
391+
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.51.3.min.js |
392392

393393
#### npm package (starting in `v1.39.0`)
394394

@@ -432,16 +432,16 @@ The `finance` partial bundle contains trace modules `scatter`, `bar`, `histogram
432432

433433
| Raw size | Minified size | Minified + gzip size |
434434
|------|-----------------|------------------------|
435-
| 2.6 MB | 930.7 kB | 302.1 kB |
435+
| 2.6 MB | 930.8 kB | 302.1 kB |
436436

437437
#### CDN links
438438

439439
| Flavor | URL |
440440
| ------ | --- |
441441
| Latest | https://cdn.plot.ly/plotly-finance-latest.js |
442442
| Latest minified | https://cdn.plot.ly/plotly-finance-latest.min.js |
443-
| Tagged | https://cdn.plot.ly/plotly-finance-1.51.2.js |
444-
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.51.2.min.js |
443+
| Tagged | https://cdn.plot.ly/plotly-finance-1.51.3.js |
444+
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.51.3.min.js |
445445

446446
#### npm package (starting in `v1.39.0`)
447447

dist/plot-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4413,7 +4413,7 @@
44134413
"valType": "boolean",
44144414
"role": "style",
44154415
"editType": "calc",
4416-
"description": "Determines whether or not notches should be drawn."
4416+
"description": "Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 / IQR * sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info."
44174417
},
44184418
"notchwidth": {
44194419
"valType": "number",

dist/plotly-basic.js

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v1.51.2
2+
* plotly.js (basic) v1.51.3
33
* Copyright 2012-2019, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -34018,7 +34018,7 @@ exports.svgAttrs = {
3401834018
'use strict';
3401934019

3402034020
// package version injected by `npm run preprocess`
34021-
exports.version = '1.51.2';
34021+
exports.version = '1.51.3';
3402234022

3402334023
// inject promise polyfill
3402434024
_dereq_('es6-promise').polyfill();
@@ -60383,12 +60383,15 @@ plots.redrawText = function(gd) {
6038360383
plots.resize = function(gd) {
6038460384
gd = Lib.getGraphDiv(gd);
6038560385

60386-
return new Promise(function(resolve, reject) {
60386+
var resolveLastResize;
60387+
var p = new Promise(function(resolve, reject) {
6038760388
if(!gd || Lib.isHidden(gd)) {
6038860389
reject(new Error('Resize must be passed a displayed plot div element.'));
6038960390
}
6039060391

6039160392
if(gd._redrawTimer) clearTimeout(gd._redrawTimer);
60393+
if(gd._resolveResize) resolveLastResize = gd._resolveResize;
60394+
gd._resolveResize = resolve;
6039260395

6039360396
gd._redrawTimer = setTimeout(function() {
6039460397
// return if there is nothing to resize or is hidden
@@ -60408,10 +60411,17 @@ plots.resize = function(gd) {
6040860411

6040960412
Registry.call('relayout', gd, {autosize: true}).then(function() {
6041060413
gd.changed = oldchanged;
60411-
resolve(gd);
60414+
// Only resolve if a new call hasn't been made!
60415+
if(gd._resolveResize === resolve) {
60416+
delete gd._resolveResize;
60417+
resolve(gd);
60418+
}
6041260419
});
6041360420
}, 100);
6041460421
});
60422+
60423+
if(resolveLastResize) resolveLastResize(p);
60424+
return p;
6041560425
};
6041660426

6041760427

dist/plotly-basic.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plotly-cartesian.js

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (cartesian) v1.51.2
2+
* plotly.js (cartesian) v1.51.3
33
* Copyright 2012-2019, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -34182,7 +34182,7 @@ exports.svgAttrs = {
3418234182
'use strict';
3418334183

3418434184
// package version injected by `npm run preprocess`
34185-
exports.version = '1.51.2';
34185+
exports.version = '1.51.3';
3418634186

3418734187
// inject promise polyfill
3418834188
_dereq_('es6-promise').polyfill();
@@ -60547,12 +60547,15 @@ plots.redrawText = function(gd) {
6054760547
plots.resize = function(gd) {
6054860548
gd = Lib.getGraphDiv(gd);
6054960549

60550-
return new Promise(function(resolve, reject) {
60550+
var resolveLastResize;
60551+
var p = new Promise(function(resolve, reject) {
6055160552
if(!gd || Lib.isHidden(gd)) {
6055260553
reject(new Error('Resize must be passed a displayed plot div element.'));
6055360554
}
6055460555

6055560556
if(gd._redrawTimer) clearTimeout(gd._redrawTimer);
60557+
if(gd._resolveResize) resolveLastResize = gd._resolveResize;
60558+
gd._resolveResize = resolve;
6055660559

6055760560
gd._redrawTimer = setTimeout(function() {
6055860561
// return if there is nothing to resize or is hidden
@@ -60572,10 +60575,17 @@ plots.resize = function(gd) {
6057260575

6057360576
Registry.call('relayout', gd, {autosize: true}).then(function() {
6057460577
gd.changed = oldchanged;
60575-
resolve(gd);
60578+
// Only resolve if a new call hasn't been made!
60579+
if(gd._resolveResize === resolve) {
60580+
delete gd._resolveResize;
60581+
resolve(gd);
60582+
}
6057660583
});
6057760584
}, 100);
6057860585
});
60586+
60587+
if(resolveLastResize) resolveLastResize(p);
60588+
return p;
6057960589
};
6058060590

6058160591

@@ -71108,6 +71118,9 @@ module.exports = function calc(gd, trace) {
7110871118
Lib.identity :
7110971119
function(pt) { return (pt.v < cdi.lf || pt.v > cdi.uf); };
7111071120

71121+
var minLowerNotch = Infinity;
71122+
var maxUpperNotch = -Infinity;
71123+
7111171124
// build calcdata trace items, one item per distinct position
7111271125
for(i = 0; i < pLen; i++) {
7111371126
if(ptsPerBin[i].length > 0) {
@@ -71162,6 +71175,8 @@ module.exports = function calc(gd, trace) {
7116271175
var mci = 1.57 * iqr / Math.sqrt(bvLen);
7116371176
cdi.ln = cdi.med - mci;
7116471177
cdi.un = cdi.med + mci;
71178+
minLowerNotch = Math.min(minLowerNotch, cdi.ln);
71179+
maxUpperNotch = Math.max(maxUpperNotch, cdi.un);
7116571180

7116671181
cdi.pts2 = pts.filter(ptFilterFn);
7116771182

@@ -71170,8 +71185,11 @@ module.exports = function calc(gd, trace) {
7117071185
}
7117171186

7117271187
calcSelection(cd, trace);
71173-
var extremes = Axes.findExtremes(valAxis, val, {padded: true});
71174-
trace._extremes[valAxis._id] = extremes;
71188+
71189+
trace._extremes[valAxis._id] = Axes.findExtremes(valAxis,
71190+
trace.notched ? val.concat([minLowerNotch, maxUpperNotch]) : val,
71191+
{padded: true}
71192+
);
7117571193

7117671194
if(cd.length > 0) {
7117771195
cd[0].t = {

dist/plotly-cartesian.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plotly-finance.js

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (finance) v1.51.2
2+
* plotly.js (finance) v1.51.3
33
* Copyright 2012-2019, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -34138,7 +34138,7 @@ exports.svgAttrs = {
3413834138
'use strict';
3413934139

3414034140
// package version injected by `npm run preprocess`
34141-
exports.version = '1.51.2';
34141+
exports.version = '1.51.3';
3414234142

3414334143
// inject promise polyfill
3414434144
_dereq_('es6-promise').polyfill();
@@ -60503,12 +60503,15 @@ plots.redrawText = function(gd) {
6050360503
plots.resize = function(gd) {
6050460504
gd = Lib.getGraphDiv(gd);
6050560505

60506-
return new Promise(function(resolve, reject) {
60506+
var resolveLastResize;
60507+
var p = new Promise(function(resolve, reject) {
6050760508
if(!gd || Lib.isHidden(gd)) {
6050860509
reject(new Error('Resize must be passed a displayed plot div element.'));
6050960510
}
6051060511

6051160512
if(gd._redrawTimer) clearTimeout(gd._redrawTimer);
60513+
if(gd._resolveResize) resolveLastResize = gd._resolveResize;
60514+
gd._resolveResize = resolve;
6051260515

6051360516
gd._redrawTimer = setTimeout(function() {
6051460517
// return if there is nothing to resize or is hidden
@@ -60528,10 +60531,17 @@ plots.resize = function(gd) {
6052860531

6052960532
Registry.call('relayout', gd, {autosize: true}).then(function() {
6053060533
gd.changed = oldchanged;
60531-
resolve(gd);
60534+
// Only resolve if a new call hasn't been made!
60535+
if(gd._resolveResize === resolve) {
60536+
delete gd._resolveResize;
60537+
resolve(gd);
60538+
}
6053260539
});
6053360540
}, 100);
6053460541
});
60542+
60543+
if(resolveLastResize) resolveLastResize(p);
60544+
return p;
6053560545
};
6053660546

6053760547

dist/plotly-finance.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plotly-geo-assets.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)