Skip to content

Commit 0feb35f

Browse files
committed
2.3.1
1 parent 2ca95b4 commit 0feb35f

24 files changed

+1316
-17033
lines changed

Diff for: dist/README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
4646
| 8.1 MB | 3.4 MB | 1 MB | 8.4 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.3.0.js
49+
> https://cdn.plot.ly/plotly-2.3.1.js
5050
51-
> https://cdn.plot.ly/plotly-2.3.0.min.js
51+
> https://cdn.plot.ly/plotly-2.3.1.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 | 971.3 kB | 315.8 kB |
94+
| 2.7 MB | 971.4 kB | 315.8 kB |
9595

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

102102
#### npm packages
@@ -117,9 +117,9 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
117117
| 3.3 MB | 1.2 MB | 387.3 kB |
118118

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

125125
#### npm packages
@@ -140,9 +140,9 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
140140
| 3 MB | 1.1 MB | 358.7 kB |
141141

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

148148
#### npm packages
@@ -163,9 +163,9 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
163163
| 3.7 MB | 1.5 MB | 471.1 kB |
164164

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

171171
#### npm packages
@@ -186,9 +186,9 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
186186
| 3.8 MB | 1.5 MB | 491.9 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.3.0.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.3.1.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.3.0.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.3.1.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 | 512.9 kB |
209+
| 4.3 MB | 1.7 MB | 513 kB |
210210

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

217217
#### npm packages
@@ -232,9 +232,9 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
232232
| 2.9 MB | 1.1 MB | 348.4 kB |
233233

