plotly.js 2.13.1 → 2.14.0
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 +26 -0
- package/README.md +3 -3
- package/dist/README.md +26 -26
- package/dist/plot-schema.json +12 -0
- package/dist/plotly-basic.js +83 -29
- package/dist/plotly-basic.min.js +2 -2
- package/dist/plotly-cartesian.js +83 -29
- package/dist/plotly-cartesian.min.js +2 -2
- package/dist/plotly-finance.js +83 -29
- package/dist/plotly-finance.min.js +2 -2
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +83 -29
- package/dist/plotly-geo.min.js +2 -2
- package/dist/plotly-gl2d.js +83 -29
- package/dist/plotly-gl2d.min.js +2 -2
- package/dist/plotly-gl3d.js +83 -29
- package/dist/plotly-gl3d.min.js +2 -2
- package/dist/plotly-locale-nl.js +1 -1
- package/dist/plotly-mapbox.js +83 -29
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-strict.js +133 -61
- package/dist/plotly-strict.min.js +2 -2
- package/dist/plotly-with-meta.js +137 -61
- package/dist/plotly.js +133 -61
- package/dist/plotly.min.js +2 -2
- package/lib/locales/nl.js +42 -2
- package/package.json +1 -1
- package/src/components/selections/draw.js +11 -1
- package/src/components/selections/select.js +55 -25
- package/src/plot_api/plot_config.js +6 -0
- package/src/plots/plots.js +10 -1
- package/src/traces/sankey/attributes.js +8 -0
- package/src/traces/sankey/base_plot.js +1 -0
- package/src/traces/sankey/defaults.js +1 -0
- package/src/traces/sankey/render.js +43 -32
- package/src/version.js +1 -1
package/dist/plotly-locale-nl.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var locale={moduleType:"locale",name:"nl",dictionary:{},format:{days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],shortDays:["zon","maa","din","woe","don","vri","zat"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortMonths:["jan","feb","maa","apr","mei","jun","jul","aug","sep","okt","nov","dec"],date:"%d-%m-%Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);
|
|
1
|
+
var locale={moduleType:"locale",name:"nl",dictionary:{Autoscale:"Automatische schaal","Click to enter Colorscale title":"Klik om kleurenschaal titel in te vullen","Click to enter Component A title":"Klik om Component A titel in te vullen","Click to enter Component B title":"Klik om Component B titel in te vullen","Click to enter Component C title":"Klik om Component C titel in te vullen","Click to enter Plot title":"Klik om Plot titel in te vullen","Click to enter X axis title":"Klik om x-as titel in te vullen","Click to enter Y axis title":"Klik om y-as titel in te vullen","Click to enter radial axis title":"Klik om radiaal-as titel in te vullen","Double-click to zoom back out":"Zoom uit door te dubbel klikken","Download plot as a png":"Dowload de plot als een png-bestand","Download plot":"Download de plot","Draw circle":"Teken cirkel","Draw closed freeform":"Teken gesloten vorm","Draw line":"Teken lijn","Draw open freeform":"Teken open vorm","Draw rectangle":"Teken rechthoek","Edit in Chart Studio":"In Chart Studio wijzigen","Erase active shape":"Wis huidige vorm","IE only supports svg. Changing format to svg.":"IE ondersteunt alleen svg bestanden. Formaat gewijzigd naar svg.","Lasso Select":"Lasso selectie","Produced with Plotly.js":"Gemaakt met Plotly.js",Zoom:"Inzoomen","max:":"maximum:","mean \xb1 \u03c3:":"gemiddelde \xb1 \u03c3:","mean:":"gemiddelde:","min:":"minimum:","new text":"nieuwe tekst","open:":"openen:","high:":"hoog:","low:":"laag:","source:":"bron:","target:":"doel:"},format:{days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],shortDays:["zon","maa","din","woe","don","vri","zat"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortMonths:["jan","feb","maa","apr","mei","jun","jul","aug","sep","okt","nov","dec"],date:"%d-%m-%Y",decimal:",",thousands:".",year:"%Y",month:"%b %Y",dayMonth:"%-d %b",dayMonthYear:"%-d %b %Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);
|
package/dist/plotly-mapbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (mapbox) v2.
|
|
2
|
+
* plotly.js (mapbox) v2.14.0
|
|
3
3
|
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -83398,6 +83398,10 @@ function draw(gd) {
|
|
|
83398
83398
|
}
|
|
83399
83399
|
}
|
|
83400
83400
|
|
|
83401
|
+
function couldHaveActiveSelection(gd) {
|
|
83402
|
+
return gd._context.editSelection;
|
|
83403
|
+
}
|
|
83404
|
+
|
|
83401
83405
|
function drawOne(gd, index) {
|
|
83402
83406
|
// remove the existing selection if there is one.
|
|
83403
83407
|
// because indices can change, we need to look in all selection layers
|
|
@@ -83434,7 +83438,7 @@ function drawOne(gd, index) {
|
|
|
83434
83438
|
lineDash = 'solid';
|
|
83435
83439
|
}
|
|
83436
83440
|
|
|
83437
|
-
var isActiveSelection =
|
|
83441
|
+
var isActiveSelection = couldHaveActiveSelection(gd) &&
|
|
83438
83442
|
gd._fullLayout._activeSelectionIndex === index;
|
|
83439
83443
|
|
|
83440
83444
|
if(isActiveSelection) {
|
|
@@ -83501,6 +83505,8 @@ function setClipPath(selectionPath, gd, selectionOptions) {
|
|
|
83501
83505
|
|
|
83502
83506
|
|
|
83503
83507
|
function activateSelection(gd, path) {
|
|
83508
|
+
if(!couldHaveActiveSelection(gd)) return;
|
|
83509
|
+
|
|
83504
83510
|
var element = path.node();
|
|
83505
83511
|
var id = +element.getAttribute('data-index');
|
|
83506
83512
|
if(id >= 0) {
|
|
@@ -83517,6 +83523,8 @@ function activateSelection(gd, path) {
|
|
|
83517
83523
|
}
|
|
83518
83524
|
|
|
83519
83525
|
function activateLastSelection(gd) {
|
|
83526
|
+
if(!couldHaveActiveSelection(gd)) return;
|
|
83527
|
+
|
|
83520
83528
|
var id = gd._fullLayout.selections.length - 1;
|
|
83521
83529
|
gd._fullLayout._activeSelectionIndex = id;
|
|
83522
83530
|
gd._fullLayout._deactivateSelection = deactivateSelection;
|
|
@@ -83524,6 +83532,8 @@ function activateLastSelection(gd) {
|
|
|
83524
83532
|
}
|
|
83525
83533
|
|
|
83526
83534
|
function deactivateSelection(gd) {
|
|
83535
|
+
if(!couldHaveActiveSelection(gd)) return;
|
|
83536
|
+
|
|
83527
83537
|
var id = gd._fullLayout._activeSelectionIndex;
|
|
83528
83538
|
if(id >= 0) {
|
|
83529
83539
|
clearOutlineControllers(gd);
|
|
@@ -83855,7 +83865,14 @@ var p2r = helpers.p2r;
|
|
|
83855
83865
|
var axValue = helpers.axValue;
|
|
83856
83866
|
var getTransform = helpers.getTransform;
|
|
83857
83867
|
|
|
83868
|
+
function hasSubplot(dragOptions) {
|
|
83869
|
+
// N.B. subplot may be falsy e.g zero sankey index!
|
|
83870
|
+
return dragOptions.subplot !== undefined;
|
|
83871
|
+
}
|
|
83872
|
+
|
|
83858
83873
|
function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
83874
|
+
var isCartesian = !hasSubplot(dragOptions);
|
|
83875
|
+
|
|
83859
83876
|
var isFreeMode = freeMode(mode);
|
|
83860
83877
|
var isRectMode = rectMode(mode);
|
|
83861
83878
|
var isOpenMode = openMode(mode);
|
|
@@ -83869,7 +83886,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
83869
83886
|
var gd = dragOptions.gd;
|
|
83870
83887
|
var fullLayout = gd._fullLayout;
|
|
83871
83888
|
var immediateSelect = isSelectMode && fullLayout.newselection.mode === 'immediate' &&
|
|
83872
|
-
|
|
83889
|
+
isCartesian; // N.B. only cartesian subplots have persistent selection
|
|
83873
83890
|
|
|
83874
83891
|
var zoomLayer = fullLayout._zoomlayer;
|
|
83875
83892
|
var dragBBox = dragOptions.element.getBoundingClientRect();
|
|
@@ -83917,9 +83934,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
83917
83934
|
opacity: isDrawMode ? newStyle.opacity / 2 : 1,
|
|
83918
83935
|
fill: (isDrawMode && !isOpenMode) ? newStyle.fillcolor : 'none',
|
|
83919
83936
|
stroke: newStyle.line.color || (
|
|
83920
|
-
|
|
83921
|
-
|
|
83922
|
-
|
|
83937
|
+
isCartesian ?
|
|
83938
|
+
Color.contrast(gd._fullLayout.plot_bgcolor) :
|
|
83939
|
+
'#7f7f7f' // non-cartesian subplot
|
|
83923
83940
|
),
|
|
83924
83941
|
'stroke-dasharray': dashStyle(newStyle.line.dash, newStyle.line.width),
|
|
83925
83942
|
'stroke-width': newStyle.line.width + 'px',
|
|
@@ -83950,6 +83967,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
83950
83967
|
|
|
83951
83968
|
if(immediateSelect && !evt.shiftKey) {
|
|
83952
83969
|
dragOptions._clearSubplotSelections = function() {
|
|
83970
|
+
if(!isCartesian) return;
|
|
83971
|
+
|
|
83953
83972
|
var xRef = xAxis._id;
|
|
83954
83973
|
var yRef = yAxis._id;
|
|
83955
83974
|
deselectSubplot(gd, xRef, yRef, searchTraces);
|
|
@@ -83970,6 +83989,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
83970
83989
|
}
|
|
83971
83990
|
|
|
83972
83991
|
if(selectionErased) {
|
|
83992
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
83993
|
+
|
|
83973
83994
|
Registry.call('_guiRelayout', gd, {
|
|
83974
83995
|
selections: list
|
|
83975
83996
|
});
|
|
@@ -84111,10 +84132,10 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
84111
84132
|
displayOutlines(convertPoly(mergedPolygons, isOpenMode), outlines, dragOptions);
|
|
84112
84133
|
|
|
84113
84134
|
if(isSelectMode) {
|
|
84114
|
-
var _res = reselect(gd);
|
|
84135
|
+
var _res = reselect(gd, false);
|
|
84115
84136
|
var extraPoints = _res.eventData ? _res.eventData.points.slice() : [];
|
|
84116
84137
|
|
|
84117
|
-
_res = reselect(gd, selectionTesters, searchTraces, dragOptions);
|
|
84138
|
+
_res = reselect(gd, false, selectionTesters, searchTraces, dragOptions);
|
|
84118
84139
|
selectionTesters = _res.selectionTesters;
|
|
84119
84140
|
eventData = _res.eventData;
|
|
84120
84141
|
|
|
@@ -84208,9 +84229,13 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
84208
84229
|
}
|
|
84209
84230
|
}
|
|
84210
84231
|
|
|
84211
|
-
|
|
84212
|
-
|
|
84213
|
-
|
|
84232
|
+
if(subSelections.length < allSelections.length) {
|
|
84233
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
84234
|
+
|
|
84235
|
+
Registry.call('_guiRelayout', gd, {
|
|
84236
|
+
selections: subSelections
|
|
84237
|
+
});
|
|
84238
|
+
}
|
|
84214
84239
|
}
|
|
84215
84240
|
}
|
|
84216
84241
|
} else {
|
|
@@ -84256,7 +84281,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
84256
84281
|
dragOptions.doneFnCompleted(selection);
|
|
84257
84282
|
}
|
|
84258
84283
|
|
|
84259
|
-
|
|
84284
|
+
if(isSelectMode) {
|
|
84285
|
+
emitSelected(gd, eventData);
|
|
84286
|
+
}
|
|
84260
84287
|
}).catch(Lib.error);
|
|
84261
84288
|
};
|
|
84262
84289
|
}
|
|
@@ -84478,15 +84505,23 @@ function coerceSelectionsCache(evt, gd, dragOptions) {
|
|
|
84478
84505
|
}
|
|
84479
84506
|
}
|
|
84480
84507
|
|
|
84508
|
+
function hasActiveShape(gd) {
|
|
84509
|
+
return gd._fullLayout._activeShapeIndex >= 0;
|
|
84510
|
+
}
|
|
84511
|
+
|
|
84512
|
+
function hasActiveSelection(gd) {
|
|
84513
|
+
return gd._fullLayout._activeSelectionIndex >= 0;
|
|
84514
|
+
}
|
|
84515
|
+
|
|
84481
84516
|
function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
84482
84517
|
var dragmode = dragOptions.dragmode;
|
|
84483
84518
|
var plotinfo = dragOptions.plotinfo;
|
|
84484
84519
|
|
|
84485
84520
|
var gd = dragOptions.gd;
|
|
84486
|
-
if(gd
|
|
84521
|
+
if(hasActiveShape(gd)) {
|
|
84487
84522
|
gd._fullLayout._deactivateShape(gd);
|
|
84488
84523
|
}
|
|
84489
|
-
if(gd
|
|
84524
|
+
if(hasActiveSelection(gd)) {
|
|
84490
84525
|
gd._fullLayout._deactivateSelection(gd);
|
|
84491
84526
|
}
|
|
84492
84527
|
|
|
@@ -84514,11 +84549,13 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
|
84514
84549
|
var selections;
|
|
84515
84550
|
if(
|
|
84516
84551
|
isSelectMode &&
|
|
84517
|
-
!dragOptions
|
|
84552
|
+
!hasSubplot(dragOptions) // only allow cartesian - no mapbox for now
|
|
84518
84553
|
) {
|
|
84519
84554
|
selections = newSelections(outlines, dragOptions);
|
|
84520
84555
|
}
|
|
84521
84556
|
if(selections) {
|
|
84557
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
84558
|
+
|
|
84522
84559
|
Registry.call('_guiRelayout', gd, {
|
|
84523
84560
|
selections: selections
|
|
84524
84561
|
}).then(function() {
|
|
@@ -84553,7 +84590,10 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
|
|
|
84553
84590
|
|
|
84554
84591
|
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
|
|
84555
84592
|
|
|
84556
|
-
if(
|
|
84593
|
+
if(
|
|
84594
|
+
hasSubplot({subplot: subplot}) &&
|
|
84595
|
+
(trace.subplot === subplot || trace.geo === subplot)
|
|
84596
|
+
) {
|
|
84557
84597
|
searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
|
|
84558
84598
|
} else if(trace.type === 'splom') {
|
|
84559
84599
|
// FIXME: make sure we don't have more than single axis for splom
|
|
@@ -84853,7 +84893,7 @@ function _doSelect(selectionTesters, searchTraces) {
|
|
|
84853
84893
|
return allSelections;
|
|
84854
84894
|
}
|
|
84855
84895
|
|
|
84856
|
-
function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
84896
|
+
function reselect(gd, mayEmitSelected, selectionTesters, searchTraces, dragOptions) {
|
|
84857
84897
|
var hadSearchTraces = !!searchTraces;
|
|
84858
84898
|
var plotinfo, xRef, yRef;
|
|
84859
84899
|
if(dragOptions) {
|
|
@@ -84976,15 +85016,15 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
84976
85016
|
updateSelectedState(gd, allSearchTraces, eventData);
|
|
84977
85017
|
|
|
84978
85018
|
var clickmode = fullLayout.clickmode;
|
|
84979
|
-
var sendEvents = clickmode.indexOf('event') > -1;
|
|
85019
|
+
var sendEvents = clickmode.indexOf('event') > -1 && mayEmitSelected;
|
|
84980
85020
|
|
|
84981
85021
|
if(
|
|
84982
85022
|
!plotinfo && // get called from plot_api & plots
|
|
84983
|
-
|
|
85023
|
+
mayEmitSelected
|
|
84984
85024
|
) {
|
|
84985
|
-
|
|
84986
|
-
var activePolygons = getLayoutPolygons(gd, true);
|
|
85025
|
+
var activePolygons = getLayoutPolygons(gd, true);
|
|
84987
85026
|
|
|
85027
|
+
if(activePolygons.length) {
|
|
84988
85028
|
var xref = activePolygons[0].xref;
|
|
84989
85029
|
var yref = activePolygons[0].yref;
|
|
84990
85030
|
if(xref && yref) {
|
|
@@ -84997,8 +85037,12 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
84997
85037
|
|
|
84998
85038
|
fillRangeItems(eventData, poly);
|
|
84999
85039
|
}
|
|
85040
|
+
}
|
|
85000
85041
|
|
|
85001
|
-
|
|
85042
|
+
if(gd._fullLayout._noEmitSelectedAtStart) {
|
|
85043
|
+
gd._fullLayout._noEmitSelectedAtStart = false;
|
|
85044
|
+
} else {
|
|
85045
|
+
if(sendEvents) emitSelected(gd, eventData);
|
|
85002
85046
|
}
|
|
85003
85047
|
|
|
85004
85048
|
fullLayout._reselect = false;
|
|
@@ -85020,7 +85064,7 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
85020
85064
|
if(eventData.points.length) {
|
|
85021
85065
|
emitSelected(gd, eventData);
|
|
85022
85066
|
} else {
|
|
85023
|
-
gd
|
|
85067
|
+
emitDeselect(gd);
|
|
85024
85068
|
}
|
|
85025
85069
|
}
|
|
85026
85070
|
|
|
@@ -85308,13 +85352,10 @@ function getFillRangeItems(dragOptions) {
|
|
|
85308
85352
|
}
|
|
85309
85353
|
|
|
85310
85354
|
function emitSelecting(gd, eventData) {
|
|
85311
|
-
if(drawMode(gd._fullLayout.dragmode)) return;
|
|
85312
85355
|
gd.emit('plotly_selecting', eventData);
|
|
85313
85356
|
}
|
|
85314
85357
|
|
|
85315
85358
|
function emitSelected(gd, eventData) {
|
|
85316
|
-
if(drawMode(gd._fullLayout.dragmode)) return;
|
|
85317
|
-
|
|
85318
85359
|
if(eventData) {
|
|
85319
85360
|
eventData.selections = (gd.layout || {}).selections || [];
|
|
85320
85361
|
}
|
|
@@ -85323,7 +85364,6 @@ function emitSelected(gd, eventData) {
|
|
|
85323
85364
|
}
|
|
85324
85365
|
|
|
85325
85366
|
function emitDeselect(gd) {
|
|
85326
|
-
if(drawMode(gd._fullLayout.dragmode)) return;
|
|
85327
85367
|
gd.emit('plotly_deselect', null);
|
|
85328
85368
|
}
|
|
85329
85369
|
|
|
@@ -103253,6 +103293,11 @@ var configAttributes = {
|
|
|
103253
103293
|
}
|
|
103254
103294
|
},
|
|
103255
103295
|
|
|
103296
|
+
editSelection: {
|
|
103297
|
+
valType: 'boolean',
|
|
103298
|
+
dflt: true,
|
|
103299
|
+
},
|
|
103300
|
+
|
|
103256
103301
|
autosizable: {
|
|
103257
103302
|
valType: 'boolean',
|
|
103258
103303
|
dflt: false,
|
|
@@ -124223,7 +124268,16 @@ plots.redrag = function(gd) {
|
|
|
124223
124268
|
};
|
|
124224
124269
|
|
|
124225
124270
|
plots.reselect = function(gd) {
|
|
124226
|
-
|
|
124271
|
+
var fullLayout = gd._fullLayout;
|
|
124272
|
+
|
|
124273
|
+
var A = (gd.layout || {}).selections;
|
|
124274
|
+
var B = fullLayout._previousSelections;
|
|
124275
|
+
fullLayout._previousSelections = A;
|
|
124276
|
+
|
|
124277
|
+
var mayEmitSelected = fullLayout._reselect ||
|
|
124278
|
+
JSON.stringify(A) !== JSON.stringify(B);
|
|
124279
|
+
|
|
124280
|
+
Registry.getComponentMethod('selections', 'reselect')(gd, mayEmitSelected);
|
|
124227
124281
|
};
|
|
124228
124282
|
|
|
124229
124283
|
plots.generalUpdatePerTraceModule = function(gd, subplot, subplotCalcData, subplotLayout) {
|
|
@@ -131875,7 +131929,7 @@ function getSortFunc(opts, d2c) {
|
|
|
131875
131929
|
'use strict';
|
|
131876
131930
|
|
|
131877
131931
|
// package version injected by `npm run preprocess`
|
|
131878
|
-
exports.version = '2.
|
|
131932
|
+
exports.version = '2.14.0';
|
|
131879
131933
|
|
|
131880
131934
|
},{}]},{},[9])(9)
|
|
131881
131935
|
});
|