Skip to content

Commit

Permalink
2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Jul 30, 2021
1 parent 2ca95b4 commit 0feb35f
Show file tree
Hide file tree
Showing 24 changed files with 1,316 additions and 17,033 deletions.
44 changes: 22 additions & 22 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
| 8.1 MB | 3.4 MB | 1 MB | 8.4 MB |

#### CDN links
> https://cdn.plot.ly/plotly-2.3.0.js
> https://cdn.plot.ly/plotly-2.3.1.js
> https://cdn.plot.ly/plotly-2.3.0.min.js
> https://cdn.plot.ly/plotly-2.3.1.min.js

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 2.7 MB | 971.3 kB | 315.8 kB |
| 2.7 MB | 971.4 kB | 315.8 kB |

#### CDN links
> https://cdn.plot.ly/plotly-basic-2.3.0.js
> https://cdn.plot.ly/plotly-basic-2.3.1.js
> https://cdn.plot.ly/plotly-basic-2.3.0.min.js
> https://cdn.plot.ly/plotly-basic-2.3.1.min.js

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

#### CDN links
> https://cdn.plot.ly/plotly-cartesian-2.3.0.js
> https://cdn.plot.ly/plotly-cartesian-2.3.1.js
> https://cdn.plot.ly/plotly-cartesian-2.3.0.min.js
> https://cdn.plot.ly/plotly-cartesian-2.3.1.min.js

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

#### CDN links
> https://cdn.plot.ly/plotly-geo-2.3.0.js
> https://cdn.plot.ly/plotly-geo-2.3.1.js
> https://cdn.plot.ly/plotly-geo-2.3.0.min.js
> https://cdn.plot.ly/plotly-geo-2.3.1.min.js

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

#### CDN links
> https://cdn.plot.ly/plotly-gl3d-2.3.0.js
> https://cdn.plot.ly/plotly-gl3d-2.3.1.js
> https://cdn.plot.ly/plotly-gl3d-2.3.0.min.js
> https://cdn.plot.ly/plotly-gl3d-2.3.1.min.js

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

#### CDN links
> https://cdn.plot.ly/plotly-gl2d-2.3.0.js
> https://cdn.plot.ly/plotly-gl2d-2.3.1.js
> https://cdn.plot.ly/plotly-gl2d-2.3.0.min.js
> https://cdn.plot.ly/plotly-gl2d-2.3.1.min.js

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

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 4.3 MB | 1.7 MB | 512.9 kB |
| 4.3 MB | 1.7 MB | 513 kB |

#### CDN links
> https://cdn.plot.ly/plotly-mapbox-2.3.0.js
> https://cdn.plot.ly/plotly-mapbox-2.3.1.js
> https://cdn.plot.ly/plotly-mapbox-2.3.0.min.js
> https://cdn.plot.ly/plotly-mapbox-2.3.1.min.js

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

#### CDN links
> https://cdn.plot.ly/plotly-finance-2.3.0.js
> https://cdn.plot.ly/plotly-finance-2.3.1.js
> https://cdn.plot.ly/plotly-finance-2.3.0.min.js
> https://cdn.plot.ly/plotly-finance-2.3.1.min.js

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

### plotly.js strict

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`.
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`.

#### Stats

| Raw size | Minified size | Minified + gzip size |
|------|-----------------|------------------------|
| 6.9 MB | 2.8 MB | 860.5 kB |
| 6.3 MB | 2.5 MB | 763.6 kB |

#### CDN links
> https://cdn.plot.ly/plotly-strict-2.3.0.js
> https://cdn.plot.ly/plotly-strict-2.3.1.js
> https://cdn.plot.ly/plotly-strict-2.3.0.min.js
> https://cdn.plot.ly/plotly-strict-2.3.1.min.js

#### npm packages
Expand Down
76 changes: 47 additions & 29 deletions dist/plotly-basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (basic) v2.3.0
* plotly.js (basic) v2.3.1
* Copyright 2012-2021, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -27808,7 +27808,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
}

function hoverDataKey(d) {
return [d.trace.index, d.index, d.x0, d.y0, d.name, d.attr, d.xa, d.ya || ''].join(',');
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(',');
}

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

var cd0 = winningPoint.cd[0];

if(ax.type === 'category') val = ax._categoriesMap[val];
else if(ax.type === 'date') {
var period = winningPoint[axLetter + 'Period'];
val = ax.d2c(period !== undefined ? period : val);
var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
if(periodalignment) {
var d = winningPoint.cd[winningPoint.index];

var start = d[axLetter + 'Start'];
if(start === undefined) start = d[axLetter];

var end = d[axLetter + 'End'];
if(end === undefined) end = d[axLetter];

var diff = end - start;

if(periodalignment === 'end') {
val += diff;
} else if(periodalignment === 'middle') {
val += diff / 2;
}
}

val = ax.d2c(val);
}

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

