Skip to content

Commit 80262b5

Browse files
committed
1.52.3
1 parent 4df6b21 commit 80262b5

24 files changed

+3243
-3038
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.52.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.52.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.52.2.min.js
77+
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.52.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.52.2.js
82+
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.52.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.9 MB | 3.2 MB | 957 kB | 7.2 MB |
91+
| 6.9 MB | 3.2 MB | 957.2 kB | 7.2 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.4 MB | 853.5 kB | 280.4 kB |
117+
| 2.4 MB | 853.6 kB | 280.4 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.52.2.js |
126-
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.52.2.min.js |
125+
| Tagged | https://cdn.plot.ly/plotly-basic-1.52.3.js |
126+
| Tagged minified | https://cdn.plot.ly/plotly-basic-1.52.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 | 983.4 kB | 321.4 kB |
170+
| 2.7 MB | 983.5 kB | 321.4 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.52.2.js |
179-
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.52.2.min.js |
178+
| Tagged | https://cdn.plot.ly/plotly-cartesian-1.52.3.js |
179+
| Tagged minified | https://cdn.plot.ly/plotly-cartesian-1.52.3.min.js |
180180

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

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

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

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

274274
| Raw size | Minified size | Minified + gzip size |
275275
|------|-----------------|------------------------|
276-
| 3.5 MB | 1.4 MB | 438.9 kB |
276+
| 3.5 MB | 1.4 MB | 439.2 kB |
277277

278278
#### CDN links
279279

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

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

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

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

dist/plotly-basic.js

+64-33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v1.52.2
2+
* plotly.js (basic) v1.52.3
33
* Copyright 2012-2020, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -27551,6 +27551,7 @@ function handleCamera3d(gd, ev) {
2755127551
var sceneId = sceneIds[i];
2755227552
var camera = sceneId + '.camera';
2755327553
var aspectratio = sceneId + '.aspectratio';
27554+
var aspectmode = sceneId + '.aspectmode';
2755427555
var scene = fullLayout[sceneId]._scene;
2755527556
var didUpdate;
2755627557

@@ -27570,6 +27571,7 @@ function handleCamera3d(gd, ev) {
2757027571
aobj[aspectratio + '.x'] = scene.viewInitial.aspectratio.x;
2757127572
aobj[aspectratio + '.y'] = scene.viewInitial.aspectratio.y;
2757227573
aobj[aspectratio + '.z'] = scene.viewInitial.aspectratio.z;
27574+
aobj[aspectmode] = scene.viewInitial.aspectmode;
2757327575
}
2757427576
}
2757527577