234234
#### CDN links
235-
> https://cdn.plot.ly/plotly-finance-2.3.0.js
235+
> https://cdn.plot.ly/plotly-finance-2.3.1.js
236236
237-
> https://cdn.plot.ly/plotly-finance-2.3.0.min.js
237+
> https://cdn.plot.ly/plotly-finance-2.3.1.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`, `parcoords`, `pie`, `sankey`, `scatter`, `scattercarpet`, `scattergeo`, `scattergl`, `scattermapbox`, `scatterpolar`, `scatterpolargl`, `scatterternary`, `splom`, `sunburst`, `table`, `treemap`, `violin` and `waterfall`.
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`.
250250

251251
#### Stats
252252

253253
| Raw size | Minified size | Minified + gzip size |
254254
|------|-----------------|------------------------|
255-
| 6.9 MB | 2.8 MB | 860.5 kB |
255+
| 6.3 MB | 2.5 MB | 763.6 kB |
256256

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

263263
#### npm packages

Diff for: dist/plotly-basic.js

+47-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v2.3.0
2+
* plotly.js (basic) v2.3.1
33
* Copyright 2012-2021, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -27808,7 +27808,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
2780827808
}
2780927809

2781027810
function hoverDataKey(d) {
27811-
return [d.trace.index, d.index, d.x0, d.y0, d.name, d.attr, d.xa, d.ya || ''].join(',');
27811+
return [d.trace.index, d.index, d.x0, d.y0, d.name, d.attr, d.xa ? d.xa._id : '', d.ya ? d.ya._id : ''].join(',');
2781227812
}
2781327813

2781427814
var EXTRA_STRING_REGEX = /<extra>([\s\S]*)<\/extra>/;
@@ -28996,13 +28996,32 @@ function getCoord(axLetter, winningPoint, fullLayout) {
2899628996
var ax = winningPoint[axLetter + 'a'];
2899728997
var val = winningPoint[axLetter + 'Val'];
2899828998

28999+
var cd0 = winningPoint.cd[0];
29000+
2899929001
if(ax.type === 'category') val = ax._categoriesMap[val];
2900029002
else if(ax.type === 'date') {
29001-
var period = winningPoint[axLetter + 'Period'];
29002-
val = ax.d2c(period !== undefined ? period : val);
29003+
var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
29004+
if(periodalignment) {
29005+
var d = winningPoint.cd[winningPoint.index];
29006+
29007+
var start = d[axLetter + 'Start'];
29008+
if(start === undefined) start = d[axLetter];
29009+
29010+
var end = d[axLetter + 'End'];
29011+
if(end === undefined) end = d[axLetter];
29012+
29013+
var diff = end - start;
29014+
29015+
if(periodalignment === 'end') {
29016+
val += diff;
29017+
} else if(periodalignment === 'middle') {
29018+
val += diff / 2;
29019+
}
29020+
}
29021+
29022+
val = ax.d2c(val);
2900329023
}
2900429024

29005-
var cd0 = winningPoint.cd[winningPoint.index];
2900629025
if(cd0 && cd0.t && cd0.t.posLetter === ax._id) {
2900729026
if(
2900829027
fullLayout.boxmode === 'group' ||
@@ -73497,7 +73516,7 @@ var calcSelection = _dereq_('../scatter/calc_selection');
7349773516
module.exports = function calc(gd, trace) {
7349873517
var xa = Axes.getFromId(gd, trace.xaxis || 'x');
7349973518
var ya = Axes.getFromId(gd, trace.yaxis || 'y');
73500-
var size, pos, origPos, pObj, hasPeriod;
73519+
var size, pos, origPos, pObj, hasPeriod, pLetter;
7350173520

7350273521
var sizeOpts = {
7350373522
msUTC: !!(trace.base || trace.base === 0)
@@ -73508,11 +73527,13 @@ module.exports = function calc(gd, trace) {
7350873527
origPos = ya.makeCalcdata(trace, 'y');
7350973528
pObj = alignPeriod(trace, ya, 'y', origPos);
7351073529
hasPeriod = !!trace.yperiodalignment;
73530+
pLetter = 'y';
7351173531
} else {
7351273532
size = ya.makeCalcdata(trace, 'y', sizeOpts);
7351373533
origPos = xa.makeCalcdata(trace, 'x');
7351473534
pObj = alignPeriod(trace, xa, 'x', origPos);
7351573535
hasPeriod = !!trace.xperiodalignment;
73536+
pLetter = 'x';
7351673537
}
7351773538
pos = pObj.vals;
7351873539

@@ -73526,8 +73547,8 @@ module.exports = function calc(gd, trace) {
7352673547

7352773548
if(hasPeriod) {
7352873549
cd[i].orig_p = origPos[i]; // used by hover
73529-
cd[i].pEnd = pObj.ends[i];
73530-
cd[i].pStart = pObj.starts[i];
73550+
cd[i][pLetter + 'End'] = pObj.ends[i];
73551+
cd[i][pLetter + 'Start'] = pObj.starts[i];
7353173552
}
7353273553

7353373554
if(trace.ids) {
@@ -74009,20 +74030,12 @@ function setBarCenterAndWidth(pa, sieve) {
7400974030
var barwidth = t.barwidth;
7401074031
var barwidthIsArray = Array.isArray(barwidth);
7401174032

74012-
var trace = calcTrace[0].trace;
74013-
var isPeriod = !!trace[pLetter + 'periodalignment'];
74014-
7401574033
for(var j = 0; j < calcTrace.length; j++) {
7401674034
var calcBar = calcTrace[j];
7401774035

7401874036
// store the actual bar width and position, for use by hover
7401974037
var width = calcBar.w = barwidthIsArray ? barwidth[j] : barwidth;
7402074038
calcBar[pLetter] = calcBar.p + (poffsetIsArray ? poffset[j] : poffset) + width / 2;
74021-
74022-
if(isPeriod) {
74023-
calcBar.wPeriod =
74024-
calcBar.pEnd - calcBar.pStart;
74025-
}
7402674039
}
7402774040
}
7402874041
}
@@ -74678,18 +74691,26 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {
7467874691
}
7467974692

7468074693
var period = trace[posLetter + 'period'];
74694+
var isClosestOrPeriod = isClosest || period;
7468174695

7468274696
function thisBarMinPos(di) { return thisBarExtPos(di, -1); }
7468374697
function thisBarMaxPos(di) { return thisBarExtPos(di, 1); }
7468474698

7468574699
function thisBarExtPos(di, sgn) {
74686-
var w = (period) ? di.wPeriod : di.w;
74700+
var w = di.w;
7468774701

7468874702
return di[posLetter] + sgn * w / 2;
7468974703
}
7469074704

74691-
var minPos = isClosest || period ?
74692-
thisBarMinPos :
74705+
function periodLength(di) {
74706+
return di[posLetter + 'End'] - di[posLetter + 'Start'];
74707+
}
74708+
74709+
var minPos = isClosest ?
74710+
thisBarMinPos : period ?
74711+
function(di) {
74712+
return di.p - periodLength(di) / 2;
74713+
} :
7469374714
function(di) {
7469474715
/*
7469574716
* In compare mode, accept a bar if you're on it *or* its group.
@@ -74706,8 +74727,11 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {
7470674727
return Math.min(thisBarMinPos(di), di.p - t.bardelta / 2);
7470774728
};
7470874729

74709-
var maxPos = isClosest || period ?
74710-
thisBarMaxPos :
74730+
var maxPos = isClosest ?
74731+
thisBarMaxPos : period ?
74732+
function(di) {
74733+
return di.p + periodLength(di) / 2;
74734+
} :
7471174735
function(di) {
7471274736
return Math.max(thisBarMaxPos(di), di.p + t.bardelta / 2);
7471374737
};
@@ -74782,7 +74806,7 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {
7478274806
// if we get here and we're not in 'closest' mode, push min/max pos back
7478374807
// onto the group - even though that means occasionally the mouse will be
7478474808
// over the hover label.
74785-
if(!isClosest) {
74809+
if(!isClosestOrPeriod) {
7478674810
minPos = function(di) {
7478774811
return Math.min(thisBarMinPos(di), di.p - t.bargroupwidth / 2);
7478874812
};
@@ -74805,9 +74829,6 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {
7480574829

7480674830
var hasPeriod = di.orig_p !== undefined;
7480774831
pointData[posLetter + 'LabelVal'] = hasPeriod ? di.orig_p : di.p;
74808-
if(hasPeriod) {
74809-
pointData[posLetter + 'Period'] = di.p;
74810-
}
7481174832

7481274833
pointData.labelLabel = hoverLabelText(pa, pointData[posLetter + 'LabelVal'], trace[posLetter + 'hoverformat']);
7481374834
pointData.valueLabel = hoverLabelText(sa, pointData[sizeLetter + 'LabelVal'], trace[sizeLetter + 'hoverformat']);
@@ -79308,9 +79329,6 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
7930879329
hovertemplate: trace.hovertemplate
7930979330
});
7931079331

79311-
if(trace.xperiodalignment === 'end') pointData.xPeriod = di.x;
79312-
if(trace.yperiodalignment === 'end') pointData.yPeriod = di.y;
79313-
7931479332
fillText(di, trace, pointData);
7931579333
Registry.getComponentMethod('errorbars', 'hoverInfo')(di, trace, pointData);
7931679334

@@ -82079,7 +82097,7 @@ function getSortFunc(opts, d2c) {
8207982097
'use strict';
8208082098

8208182099
// package version injected by `npm run preprocess`
82082-
exports.version = '2.3.0';
82100+
exports.version = '2.3.1';
8208382101

8208482102
},{}]},{},[8])(8)
8208582103
});

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)