var sizeOpts = {
msUTC: !!(trace.base || trace.base === 0)
Expand All @@ -73508,11 +73527,13 @@ module.exports = function calc(gd, trace) {
origPos = ya.makeCalcdata(trace, 'y');
pObj = alignPeriod(trace, ya, 'y', origPos);
hasPeriod = !!trace.yperiodalignment;
pLetter = 'y';
} else {
size = ya.makeCalcdata(trace, 'y', sizeOpts);
origPos = xa.makeCalcdata(trace, 'x');
pObj = alignPeriod(trace, xa, 'x', origPos);
hasPeriod = !!trace.xperiodalignment;
pLetter = 'x';
}
pos = pObj.vals;

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

if(hasPeriod) {
cd[i].orig_p = origPos[i]; // used by hover
cd[i].pEnd = pObj.ends[i];
cd[i].pStart = pObj.starts[i];
cd[i][pLetter + 'End'] = pObj.ends[i];
cd[i][pLetter + 'Start'] = pObj.starts[i];
}

if(trace.ids) {
Expand Down Expand Up @@ -74009,20 +74030,12 @@ function setBarCenterAndWidth(pa, sieve) {
var barwidth = t.barwidth;
var barwidthIsArray = Array.isArray(barwidth);

var trace = calcTrace[0].trace;
var isPeriod = !!trace[pLetter + 'periodalignment'];

for(var j = 0; j < calcTrace.length; j++) {
var calcBar = calcTrace[j];

// store the actual bar width and position, for use by hover
var width = calcBar.w = barwidthIsArray ? barwidth[j] : barwidth;
calcBar[pLetter] = calcBar.p + (poffsetIsArray ? poffset[j] : poffset) + width / 2;

if(isPeriod) {
calcBar.wPeriod =
calcBar.pEnd - calcBar.pStart;
}
}
}
}
Expand Down Expand Up @@ -74678,18 +74691,26 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {
}

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

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

function thisBarExtPos(di, sgn) {
var w = (period) ? di.wPeriod : di.w;
var w = di.w;

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

var minPos = isClosest || period ?
thisBarMinPos :
function periodLength(di) {
return di[posLetter + 'End'] - di[posLetter + 'Start'];
}

var minPos = isClosest ?
thisBarMinPos : period ?
function(di) {
return di.p - periodLength(di) / 2;
} :
function(di) {
/*
* In compare mode, accept a bar if you're on it *or* its group.
Expand All @@ -74706,8 +74727,11 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {
return Math.min(thisBarMinPos(di), di.p - t.bardelta / 2);
};

var maxPos = isClosest || period ?
thisBarMaxPos :
var maxPos = isClosest ?
thisBarMaxPos : period ?
function(di) {
return di.p + periodLength(di) / 2;
} :
function(di) {
return Math.max(thisBarMaxPos(di), di.p + t.bardelta / 2);
};
Expand Down Expand Up @@ -74782,7 +74806,7 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {
// if we get here and we're not in 'closest' mode, push min/max pos back
// onto the group - even though that means occasionally the mouse will be
// over the hover label.
if(!isClosest) {
if(!isClosestOrPeriod) {
minPos = function(di) {
return Math.min(thisBarMinPos(di), di.p - t.bargroupwidth / 2);
};
Expand All @@ -74805,9 +74829,6 @@ function hoverOnBars(pointData, xval, yval, hovermode, opts) {

var hasPeriod = di.orig_p !== undefined;
pointData[posLetter + 'LabelVal'] = hasPeriod ? di.orig_p : di.p;
if(hasPeriod) {
pointData[posLetter + 'Period'] = di.p;
}

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

if(trace.xperiodalignment === 'end') pointData.xPeriod = di.x;
if(trace.yperiodalignment === 'end') pointData.yPeriod = di.y;

fillText(di, trace, pointData);
Registry.getComponentMethod('errorbars', 'hoverInfo')(di, trace, pointData);

Expand Down Expand Up @@ -82079,7 +82097,7 @@ function getSortFunc(opts, d2c) {
'use strict';

// package version injected by `npm run preprocess`
exports.version = '2.3.0';
exports.version = '2.3.1';

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

Large diffs are not rendered by default.

0 comments on commit 0feb35f

Please sign in to comment.