@@ -34317,7 +34319,7 @@ exports.svgAttrs = {
3431734319
'use strict';
3431834320

3431934321
// package version injected by `npm run preprocess`
34320-
exports.version = '1.52.2';
34322+
exports.version = '1.52.3';
3432134323

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

6905869060
var isHorizontal = (trace.orientation === 'h');
69061+
var withTransition = hasTransition(opts);
6905969062

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

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

69084-
var isBlank = (
69085-
x0 === x1 ||
69086-
y0 === y1 ||
69087-
!isNumeric(x0) ||
69088-
!isNumeric(x1) ||
69089-
!isNumeric(y0) ||
69090-
!isNumeric(y1)
69091-
);
69087+
// empty bars
69088+
var isBlank = (isHorizontal ? x1 - x0 : y1 - y0) === 0;
6909269089

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

69099-
if(isBlank && isHorizontal) x1 = x0;
69100-
if(isBlank && !isHorizontal) y1 = y0;
69095+
// skip nulls
69096+
if(!isBlank) {
69097+
isBlank = (
69098+
!isNumeric(x0) ||
69099+
!isNumeric(x1) ||
69100+
!isNumeric(y0) ||
69101+
!isNumeric(y1)
69102+
);
69103+
}
6910169104

69102-
var spansHorizontal = isHorizontal && (x0 !== x1);
69103-
var spansVertical = !isHorizontal && (y0 !== y1);
69105+
// record isBlank
69106+
di.isBlank = isBlank;
69107+
69108+
// for blank bars, ensure start and end positions are equal - important for smooth transitions
69109+
if(isBlank) {
69110+
if(isHorizontal) {
69111+
x1 = x0;
69112+
} else {
69113+
y1 = y0;
69114+
}
69115+
}
6910469116

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

69130-
var offset = d3.round((lw / 2) % 1, 2);
69131-
6913269142
function roundWithLine(v) {
69143+
var offset = d3.round((lw / 2) % 1, 2);
69144+
6913369145
// if there are explicit gaps, don't round,
6913469146
// it can make the gaps look crappy
6913569147
return (opts.gap === 0 && opts.groupgap === 0) ?
6913669148
d3.round(Math.round(v) - offset, 2) : v;
6913769149
}
6913869150

69139-
function expandToVisible(v, vc) {
69151+
function expandToVisible(v, vc, hideZeroSpan) {
69152+
if(hideZeroSpan && v === vc) {
69153+
// should not expand zero span bars
69154+
// when start and end positions are identical
69155+
// i.e. for vertical when y0 === y1
69156+
// and for horizontal when x0 === x1
69157+
return v;
69158+
}
69159+
6914069160
// if it's not in danger of disappearing entirely,
6914169161
// round more precisely
6914269162
return Math.abs(v - vc) >= 2 ? roundWithLine(v) :
@@ -69157,14 +69177,10 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
6915769177
var op = Color.opacity(mc);
6915869178
var fixpx = (op < 1 || lw > 0.01) ? roundWithLine : expandToVisible;
6915969179

69160-
if(spansHorizontal) {
69161-
x0 = fixpx(x0, x1);
69162-
x1 = fixpx(x1, x0);
69163-
}
69164-
if(spansVertical) {
69165-
y0 = fixpx(y0, y1);
69166-
y1 = fixpx(y1, y0);
69167-
}
69180+
x0 = fixpx(x0, x1, isHorizontal);
69181+
x1 = fixpx(x1, x0, isHorizontal);
69182+
y0 = fixpx(y0, y1, !isHorizontal);
69183+
y1 = fixpx(y1, y0, !isHorizontal);
6916869184
}
6916969185

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

69176-
if(!fullLayout.uniformtext.mode && hasTransition(opts)) {
69192+
if(!fullLayout.uniformtext.mode && withTransition) {
6917769193
var styleFns = Drawing.makePointStyleFns(trace);
6917869194
Drawing.singlePointStyle(di, sel, trace, styleFns, gd);
6917969195
}
@@ -71543,18 +71559,31 @@ function prerenderTitles(cdModule, gd) {
7154371559
}
7154471560

7154571561
function transformInsideText(textBB, pt, cd0) {
71546-
var textDiameter = Math.sqrt(textBB.width * textBB.width + textBB.height * textBB.height);
71562+
var r = cd0.r || pt.rpx1;
71563+
var rInscribed = pt.rInscribed;
71564+
71565+
var isEmpty = pt.startangle === pt.stopangle;
71566+
if(isEmpty) {
71567+
return {
71568+
rCenter: 1 - rInscribed,
71569+
scale: 0,
71570+
rotate: 0,
71571+
textPosAngle: 0
71572+
};
71573+
}
71574+
71575+
var ring = pt.ring;
71576+
var isCircle = (ring === 1) && (Math.abs(pt.startangle - pt.stopangle) === Math.PI * 2);
71577+
7154771578
var halfAngle = pt.halfangle;
7154871579
var midAngle = pt.midangle;
71549-
var ring = pt.ring;
71550-
var rInscribed = pt.rInscribed;
71551-
var r = cd0.r || pt.rpx1;
71580+
7155271581
var orientation = cd0.trace.insidetextorientation;
7155371582
var isHorizontal = orientation === 'horizontal';
7155471583
var isTangential = orientation === 'tangential';
7155571584
var isRadial = orientation === 'radial';
7155671585
var isAuto = orientation === 'auto';
71557-
var isCircle = (ring === 1) && (Math.abs(pt.startangle - pt.stopangle) === Math.PI * 2);
71586+
7155871587
var allTransforms = [];
7155971588
var newT;
7156071589

@@ -71600,6 +71629,8 @@ function transformInsideText(textBB, pt, cd0) {
7160071629
// this inscribes the text rectangle in a circle, which is then inscribed
7160171630
// in the slice, so it will be an underestimate, which some day we may want
7160271631
// to improve so this case can get more use
71632+
var textDiameter = Math.sqrt(textBB.width * textBB.width + textBB.height * textBB.height);
71633+
7160371634
newT = {
7160471635
scale: rInscribed * r * 2 / textDiameter,
7160571636

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)