Skip to content

Commit

Permalink
1.52.3
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Mar 2, 2020
1 parent 4df6b21 commit 80262b5
Show file tree
Hide file tree
Showing 24 changed files with 3,243 additions and 3,038 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.52.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.52.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.52.2.min.js
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.52.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.52.2.js
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.52.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.9 MB | 3.2 MB | 957 kB | 7.2 MB |
| 6.9 MB | 3.2 MB | 957.2 kB | 7.2 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.4 MB | 853.5 kB | 280.4 kB |
| 2.4 MB | 853.6 kB | 280.4 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.52.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.52.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-basic-1.52.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.52.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 | 983.4 kB | 321.4 kB |
| 2.7 MB | 983.5 kB | 321.4 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.52.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.52.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.52.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.52.3.min.js |

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

Expand Down Expand Up @@ -228,8 +228,8 @@ The `geo` partial bundle contains trace modules `scatter`, `scattergeo` and `cho
| ------ | --- |
| 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.52.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.52.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-geo-1.52.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-geo-1.52.3.min.js |

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

Expand Down Expand Up @@ -273,16 +273,16 @@ The `gl3d` partial bundle contains trace modules `scatter`, `scatter3d`, `surfac

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 3.5 MB | 1.4 MB | 438.9 kB |
| 3.5 MB | 1.4 MB | 439.2 kB |

#### CDN links

| Flavor | URL |
| ------ | --- |
| 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.52.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.52.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl3d-1.52.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl3d-1.52.3.min.js |

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

Expand Down Expand Up @@ -334,8 +334,8 @@ The `gl2d` partial bundle contains trace modules `scatter`, `scattergl`, `splom`
| ------ | --- |
| 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.52.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.52.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-gl2d-1.52.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-gl2d-1.52.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.52.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.52.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-mapbox-1.52.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-mapbox-1.52.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 | 940.6 kB | 305.4 kB |
| 2.6 MB | 940.7 kB | 305.4 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.52.2.js |
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.52.2.min.js |
| Tagged | https://cdn.plot.ly/plotly-finance-1.52.3.js |
| Tagged minified | https://cdn.plot.ly/plotly-finance-1.52.3.min.js |

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

Expand Down
97 changes: 64 additions & 33 deletions dist/plotly-basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (basic) v1.52.2
* plotly.js (basic) v1.52.3
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -27551,6 +27551,7 @@ function handleCamera3d(gd, ev) {
var sceneId = sceneIds[i];
var camera = sceneId + '.camera';
var aspectratio = sceneId + '.aspectratio';
var aspectmode = sceneId + '.aspectmode';
var scene = fullLayout[sceneId]._scene;
var didUpdate;

Expand All @@ -27570,6 +27571,7 @@ function handleCamera3d(gd, ev) {
aobj[aspectratio + '.x'] = scene.viewInitial.aspectratio.x;
aobj[aspectratio + '.y'] = scene.viewInitial.aspectratio.y;
aobj[aspectratio + '.z'] = scene.viewInitial.aspectratio.z;
aobj[aspectmode] = scene.viewInitial.aspectmode;
}
}

Expand Down Expand Up @@ -34317,7 +34319,7 @@ exports.svgAttrs = {
'use strict';

// package version injected by `npm run preprocess`
exports.version = '1.52.2';
exports.version = '1.52.3';

// inject promise polyfill
_dereq_('es6-promise').polyfill();
Expand Down Expand Up @@ -69056,6 +69058,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
}

var isHorizontal = (trace.orientation === 'h');
var withTransition = hasTransition(opts);

var pointGroup = Lib.ensureSingle(plotGroup, 'g', 'points');

Expand All @@ -69081,26 +69084,35 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
var y0 = xy[1][0];
var y1 = xy[1][1];

var isBlank = (
x0 === x1 ||
y0 === y1 ||
!isNumeric(x0) ||
!isNumeric(x1) ||
!isNumeric(y0) ||
!isNumeric(y1)
);
// empty bars
var isBlank = (isHorizontal ? x1 - x0 : y1 - y0) === 0;

