Skip to content

Commit 8788e57

Browse files
committed
2.5.0
1 parent b55ee8e commit 8788e57

24 files changed

+90354
-35604
lines changed

Diff for: dist/README.md

+28-28
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ The main plotly.js bundles weight in at:
4343

4444
| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |
4545
|-----------|---------------|----------------------|---------------------|
46-
| 8.1 MB | 3.4 MB | 1 MB | 8.4 MB |
46+
| 8.2 MB | 3.5 MB | 1 MB | 8.5 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.4.2.js
49+
> https://cdn.plot.ly/plotly-2.5.0.js
5050
51-
> https://cdn.plot.ly/plotly-2.4.2.min.js
51+
> https://cdn.plot.ly/plotly-2.5.0.min.js
5252
5353

5454
#### npm packages
@@ -91,12 +91,12 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`.
9191

9292
| Raw size | Minified size | Minified + gzip size |
9393
|------|-----------------|------------------------|
94-
| 2.7 MB | 972.6 kB | 316.4 kB |
94+
| 2.7 MB | 972.9 kB | 316.5 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-2.4.2.js
97+
> https://cdn.plot.ly/plotly-basic-2.5.0.js
9898
99-
> https://cdn.plot.ly/plotly-basic-2.4.2.min.js
99+
> https://cdn.plot.ly/plotly-basic-2.5.0.min.js
100100
101101

102102
#### npm packages
@@ -114,12 +114,12 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
114114

115115
| Raw size | Minified size | Minified + gzip size |
116116
|------|-----------------|------------------------|
117-
| 3.3 MB | 1.2 MB | 387.9 kB |
117+
| 3.3 MB | 1.2 MB | 388 kB |
118118

119119
#### CDN links
120-
> https://cdn.plot.ly/plotly-cartesian-2.4.2.js
120+
> https://cdn.plot.ly/plotly-cartesian-2.5.0.js
121121
122-
> https://cdn.plot.ly/plotly-cartesian-2.4.2.min.js
122+
> https://cdn.plot.ly/plotly-cartesian-2.5.0.min.js
123123
124124

125125
#### npm packages
@@ -137,12 +137,12 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
137137

138138
| Raw size | Minified size | Minified + gzip size |
139139
|------|-----------------|------------------------|
140-
| 3 MB | 1.1 MB | 359.2 kB |
140+
| 3 MB | 1.1 MB | 359.3 kB |
141141

142142
#### CDN links
143-
> https://cdn.plot.ly/plotly-geo-2.4.2.js
143+
> https://cdn.plot.ly/plotly-geo-2.5.0.js
144144
145-
> https://cdn.plot.ly/plotly-geo-2.4.2.min.js
145+
> https://cdn.plot.ly/plotly-geo-2.5.0.min.js
146146
147147

148148
#### npm packages
@@ -160,12 +160,12 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
160160

161161
| Raw size | Minified size | Minified + gzip size |
162162
|------|-----------------|------------------------|
163-
| 3.7 MB | 1.5 MB | 471.6 kB |
163+
| 3.8 MB | 1.5 MB | 472.2 kB |
164164

165165
#### CDN links
166-
> https://cdn.plot.ly/plotly-gl3d-2.4.2.js
166+
> https://cdn.plot.ly/plotly-gl3d-2.5.0.js
167167
168-
> https://cdn.plot.ly/plotly-gl3d-2.4.2.min.js
168+
> https://cdn.plot.ly/plotly-gl3d-2.5.0.min.js
169169
170170

171171
#### npm packages
@@ -183,12 +183,12 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
183183

184184
| Raw size | Minified size | Minified + gzip size |
185185
|------|-----------------|------------------------|
186-
| 3.8 MB | 1.5 MB | 493.6 kB |
186+
| 3.8 MB | 1.5 MB | 495.5 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.4.2.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.5.0.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.4.2.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.5.0.min.js
192192
193193

194194
#### npm packages
@@ -206,12 +206,12 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
206206

207207
| Raw size | Minified size | Minified + gzip size |
208208
|------|-----------------|------------------------|
209-
| 4.3 MB | 1.7 MB | 513.4 kB |
209+
| 4.3 MB | 1.7 MB | 513.6 kB |
210210

211211
#### CDN links
212-
> https://cdn.plot.ly/plotly-mapbox-2.4.2.js
212+
> https://cdn.plot.ly/plotly-mapbox-2.5.0.js
213213
214-
> https://cdn.plot.ly/plotly-mapbox-2.4.2.min.js
214+
> https://cdn.plot.ly/plotly-mapbox-2.5.0.min.js
215215
216216

217217
#### npm packages
@@ -229,12 +229,12 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
229229

230230
| Raw size | Minified size | Minified + gzip size |
231231
|------|-----------------|------------------------|
232-
| 2.9 MB | 1.1 MB | 348.9 kB |
232+
| 2.9 MB | 1.1 MB | 349.1 kB |
233233

234234
#### CDN links
235-
> https://cdn.plot.ly/plotly-finance-2.4.2.js
235+
> https://cdn.plot.ly/plotly-finance-2.5.0.js
236236
237-
> https://cdn.plot.ly/plotly-finance-2.4.2.min.js
237+
> https://cdn.plot.ly/plotly-finance-2.5.0.min.js
238238
239239

240240
#### npm packages
@@ -246,18 +246,18 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
246246

247247
### plotly.js strict
248248

249-
The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `candlestick`, `carpet`, `choropleth`, `choroplethmapbox`, `contour`, `contourcarpet`, `densitymapbox`, `funnel`, `funnelarea`, `heatmap`, `histogram`, `histogram2d`, `histogram2dcontour`, `icicle`, `image`, `indicator`, `ohlc`, `parcats`, `pie`, `sankey`, `scatter`, `scattercarpet`, `scattergeo`, `scattermapbox`, `scatterpolar`, `scatterternary`, `sunburst`, `table`, `treemap`, `violin` and `waterfall`.
249+
The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `candlestick`, `carpet`, `choropleth`, `choroplethmapbox`, `cone`, `contour`, `contourcarpet`, `densitymapbox`, `funnel`, `funnelarea`, `heatmap`, `heatmapgl`, `histogram`, `histogram2d`, `histogram2dcontour`, `icicle`, `image`, `indicator`, `isosurface`, `mesh3d`, `ohlc`, `parcats`, `pie`, `pointcloud`, `sankey`, `scatter`, `scatter`, `scatter3d`, `scattercarpet`, `scattergeo`, `scattermapbox`, `scatterpolar`, `scatterternary`, `streamtube`, `sunburst`, `surface`, `table`, `treemap`, `violin`, `volume` and `waterfall`.
250250

251251
#### Stats
252252

253253
| Raw size | Minified size | Minified + gzip size |
254254
|------|-----------------|------------------------|
255-
| 6.3 MB | 2.5 MB | 764.2 kB |
255+
| 7.7 MB | 3.2 MB | 950.5 kB |
256256

257257
#### CDN links
258-
> https://cdn.plot.ly/plotly-strict-2.4.2.js
258+
> https://cdn.plot.ly/plotly-strict-2.5.0.js
259259
260-
> https://cdn.plot.ly/plotly-strict-2.4.2.min.js
260+
> https://cdn.plot.ly/plotly-strict-2.5.0.min.js
261261
262262

263263
#### npm packages

Diff for: dist/plotly-basic.js

+48-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v2.4.2
2+
* plotly.js (basic) v2.5.0
33
* Copyright 2012-2021, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -27894,7 +27894,7 @@ function createHoverText(hoverData, opts) {
2789427894
var ya = c0.ya;
2789527895
var axLetter = hovermode.charAt(0);
2789627896
var t0 = c0[axLetter + 'Label'];
27897-
var outerContainerBB = outerContainer.getBoundingClientRect();
27897+
var outerContainerBB = getBoundingClientRect(gd, outerContainer);
2789827898
var outerTop = outerContainerBB.top;
2789927899
var outerWidth = outerContainerBB.width;
2790027900
var outerHeight = outerContainerBB.height;
@@ -27969,7 +27969,7 @@ function createHoverText(hoverData, opts) {
2796927969

2797027970
label.attr('transform', '');
2797127971

27972-
var tbb = ltext.node().getBoundingClientRect();
27972+
var tbb = getBoundingClientRect(gd, ltext.node());
2797327973
var lx, ly;
2797427974

2797527975
if(hovermode === 'x') {
@@ -28062,7 +28062,7 @@ function createHoverText(hoverData, opts) {
2806228062
var dummy = Drawing.tester.append('text')
2806328063
.text(s.text())
2806428064
.call(Drawing.font, commonLabelFont);
28065-
var dummyBB = dummy.node().getBoundingClientRect();
28065+
var dummyBB = getBoundingClientRect(gd, dummy.node());
2806628066
if(Math.round(dummyBB.width) < Math.round(tbb.width)) {
2806728067
s.attr('x', ltx - dummyBB.width);
2806828068
}
@@ -28151,7 +28151,7 @@ function createHoverText(hoverData, opts) {
2815128151

2815228152
// Position the hover
2815328153
var legendContainer = container.select('g.legend');
28154-
var tbb = legendContainer.node().getBoundingClientRect();
28154+
var tbb = getBoundingClientRect(gd, legendContainer.node());
2815528155
var tWidth = tbb.width + 2 * HOVERTEXTPAD;
2815628156
var tHeight = tbb.height + 2 * HOVERTEXTPAD;
2815728157
var winningPoint = hoverData[0];
@@ -28316,7 +28316,7 @@ function createHoverText(hoverData, opts) {
2831628316
.call(svgTextUtils.positionText, 0, 0)
2831728317
.call(svgTextUtils.convertToTspans, gd);
2831828318

28319-
var t2bb = tx2.node().getBoundingClientRect();
28319+
var t2bb = getBoundingClientRect(gd, tx2.node());
2832028320
tx2width = t2bb.width + 2 * HOVERTEXTPAD;
2832128321
tx2height = t2bb.height + 2 * HOVERTEXTPAD;
2832228322
} else {
@@ -28329,22 +28329,26 @@ function createHoverText(hoverData, opts) {
2832928329
stroke: contrastColor
2833028330
});
2833128331

28332-
var tbb = tx.node().getBoundingClientRect();
2833328332
var htx = d.xa._offset + (d.x0 + d.x1) / 2;
2833428333
var hty = d.ya._offset + (d.y0 + d.y1) / 2;
2833528334
var dx = Math.abs(d.x1 - d.x0);
2833628335
var dy = Math.abs(d.y1 - d.y0);
28337-
var txTotalWidth = tbb.width + HOVERARROWSIZE + HOVERTEXTPAD + tx2width;
28338-
var anchorStartOK, anchorEndOK;
2833928336

28340-
d.ty0 = outerTop - tbb.top;
28341-
d.bx = tbb.width + 2 * HOVERTEXTPAD;
28342-
d.by = Math.max(tbb.height + 2 * HOVERTEXTPAD, tx2height);
28337+
var tbb = getBoundingClientRect(gd, tx.node());
28338+
var tbbWidth = tbb.width / fullLayout._invScaleX;
28339+
var tbbHeight = tbb.height / fullLayout._invScaleY;
28340+
28341+
d.ty0 = (outerTop - tbb.top) / fullLayout._invScaleY;
28342+
d.bx = tbbWidth + 2 * HOVERTEXTPAD;
28343+
d.by = Math.max(tbbHeight + 2 * HOVERTEXTPAD, tx2height);
2834328344
d.anchor = 'start';
28344-
d.txwidth = tbb.width;
28345+
d.txwidth = tbbWidth;
2834528346
d.tx2width = tx2width;
2834628347
d.offset = 0;
2834728348

28349+
var txTotalWidth = (tbbWidth + HOVERARROWSIZE + HOVERTEXTPAD + tx2width) * fullLayout._invScaleX;
28350+
var anchorStartOK, anchorEndOK;
28351+
2834828352
if(rotateLabels) {
2834928353
d.pos = htx;
2835028354
anchorStartOK = hty + dy / 2 + txTotalWidth <= outerHeight;
@@ -29104,6 +29108,36 @@ function getCoord(axLetter, winningPoint, fullLayout) {
2910429108
function getTopOffset(gd) { return gd.offsetTop + gd.clientTop; }
2910529109
function getLeftOffset(gd) { return gd.offsetLeft + gd.clientLeft; }
2910629110

29111+
function getBoundingClientRect(gd, node) {
29112+
var fullLayout = gd._fullLayout;
29113+
29114+
var rect = node.getBoundingClientRect();
29115+
29116+
var x0 = rect.x;
29117+
var y0 = rect.y;
29118+
var x1 = x0 + rect.width;
29119+
var y1 = y0 + rect.height;
29120+
29121+
var A = Lib.apply3DTransform(fullLayout._invTransform)(x0, y0);
29122+
var B = Lib.apply3DTransform(fullLayout._invTransform)(x1, y1);
29123+
29124+
var Ax = A[0];
29125+
var Ay = A[1];
29126+
var Bx = B[0];
29127+
var By = B[1];
29128+
29129+
return {
29130+
x: Ax,
29131+
y: Ay,
29132+
width: Bx - Ax,
29133+
height: By - Ay,
29134+
top: Math.min(Ay, By),
29135+
left: Math.min(Ax, Bx),
29136+
right: Math.max(Ax, Bx),
29137+
bottom: Math.max(Ay, By),
29138+
};
29139+
}
29140+
2910729141
},{"../../lib":232,"../../lib/events":225,"../../lib/override_cursor":243,"../../lib/svg_text_utils":255,"../../plots/cartesian/axes":279,"../../registry":316,"../color":102,"../dragelement":121,"../drawing":124,"../legend/defaults":154,"../legend/draw":155,"./constants":136,"./helpers":138,"@plotly/d3":11,"fast-isnumeric":17,"tinycolor2":67}],140:[function(_dereq_,module,exports){
2910829142
'use strict';
2910929143

@@ -82201,7 +82235,7 @@ function getSortFunc(opts, d2c) {
8220182235
'use strict';
8220282236

8220382237
// package version injected by `npm run preprocess`
82204-
exports.version = '2.4.2';
82238+
exports.version = '2.5.0';
8220582239

8220682240
},{}]},{},[8])(8)
8220782241
});

Diff for: 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)