Skip to content

Commit 9d48c6e

Browse files
committed
1.58.1
1 parent 3f89cef commit 9d48c6e

22 files changed

+610
-259
lines changed

dist/README.md

+22-22
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.58.0.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.58.1.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.58.0.min.js
77+
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.58.1.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.58.0.js
82+
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.58.1.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://plotly.com/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-
| 7.2 MB | 3.3 MB | 1006.9 kB | 7.5 MB |
91+
| 7.2 MB | 3.3 MB | 1007 kB | 7.5 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.6 MB | 934.9 kB | 307.1 kB |
117+
| 2.6 MB | 935 kB | 307.2 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.58.0.js |
126-
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.58.0.min.js |
125+
| Tagged | https://cdn.plot.ly/plotly-basic-1.58.1.js |
126+
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.58.1.min.js |
127127

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

@@ -175,8 +175,8 @@ The `cartesian` partial bundle contains trace modules `scatter`, `bar`, `box`, `
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.58.0.js |
179-
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.58.0.min.js |
178+
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.58.1.js |
179+
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.58.1.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.7 MB | 961.5 kB | 316.5 kB |
223+
| 2.7 MB | 961.6 kB | 316.5 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.58.0.js |
232-
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.58.0.min.js |
231+
| Tagged | https://cdn.plot.ly/plotly-geo-1.58.1.js |
232+
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.58.1.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.58.0.js |
285-
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.58.0.min.js |
284+
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.58.1.js |
285+
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.58.1.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.7 MB | 1.5 MB | 487.8 kB |
329+
| 3.7 MB | 1.5 MB | 487.9 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.58.0.js |
338-
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.58.0.min.js |
337+
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.58.1.js |
338+
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.58.1.min.js |
339339

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

@@ -379,16 +379,16 @@ The `mapbox` partial bundle contains trace modules `scatter`, `scattermapbox`, `
379379

380380
| Raw size | Minified size | Minified + gzip size |
381381
|------|-----------------|------------------------|
382-
| 3.4 MB | 1.7 MB | 503.6 kB |
382+
| 3.4 MB | 1.7 MB | 503.7 kB |
383383

384384
#### CDN links
385385

386386
| Flavor | URL |
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.58.0.js |
391-
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.58.0.min.js |
390+
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.58.1.js |
391+
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.58.1.min.js |
392392

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

