Skip to content

Merge back v1.51.3 into master #4426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.


## [1.51.3] -- 2019-12-16

### Fixed
- Fix `Plotly.Plots.resize` edge cases ensuring now that
its promises always resolve [#4392]
- Fix position of link hover labels in vertical `sankey` [#4404]
- Fix `box` autorange for traces with "inverted" notched [#4388]


## [1.51.2] -- 2019-11-25

### Fixed
Expand Down
46 changes: 23 additions & 23 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object. This property must be set before the plotly.js script tag, for example:
Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.
Many other localizations are available - here is an example using Swiss-German (de-CH),
see the contents of this directory for the full list.
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
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
Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.

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

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

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

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`
Expand All @@ -88,7 +88,7 @@ The main plotly.js bundle weights in at:

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

## Partial bundles

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.3 MB | 844.8 kB | 277.5 kB |
| 2.3 MB | 844.9 kB | 277.5 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-basic-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-basic-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-basic-1.51.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.51.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-basic-1.51.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.51.3.min.js |

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

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.7 MB | 970.4 kB | 317.1 kB |
| 2.7 MB | 970.6 kB | 317.1 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-cartesian-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-cartesian-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.51.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.51.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.51.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.51.3.min.js |

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

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.3 MB | 855.8 kB | 282.8 kB |
| 2.3 MB | 856 kB | 282.8 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-geo-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-geo-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-geo-1.51.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.51.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-geo-1.51.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.51.3.min.js |

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

Expand Down Expand Up @@ -281,8 +281,8 @@ The `gl3d` partial bundle contains trace modules `scatter`, `scatter3d`, `surfac
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-gl3d-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-gl3d-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.51.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.51.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.51.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.51.3.min.js |

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

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 3.5 MB | 1.4 MB | 456.2 kB |
| 3.5 MB | 1.4 MB | 456.3 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-gl2d-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-gl2d-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.51.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.51.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.51.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.51.3.min.js |

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

Expand Down Expand Up @@ -387,8 +387,8 @@ The `mapbox` partial bundle contains trace modules `scatter`, `scattermapbox`, `
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-mapbox-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-mapbox-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.51.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.51.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.51.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.51.3.min.js |

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

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.6 MB | 930.7 kB | 302.1 kB |
| 2.6 MB | 930.8 kB | 302.1 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| Latest | https://cdn.plot.ly/plotly-finance-latest.js |
| Latest minified | https://cdn.plot.ly/plotly-finance-latest.min.js |
| Tagged | https://cdn.plot.ly/plotly-finance-1.51.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.51.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-finance-1.51.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.51.3.min.js |

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

Expand Down
2 changes: 1 addition & 1 deletion dist/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4413,7 +4413,7 @@
"valType": "boolean",
"role": "style",
"editType": "calc",
"description": "Determines whether or not notches should be drawn."
"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."
},
"notchwidth": {
"valType": "number",
Expand Down
18 changes: 14 additions & 4 deletions dist/plotly-basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (basic) v1.51.2
* plotly.js (basic) v1.51.3
* Copyright 2012-2019, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -34018,7 +34018,7 @@ exports.svgAttrs = {
'use strict';

// package version injected by `npm run preprocess`
exports.version = '1.51.2';
exports.version = '1.51.3';

// inject promise polyfill
_dereq_('es6-promise').polyfill();
Expand Down Expand Up @@ -60383,12 +60383,15 @@ plots.redrawText = function(gd) {
plots.resize = function(gd) {
gd = Lib.getGraphDiv(gd);

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

if(gd._redrawTimer) clearTimeout(gd._redrawTimer);
if(gd._resolveResize) resolveLastResize = gd._resolveResize;
gd._resolveResize = resolve;

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

Registry.call('relayout', gd, {autosize: true}).then(function() {
gd.changed = oldchanged;
resolve(gd);
// Only resolve if a new call hasn't been made!
if(gd._resolveResize === resolve) {
delete gd._resolveResize;
resolve(gd);
}
});
}, 100);
});

if(resolveLastResize) resolveLastResize(p);
return p;
};


Expand Down
4 changes: 2 additions & 2 deletions dist/plotly-basic.min.js

Large diffs are not rendered by default.

30 changes: 24 additions & 6 deletions dist/plotly-cartesian.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (cartesian) v1.51.2
* plotly.js (cartesian) v1.51.3
* Copyright 2012-2019, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -34182,7 +34182,7 @@ exports.svgAttrs = {
'use strict';

// package version injected by `npm run preprocess`
exports.version = '1.51.2';
exports.version = '1.51.3';

// inject promise polyfill
_dereq_('es6-promise').polyfill();
Expand Down Expand Up @@ -60547,12 +60547,15 @@ plots.redrawText = function(gd) {
plots.resize = function(gd) {
gd = Lib.getGraphDiv(gd);

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

if(gd._redrawTimer) clearTimeout(gd._redrawTimer);
if(gd._resolveResize) resolveLastResize = gd._resolveResize;
gd._resolveResize = resolve;

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

Registry.call('relayout', gd, {autosize: true}).then(function() {
gd.changed = oldchanged;
resolve(gd);
// Only resolve if a new call hasn't been made!
if(gd._resolveResize === resolve) {
delete gd._resolveResize;
resolve(gd);
}
});
}, 100);
});

if(resolveLastResize) resolveLastResize(p);
return p;
};


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

var minLowerNotch = Infinity;
var maxUpperNotch = -Infinity;

// build calcdata trace items, one item per distinct position
for(i = 0; i < pLen; i++) {
if(ptsPerBin[i].length > 0) {
Expand Down Expand Up @@ -71162,6 +71175,8 @@ module.exports = function calc(gd, trace) {
var mci = 1.57 * iqr / Math.sqrt(bvLen);
cdi.ln = cdi.med - mci;
cdi.un = cdi.med + mci;
minLowerNotch = Math.min(minLowerNotch, cdi.ln);
maxUpperNotch = Math.max(maxUpperNotch, cdi.un);

cdi.pts2 = pts.filter(ptFilterFn);

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

calcSelection(cd, trace);
var extremes = Axes.findExtremes(valAxis, val, {padded: true});
trace._extremes[valAxis._id] = extremes;

trace._extremes[valAxis._id] = Axes.findExtremes(valAxis,
trace.notched ? val.concat([minLowerNotch, maxUpperNotch]) : val,
{padded: true}
);

if(cd.length > 0) {
cd[0].t = {
Expand Down
4 changes: 2 additions & 2 deletions dist/plotly-cartesian.min.js

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions dist/plotly-finance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (finance) v1.51.2
* plotly.js (finance) v1.51.3
* Copyright 2012-2019, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -34138,7 +34138,7 @@ exports.svgAttrs = {
'use strict';

// package version injected by `npm run preprocess`
exports.version = '1.51.2';
exports.version = '1.51.3';

// inject promise polyfill
_dereq_('es6-promise').polyfill();
Expand Down Expand Up @@ -60503,12 +60503,15 @@ plots.redrawText = function(gd) {
plots.resize = function(gd) {
gd = Lib.getGraphDiv(gd);

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

if(gd._redrawTimer) clearTimeout(gd._redrawTimer);
if(gd._resolveResize) resolveLastResize = gd._resolveResize;
gd._resolveResize = resolve;

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

Registry.call('relayout', gd, {autosize: true}).then(function() {
gd.changed = oldchanged;
resolve(gd);
// Only resolve if a new call hasn't been made!
if(gd._resolveResize === resolve) {
delete gd._resolveResize;
resolve(gd);
}
});
}, 100);
});

if(resolveLastResize) resolveLastResize(p);
return p;
};


Expand Down
4 changes: 2 additions & 2 deletions dist/plotly-finance.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/plotly-geo-assets.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading