plotly.js 3.0.0-rc.1 → 3.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/CITATION.cff +1 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +3 -3
- package/dist/README.md +20 -20
- package/dist/plotly-basic.js +10 -5
- package/dist/plotly-basic.min.js +4 -4
- package/dist/plotly-cartesian.js +10 -5
- package/dist/plotly-cartesian.min.js +4 -4
- package/dist/plotly-finance.js +10 -5
- package/dist/plotly-finance.min.js +4 -4
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +10 -5
- package/dist/plotly-geo.min.js +4 -4
- package/dist/plotly-gl2d.js +10 -5
- package/dist/plotly-gl2d.min.js +4 -4
- package/dist/plotly-gl3d.js +10 -5
- package/dist/plotly-gl3d.min.js +4 -4
- package/dist/plotly-mapbox.js +10 -5
- package/dist/plotly-mapbox.min.js +4 -4
- package/dist/plotly-strict.js +49 -10
- package/dist/plotly-strict.min.js +5 -5
- package/dist/plotly-with-meta.js +49 -10
- package/dist/plotly.js +49 -10
- package/dist/plotly.min.js +46 -46
- package/package.json +1 -1
- package/src/components/fx/helpers.js +7 -2
- package/src/plot_api/plot_api.js +19 -1
- package/src/plot_api/subroutines.js +8 -0
- package/src/traces/sankey/render.js +156 -109
- package/src/version.js +1 -1
package/dist/plotly-strict.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (strict) v3.0.0-rc.
|
|
2
|
+
* plotly.js (strict) v3.0.0-rc.2
|
|
3
3
|
* Copyright 2012-2024, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -59,7 +59,7 @@ var Plotly = (() => {
|
|
|
59
59
|
var require_version = __commonJS({
|
|
60
60
|
"src/version.js"(exports) {
|
|
61
61
|
"use strict";
|
|
62
|
-
exports.version = "3.0.0-rc.
|
|
62
|
+
exports.version = "3.0.0-rc.2";
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -22721,8 +22721,10 @@ var Plotly = (() => {
|
|
|
22721
22721
|
pointData.distance = 0;
|
|
22722
22722
|
} else pointData.index = false;
|
|
22723
22723
|
} else {
|
|
22724
|
-
|
|
22725
|
-
|
|
22724
|
+
var newDistance = Infinity;
|
|
22725
|
+
var len = cd.length;
|
|
22726
|
+
for (var i = 0; i < len; i++) {
|
|
22727
|
+
newDistance = distfn(cd[i]);
|
|
22726
22728
|
if (newDistance <= pointData.distance) {
|
|
22727
22729
|
pointData.index = i;
|
|
22728
22730
|
pointData.distance = newDistance;
|
|
@@ -46411,7 +46413,10 @@ var Plotly = (() => {
|
|
|
46411
46413
|
fullLayout._calcInverseTransform = calcInverseTransform;
|
|
46412
46414
|
fullLayout._calcInverseTransform(gd);
|
|
46413
46415
|
fullLayout._container = gd3.selectAll(".plot-container").data([0]);
|
|
46414
|
-
fullLayout._container.enter().insert("div", ":first-child").classed("plot-container", true).classed("plotly", true)
|
|
46416
|
+
fullLayout._container.enter().insert("div", ":first-child").classed("plot-container", true).classed("plotly", true).style({
|
|
46417
|
+
width: "100%",
|
|
46418
|
+
height: "100%"
|
|
46419
|
+
});
|
|
46415
46420
|
fullLayout._paperdiv = fullLayout._container.selectAll(".svg-container").data([0]);
|
|
46416
46421
|
fullLayout._paperdiv.enter().append("div").classed("user-select-none", true).classed("svg-container", true).style("position", "relative");
|
|
46417
46422
|
fullLayout._glcontainer = fullLayout._paperdiv.selectAll(".gl-container").data([{}]);
|
|
@@ -261182,14 +261187,48 @@ uniform ${i3} ${a3} u_${s3};
|
|
|
261182
261187
|
var pathString = "";
|
|
261183
261188
|
var offset = link.width / 2;
|
|
261184
261189
|
var coords = link.circularPathData;
|
|
261190
|
+
var isSourceBeforeTarget = coords.sourceX + coords.verticalBuffer < coords.targetX;
|
|
261191
|
+
var isPathOverlapped = coords.rightFullExtent - coords.rightLargeArcRadius - arrowLen <= coords.leftFullExtent - offset;
|
|
261192
|
+
var diff = Math.abs(coords.rightFullExtent - coords.leftFullExtent - offset) < offset;
|
|
261185
261193
|
if (link.circularLinkType === "top") {
|
|
261186
261194
|
pathString = // start at the left of the target node
|
|
261187
|
-
"M " + (coords.targetX - arrowLen) + " " + (coords.targetY + offset) + " L" + (coords.rightInnerExtent - arrowLen) + " " + (coords.targetY + offset) + "A" + (coords.rightLargeArcRadius + offset) + " " + (coords.rightSmallArcRadius + offset) + " 0 0 1 " + (coords.rightFullExtent - offset - arrowLen) + " " + (coords.targetY - coords.rightSmallArcRadius) + "L" + (coords.rightFullExtent - offset - arrowLen) + " " + coords.verticalRightInnerExtent
|
|
261188
|
-
|
|
261195
|
+
"M " + (coords.targetX - arrowLen) + " " + (coords.targetY + offset) + " L " + (coords.rightInnerExtent - arrowLen) + " " + (coords.targetY + offset) + "A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightSmallArcRadius + offset) + " 0 0 1 " + (coords.rightFullExtent - offset - arrowLen) + " " + (coords.targetY - coords.rightSmallArcRadius) + "L " + (coords.rightFullExtent - offset - arrowLen) + " " + coords.verticalRightInnerExtent;
|
|
261196
|
+
if (isSourceBeforeTarget && isPathOverlapped) {
|
|
261197
|
+
pathString += " A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightLargeArcRadius + offset) + " 0 0 1 " + (coords.rightFullExtent + offset - arrowLen - (coords.rightLargeArcRadius - offset)) + " " + (coords.verticalRightInnerExtent - (coords.rightLargeArcRadius + offset)) + " L " + (coords.rightFullExtent + offset - (coords.rightLargeArcRadius - offset) - arrowLen) + " " + (coords.verticalRightInnerExtent - (coords.rightLargeArcRadius + offset)) + " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftLargeArcRadius + offset) + " 0 0 1 " + (coords.leftFullExtent + offset) + " " + coords.verticalRightInnerExtent;
|
|
261198
|
+
} else if (isSourceBeforeTarget) {
|
|
261199
|
+
pathString += " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightLargeArcRadius - offset) + " 0 0 0 " + (coords.rightFullExtent - offset - arrowLen - (coords.rightLargeArcRadius - offset)) + " " + (coords.verticalRightInnerExtent - (coords.rightLargeArcRadius - offset)) + " L " + (coords.leftFullExtent + offset + (coords.rightLargeArcRadius - offset)) + " " + (coords.verticalRightInnerExtent - (coords.rightLargeArcRadius - offset)) + " A " + (coords.leftLargeArcRadius - offset) + " " + (coords.leftLargeArcRadius - offset) + " 0 0 0 " + (coords.leftFullExtent + offset) + " " + coords.verticalLeftInnerExtent;
|
|
261200
|
+
} else {
|
|
261201
|
+
pathString += " A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightLargeArcRadius + offset) + " 0 0 1 " + (coords.rightInnerExtent - arrowLen) + " " + (coords.verticalFullExtent - offset) + " L " + coords.leftInnerExtent + " " + (coords.verticalFullExtent - offset) + " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftLargeArcRadius + offset) + " 0 0 1 " + (coords.leftFullExtent + offset) + " " + coords.verticalLeftInnerExtent;
|
|
261202
|
+
}
|
|
261203
|
+
pathString += " L " + (coords.leftFullExtent + offset) + " " + (coords.sourceY - coords.leftSmallArcRadius) + " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftSmallArcRadius + offset) + " 0 0 1 " + coords.leftInnerExtent + " " + (coords.sourceY + offset) + " L " + coords.sourceX + " " + (coords.sourceY + offset) + // Walking back
|
|
261204
|
+
" L " + coords.sourceX + " " + (coords.sourceY - offset) + " L " + coords.leftInnerExtent + " " + (coords.sourceY - offset) + " A " + (coords.leftLargeArcRadius - offset) + " " + (coords.leftSmallArcRadius - offset) + " 0 0 0 " + (coords.leftFullExtent - offset) + " " + (coords.sourceY - coords.leftSmallArcRadius) + " L " + (coords.leftFullExtent - offset) + " " + coords.verticalLeftInnerExtent;
|
|
261205
|
+
if (isSourceBeforeTarget && isPathOverlapped) {
|
|
261206
|
+
pathString += " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftSmallArcRadius + offset) + " 0 0 0 " + (coords.leftFullExtent - offset) + " " + (coords.verticalFullExtent + offset) + "L" + (coords.rightFullExtent + offset - arrowLen) + " " + (coords.verticalFullExtent + offset) + " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftSmallArcRadius + offset) + " 0 0 0 " + (coords.rightFullExtent + offset - arrowLen) + " " + coords.verticalRightInnerExtent;
|
|
261207
|
+
} else if (isSourceBeforeTarget) {
|
|
261208
|
+
pathString += " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftSmallArcRadius + offset) + " 0 0 1 " + (coords.leftFullExtent + offset) + " " + (coords.verticalFullExtent - offset) + " L " + (coords.rightFullExtent - offset - arrowLen) + " " + (coords.verticalFullExtent - offset) + " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftSmallArcRadius + offset) + " 0 0 1 " + (coords.rightFullExtent + offset - arrowLen) + " " + coords.verticalRightInnerExtent;
|
|
261209
|
+
} else {
|
|
261210
|
+
pathString += " A " + (coords.leftLargeArcRadius - offset) + " " + (coords.leftLargeArcRadius - offset) + " 0 0 0 " + coords.leftInnerExtent + " " + (coords.verticalFullExtent + offset) + " L " + (coords.rightInnerExtent - arrowLen) + " " + (coords.verticalFullExtent + offset) + " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightLargeArcRadius - offset) + " 0 0 0 " + (coords.rightFullExtent + offset - arrowLen) + " " + coords.verticalRightInnerExtent;
|
|
261211
|
+
}
|
|
261212
|
+
pathString += " L " + (coords.rightFullExtent + offset - arrowLen) + " " + (coords.targetY - coords.rightSmallArcRadius) + " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightSmallArcRadius - offset) + " 0 0 0 " + (coords.rightInnerExtent - arrowLen) + " " + (coords.targetY - offset) + " L " + (coords.targetX - arrowLen) + " " + (coords.targetY - offset) + (arrowLen > 0 ? " L " + coords.targetX + " " + coords.targetY : "") + "Z";
|
|
261189
261213
|
} else {
|
|
261190
|
-
pathString =
|
|
261191
|
-
|
|
261192
|
-
|
|
261214
|
+
pathString = "M " + (coords.targetX - arrowLen) + " " + (coords.targetY - offset) + " L " + (coords.rightInnerExtent - arrowLen) + " " + (coords.targetY - offset) + " A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightSmallArcRadius + offset) + " 0 0 0 " + (coords.rightFullExtent - offset - arrowLen) + " " + (coords.targetY + coords.rightSmallArcRadius) + " L " + (coords.rightFullExtent - offset - arrowLen) + " " + coords.verticalRightInnerExtent;
|
|
261215
|
+
if (isSourceBeforeTarget && isPathOverlapped) {
|
|
261216
|
+
pathString += " A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightLargeArcRadius + offset) + " 0 0 0 " + (coords.rightInnerExtent - offset - arrowLen) + " " + (coords.verticalFullExtent + offset) + " L " + (coords.rightFullExtent + offset - arrowLen - (coords.rightLargeArcRadius - offset)) + " " + (coords.verticalFullExtent + offset) + " A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightLargeArcRadius + offset) + " 0 0 0 " + (coords.leftFullExtent + offset) + " " + coords.verticalLeftInnerExtent;
|
|
261217
|
+
} else if (isSourceBeforeTarget) {
|
|
261218
|
+
pathString += " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightSmallArcRadius - offset) + " 0 0 1 " + (coords.rightFullExtent - arrowLen - offset - (coords.rightLargeArcRadius - offset)) + " " + (coords.verticalFullExtent - offset) + " L " + (coords.leftFullExtent + offset + (coords.rightLargeArcRadius - offset)) + " " + (coords.verticalFullExtent - offset) + " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightSmallArcRadius - offset) + " 0 0 1 " + (coords.leftFullExtent + offset) + " " + coords.verticalLeftInnerExtent;
|
|
261219
|
+
} else {
|
|
261220
|
+
pathString += " A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightLargeArcRadius + offset) + " 0 0 0 " + (coords.rightInnerExtent - arrowLen) + " " + (coords.verticalFullExtent + offset) + " L " + coords.leftInnerExtent + " " + (coords.verticalFullExtent + offset) + " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftLargeArcRadius + offset) + " 0 0 0 " + (coords.leftFullExtent + offset) + " " + coords.verticalLeftInnerExtent;
|
|
261221
|
+
}
|
|
261222
|
+
pathString += " L " + (coords.leftFullExtent + offset) + " " + (coords.sourceY + coords.leftSmallArcRadius) + " A " + (coords.leftLargeArcRadius + offset) + " " + (coords.leftSmallArcRadius + offset) + " 0 0 0 " + coords.leftInnerExtent + " " + (coords.sourceY - offset) + " L " + coords.sourceX + " " + (coords.sourceY - offset) + // Walking back
|
|
261223
|
+
" L " + coords.sourceX + " " + (coords.sourceY + offset) + " L " + coords.leftInnerExtent + " " + (coords.sourceY + offset) + " A " + (coords.leftLargeArcRadius - offset) + " " + (coords.leftSmallArcRadius - offset) + " 0 0 1 " + (coords.leftFullExtent - offset) + " " + (coords.sourceY + coords.leftSmallArcRadius) + " L " + (coords.leftFullExtent - offset) + " " + coords.verticalLeftInnerExtent;
|
|
261224
|
+
if (isSourceBeforeTarget && isPathOverlapped) {
|
|
261225
|
+
pathString += " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightSmallArcRadius - offset) + " 0 0 1 " + (coords.leftFullExtent - offset - (coords.rightLargeArcRadius - offset)) + " " + (coords.verticalFullExtent - offset) + " L " + (coords.rightFullExtent + offset - arrowLen + (coords.rightLargeArcRadius - offset)) + " " + (coords.verticalFullExtent - offset) + " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightSmallArcRadius - offset) + " 0 0 1 " + (coords.rightFullExtent + offset - arrowLen) + " " + coords.verticalRightInnerExtent;
|
|
261226
|
+
} else if (isSourceBeforeTarget) {
|
|
261227
|
+
pathString += " A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightLargeArcRadius + offset) + " 0 0 0 " + (coords.leftFullExtent + offset) + " " + (coords.verticalFullExtent + offset) + " L " + (coords.rightFullExtent - arrowLen - offset) + " " + (coords.verticalFullExtent + offset) + " A " + (coords.rightLargeArcRadius + offset) + " " + (coords.rightLargeArcRadius + offset) + " 0 0 0 " + (coords.rightFullExtent + offset - arrowLen) + " " + coords.verticalRightInnerExtent;
|
|
261228
|
+
} else {
|
|
261229
|
+
pathString += " A " + (coords.leftLargeArcRadius - offset) + " " + (coords.leftLargeArcRadius - offset) + " 0 0 1 " + coords.leftInnerExtent + " " + (coords.verticalFullExtent - offset) + " L " + (coords.rightInnerExtent - arrowLen) + " " + (coords.verticalFullExtent - offset) + " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightLargeArcRadius - offset) + " 0 0 1 " + (coords.rightFullExtent + offset - arrowLen) + " " + coords.verticalRightInnerExtent;
|
|
261230
|
+
}
|
|
261231
|
+
pathString += " L " + (coords.rightFullExtent + offset - arrowLen) + " " + (coords.targetY + coords.rightSmallArcRadius) + " A " + (coords.rightLargeArcRadius - offset) + " " + (coords.rightSmallArcRadius - offset) + " 0 0 1 " + (coords.rightInnerExtent - arrowLen) + " " + (coords.targetY + offset) + " L " + (coords.targetX - arrowLen) + " " + (coords.targetY + offset) + (arrowLen > 0 ? " L " + coords.targetX + " " + coords.targetY : "") + "Z";
|
|
261193
261232
|
}
|
|
261194
261233
|
return pathString;
|
|
261195
261234
|
}
|