@@ -440,8 +440,8 @@ The `finance` partial bundle contains trace modules `scatter`, `bar`, `histogram
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.58.0.js |
444-
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.58.0.min.js |
443+
| Tagged | https://cdn.plot.ly/plotly-finance-1.58.1.js |
444+
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.58.1.min.js |
445445

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

dist/plotly-basic.js

+63-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v1.58.0
2+
* plotly.js (basic) v1.58.1
33
* Copyright 2012-2020, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -69500,8 +69500,13 @@ function initMargins(fullLayout) {
6950069500
if(!fullLayout._pushmarginIds) fullLayout._pushmarginIds = {};
6950169501
}
6950269502

69503-
var minFinalWidth = 64; // could possibly be exposed as layout.margin.minfinalwidth
69504-
var minFinalHeight = 64; // could possibly be exposed as layout.margin.minfinalheight
69503+
// non-negotiable - this is the smallest height we will allow users to specify via explicit margins
69504+
var MIN_SPECIFIED_WIDTH = 2;
69505+
var MIN_SPECIFIED_HEIGHT = 2;
69506+
69507+
// could be exposed as an option - the smallest we will allow automargin to shrink a larger plot
69508+
var MIN_REDUCED_WIDTH = 64;
69509+
var MIN_REDUCED_HEIGHT = 64;
6950569510

6950669511
/**
6950769512
* autoMargin: called by components that may need to expand the margins to
@@ -69522,36 +69527,53 @@ plots.autoMargin = function(gd, id, o) {
6952269527
var fullLayout = gd._fullLayout;
6952369528
var width = fullLayout.width;
6952469529
var height = fullLayout.height;
69530+
var margin = fullLayout.margin;
69531+
69532+
var minFinalWidth = Lib.constrain(
69533+
width - margin.l - margin.r,
69534+
MIN_SPECIFIED_WIDTH,
69535+
MIN_REDUCED_WIDTH
69536+
);
69537+
69538+
var minFinalHeight = Lib.constrain(
69539+
height - margin.t - margin.b,
69540+
MIN_SPECIFIED_HEIGHT,
69541+
MIN_REDUCED_HEIGHT
69542+
);
69543+
6952569544
var maxSpaceW = Math.max(0, width - minFinalWidth);
6952669545
var maxSpaceH = Math.max(0, height - minFinalHeight);
6952769546

6952869547
var pushMargin = fullLayout._pushmargin;
6952969548
var pushMarginIds = fullLayout._pushmarginIds;
6953069549

69531-
if(fullLayout.margin.autoexpand !== false) {
69550+
if(margin.autoexpand !== false) {
6953269551
if(!o) {
6953369552
delete pushMargin[id];
6953469553
delete pushMarginIds[id];
6953569554
} else {
6953669555
var pad = o.pad;
6953769556
if(pad === undefined) {
69538-
var margin = fullLayout.margin;
6953969557
// if no explicit pad is given, use 12px unless there's a
6954069558
// specified margin that's smaller than that
6954169559
pad = Math.min(12, margin.l, margin.r, margin.t, margin.b);
6954269560
}
6954369561

6954469562
// if the item is too big, just give it enough automargin to
6954569563
// make sure you can still grab it and bring it back
69546-
var rW = (o.l + o.r) / maxSpaceW;
69547-
if(rW > 1) {
69548-
o.l /= rW;
69549-
o.r /= rW;
69564+
if(maxSpaceW) {
69565+
var rW = (o.l + o.r) / maxSpaceW;
69566+
if(rW > 1) {
69567+
o.l /= rW;
69568+
o.r /= rW;
69569+
}
6955069570
}
69551-
var rH = (o.t + o.b) / maxSpaceH;
69552-
if(rH > 1) {
69553-
o.t /= rH;
69554-
o.b /= rH;
69571+
if(maxSpaceH) {
69572+
var rH = (o.t + o.b) / maxSpaceH;
69573+
if(rH > 1) {
69574+
o.t /= rH;
69575+
o.b /= rH;
69576+
}
6955569577
}
6955669578

6955769579
var xl = o.xl !== undefined ? o.xl : o.x;
@@ -69578,8 +69600,6 @@ plots.doAutoMargin = function(gd) {
6957869600
var fullLayout = gd._fullLayout;
6957969601
var width = fullLayout.width;
6958069602
var height = fullLayout.height;
69581-
var maxSpaceW = Math.max(0, width - minFinalWidth);
69582-
var maxSpaceH = Math.max(0, height - minFinalHeight);
6958369603

6958469604
if(!fullLayout._size) fullLayout._size = {};
6958569605
initMargins(fullLayout);
@@ -69652,16 +69672,35 @@ plots.doAutoMargin = function(gd) {
6965269672
}
6965369673
}
6965469674

69655-
var rW = (ml + mr) / maxSpaceW;
69656-
if(rW > 1) {
69657-
ml /= rW;
69658-
mr /= rW;
69675+
var minFinalWidth = Lib.constrain(
69676+
width - margin.l - margin.r,
69677+
MIN_SPECIFIED_WIDTH,
69678+
MIN_REDUCED_WIDTH
69679+
);
69680+
69681+
var minFinalHeight = Lib.constrain(
69682+
height - margin.t - margin.b,
69683+
MIN_SPECIFIED_HEIGHT,
69684+
MIN_REDUCED_HEIGHT
69685+
);
69686+
69687+
var maxSpaceW = Math.max(0, width - minFinalWidth);
69688+
var maxSpaceH = Math.max(0, height - minFinalHeight);
69689+
69690+
if(maxSpaceW) {
69691+
var rW = (ml + mr) / maxSpaceW;
69692+
if(rW > 1) {
69693+
ml /= rW;
69694+
mr /= rW;
69695+
}
6965969696
}
6966069697

69661-
var rH = (mb + mt) / maxSpaceH;
69662-
if(rH > 1) {
69663-
mb /= rH;
69664-
mt /= rH;
69698+
if(maxSpaceH) {
69699+
var rH = (mb + mt) / maxSpaceH;
69700+
if(rH > 1) {
69701+
mb /= rH;
69702+
mt /= rH;
69703+
}
6966569704
}
6966669705

6966769706
gs.l = Math.round(ml);
@@ -82481,7 +82520,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {
8248182520
'use strict';
8248282521

8248382522
// package version injected by `npm run preprocess`
82484-
exports.version = '1.58.0';
82523+
exports.version = '1.58.1';
8248582524

8248682525
},{}]},{},[4])(4)
8248782526
});

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.

0 commit comments

Comments
 (0)