// display zeros if line.width > 0
if(isBlank && shouldDisplayZeros && helpers.getLineWidth(trace, di) && (isHorizontal ? x1 - x0 === 0 : y1 - y0 === 0)) {
if(isBlank && shouldDisplayZeros && helpers.getLineWidth(trace, di)) {
isBlank = false;
}
di.isBlank = isBlank;

if(isBlank && isHorizontal) x1 = x0;
if(isBlank && !isHorizontal) y1 = y0;
// skip nulls
if(!isBlank) {
isBlank = (
!isNumeric(x0) ||
!isNumeric(x1) ||
!isNumeric(y0) ||
!isNumeric(y1)
);
}

var spansHorizontal = isHorizontal && (x0 !== x1);
var spansVertical = !isHorizontal && (y0 !== y1);
// record isBlank
di.isBlank = isBlank;

// for blank bars, ensure start and end positions are equal - important for smooth transitions
if(isBlank) {
if(isHorizontal) {
x1 = x0;
} else {
y1 = y0;
}
}

// in waterfall mode `between` we need to adjust bar end points to match the connector width
if(adjustPixel && !isBlank) {
Expand All @@ -69127,16 +69139,24 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
mc = di.mc || trace.marker.color;
}

var offset = d3.round((lw / 2) % 1, 2);

function roundWithLine(v) {
var offset = d3.round((lw / 2) % 1, 2);

// if there are explicit gaps, don't round,
// it can make the gaps look crappy
return (opts.gap === 0 && opts.groupgap === 0) ?
d3.round(Math.round(v) - offset, 2) : v;
}

function expandToVisible(v, vc) {
function expandToVisible(v, vc, hideZeroSpan) {
if(hideZeroSpan && v === vc) {
// should not expand zero span bars
// when start and end positions are identical
// i.e. for vertical when y0 === y1
// and for horizontal when x0 === x1
return v;
}

// if it's not in danger of disappearing entirely,
// round more precisely
return Math.abs(v - vc) >= 2 ? roundWithLine(v) :
Expand All @@ -69157,14 +69177,10 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
var op = Color.opacity(mc);
var fixpx = (op < 1 || lw > 0.01) ? roundWithLine : expandToVisible;

if(spansHorizontal) {
x0 = fixpx(x0, x1);
x1 = fixpx(x1, x0);
}
if(spansVertical) {
y0 = fixpx(y0, y1);
y1 = fixpx(y1, y0);
}
x0 = fixpx(x0, x1, isHorizontal);
x1 = fixpx(x1, x0, isHorizontal);
y0 = fixpx(y0, y1, !isHorizontal);
y1 = fixpx(y1, y0, !isHorizontal);
}

var sel = transition(Lib.ensureSingle(bar, 'path'), fullLayout, opts, makeOnCompleteCallback);
Expand All @@ -69173,7 +69189,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
.attr('d', 'M' + x0 + ',' + y0 + 'V' + y1 + 'H' + x1 + 'V' + y0 + 'Z')
.call(Drawing.setClipUrl, plotinfo.layerClipId, gd);

if(!fullLayout.uniformtext.mode && hasTransition(opts)) {
if(!fullLayout.uniformtext.mode && withTransition) {
var styleFns = Drawing.makePointStyleFns(trace);
Drawing.singlePointStyle(di, sel, trace, styleFns, gd);
}
Expand Down Expand Up @@ -71543,18 +71559,31 @@ function prerenderTitles(cdModule, gd) {
}

function transformInsideText(textBB, pt, cd0) {
var textDiameter = Math.sqrt(textBB.width * textBB.width + textBB.height * textBB.height);
var r = cd0.r || pt.rpx1;
var rInscribed = pt.rInscribed;

var isEmpty = pt.startangle === pt.stopangle;
if(isEmpty) {
return {
rCenter: 1 - rInscribed,
scale: 0,
rotate: 0,
textPosAngle: 0
};
}

var ring = pt.ring;
var isCircle = (ring === 1) && (Math.abs(pt.startangle - pt.stopangle) === Math.PI * 2);

var halfAngle = pt.halfangle;
var midAngle = pt.midangle;
var ring = pt.ring;
var rInscribed = pt.rInscribed;
var r = cd0.r || pt.rpx1;

var orientation = cd0.trace.insidetextorientation;
var isHorizontal = orientation === 'horizontal';
var isTangential = orientation === 'tangential';
var isRadial = orientation === 'radial';
var isAuto = orientation === 'auto';
var isCircle = (ring === 1) && (Math.abs(pt.startangle - pt.stopangle) === Math.PI * 2);

var allTransforms = [];
var newT;

Expand Down Expand Up @@ -71600,6 +71629,8 @@ function transformInsideText(textBB, pt, cd0) {
// this inscribes the text rectangle in a circle, which is then inscribed
// in the slice, so it will be an underestimate, which some day we may want
// to improve so this case can get more use
var textDiameter = Math.sqrt(textBB.width * textBB.width + textBB.height * textBB.height);

newT = {
scale: rInscribed * r * 2 / textDiameter,

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

Large diffs are not rendered by default.

Loading

0 comments on commit 80262b5

Please sign in to comment.