Skip to content

Commit

Permalink
1.58.1
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Dec 4, 2020
1 parent 3f89cef commit 9d48c6e
Show file tree
Hide file tree
Showing 22 changed files with 610 additions and 259 deletions.
44 changes: 22 additions & 22 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.58.0.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.58.1.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.58.0.min.js
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.58.1.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.58.0.js
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.58.1.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://plotly.com/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 |
|-----------|---------------|----------------------|---------------------|
| 7.2 MB | 3.3 MB | 1006.9 kB | 7.5 MB |
| 7.2 MB | 3.3 MB | 1007 kB | 7.5 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.6 MB | 934.9 kB | 307.1 kB |
| 2.6 MB | 935 kB | 307.2 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.58.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.58.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-basic-1.58.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.58.1.min.js |

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

Expand Down Expand Up @@ -175,8 +175,8 @@ The `cartesian` partial bundle contains trace modules `scatter`, `bar`, `box`, `
| ------ | --- |
| 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.58.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.58.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.58.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.58.1.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.7 MB | 961.5 kB | 316.5 kB |
| 2.7 MB | 961.6 kB | 316.5 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.58.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.58.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-geo-1.58.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.58.1.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.58.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.58.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.58.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.58.1.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.7 MB | 1.5 MB | 487.8 kB |
| 3.7 MB | 1.5 MB | 487.9 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.58.0.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.58.0.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.58.1.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.58.1.min.js |

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

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 3.4 MB | 1.7 MB | 503.6 kB |
| 3.4 MB | 1.7 MB | 503.7 kB |

#### CDN links

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

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

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

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

Expand Down
87 changes: 63 additions & 24 deletions dist/plotly-basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (basic) v1.58.0
* plotly.js (basic) v1.58.1
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -69500,8 +69500,13 @@ function initMargins(fullLayout) {
if(!fullLayout._pushmarginIds) fullLayout._pushmarginIds = {};
}

var minFinalWidth = 64; // could possibly be exposed as layout.margin.minfinalwidth
var minFinalHeight = 64; // could possibly be exposed as layout.margin.minfinalheight
// non-negotiable - this is the smallest height we will allow users to specify via explicit margins
var MIN_SPECIFIED_WIDTH = 2;
var MIN_SPECIFIED_HEIGHT = 2;

// could be exposed as an option - the smallest we will allow automargin to shrink a larger plot
var MIN_REDUCED_WIDTH = 64;
var MIN_REDUCED_HEIGHT = 64;

/**
* autoMargin: called by components that may need to expand the margins to
Expand All @@ -69522,36 +69527,53 @@ plots.autoMargin = function(gd, id, o) {
var fullLayout = gd._fullLayout;
var width = fullLayout.width;
var height = fullLayout.height;
var margin = fullLayout.margin;

var minFinalWidth = Lib.constrain(
width - margin.l - margin.r,
MIN_SPECIFIED_WIDTH,
MIN_REDUCED_WIDTH
);

var minFinalHeight = Lib.constrain(
height - margin.t - margin.b,
MIN_SPECIFIED_HEIGHT,
MIN_REDUCED_HEIGHT
);

var maxSpaceW = Math.max(0, width - minFinalWidth);
var maxSpaceH = Math.max(0, height - minFinalHeight);

var pushMargin = fullLayout._pushmargin;
var pushMarginIds = fullLayout._pushmarginIds;

if(fullLayout.margin.autoexpand !== false) {
if(margin.autoexpand !== false) {
if(!o) {
delete pushMargin[id];
delete pushMarginIds[id];
} else {
var pad = o.pad;
if(pad === undefined) {
var margin = fullLayout.margin;
// if no explicit pad is given, use 12px unless there's a
// specified margin that's smaller than that
pad = Math.min(12, margin.l, margin.r, margin.t, margin.b);
}

// if the item is too big, just give it enough automargin to
// make sure you can still grab it and bring it back
var rW = (o.l + o.r) / maxSpaceW;
if(rW > 1) {
o.l /= rW;
o.r /= rW;
if(maxSpaceW) {
var rW = (o.l + o.r) / maxSpaceW;
if(rW > 1) {
o.l /= rW;
o.r /= rW;
}
}
var rH = (o.t + o.b) / maxSpaceH;
if(rH > 1) {
o.t /= rH;
o.b /= rH;
if(maxSpaceH) {
var rH = (o.t + o.b) / maxSpaceH;
if(rH > 1) {
o.t /= rH;
o.b /= rH;
}
}

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

if(!fullLayout._size) fullLayout._size = {};
initMargins(fullLayout);
Expand Down Expand Up @@ -69652,16 +69672,35 @@ plots.doAutoMargin = function(gd) {
}
}

var rW = (ml + mr) / maxSpaceW;
if(rW > 1) {
ml /= rW;
mr /= rW;
var minFinalWidth = Lib.constrain(
width - margin.l - margin.r,
MIN_SPECIFIED_WIDTH,
MIN_REDUCED_WIDTH
);

var minFinalHeight = Lib.constrain(
height - margin.t - margin.b,
MIN_SPECIFIED_HEIGHT,
MIN_REDUCED_HEIGHT
);

var maxSpaceW = Math.max(0, width - minFinalWidth);
var maxSpaceH = Math.max(0, height - minFinalHeight);

if(maxSpaceW) {
var rW = (ml + mr) / maxSpaceW;
if(rW > 1) {
ml /= rW;
mr /= rW;
}
}

var rH = (mb + mt) / maxSpaceH;
if(rH > 1) {
mb /= rH;
mt /= rH;
if(maxSpaceH) {
var rH = (mb + mt) / maxSpaceH;
if(rH > 1) {
mb /= rH;
mt /= rH;
}
}

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

// package version injected by `npm run preprocess`
exports.version = '1.58.0';
exports.version = '1.58.1';

},{}]},{},[4])(4)
});
4 changes: 2 additions & 2 deletions dist/plotly-basic.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 9d48c6e

Please sign in to comment.