plotly.js 2.8.0 → 2.9.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/.circleci/env_image.sh +1 -1
- package/CHANGELOG.md +32 -0
- package/README.md +3 -3
- package/dist/README.md +26 -26
- package/dist/plot-schema.json +315 -0
- package/dist/plotly-basic.js +84 -12
- package/dist/plotly-basic.min.js +5 -5
- package/dist/plotly-cartesian.js +101 -17
- package/dist/plotly-cartesian.min.js +3 -3
- package/dist/plotly-finance.js +88 -14
- package/dist/plotly-finance.min.js +3 -3
- package/dist/plotly-geo-assets.js +3 -3
- package/dist/plotly-geo.js +76 -11
- package/dist/plotly-geo.min.js +3 -3
- package/dist/plotly-gl2d.js +79 -13
- package/dist/plotly-gl2d.min.js +3 -3
- package/dist/plotly-gl3d.js +77 -11
- package/dist/plotly-gl3d.min.js +9 -9
- package/dist/plotly-locale-cs.js +1 -1
- package/dist/plotly-locale-cy.js +1 -1
- package/dist/plotly-locale-de.js +1 -1
- package/dist/plotly-locale-es.js +1 -1
- package/dist/plotly-locale-fi.js +1 -1
- package/dist/plotly-locale-fr.js +1 -1
- package/dist/plotly-locale-it.js +1 -1
- package/dist/plotly-locale-ja.js +1 -1
- package/dist/plotly-locale-ko.js +1 -1
- package/dist/plotly-locale-pt-br.js +1 -1
- package/dist/plotly-locale-pt-pt.js +1 -1
- package/dist/plotly-locale-ru.js +1 -1
- package/dist/plotly-locale-sv.js +1 -1
- package/dist/plotly-locale-sw.js +1 -1
- package/dist/plotly-locale-uk.js +1 -1
- package/dist/plotly-locale-zh-cn.js +1 -1
- package/dist/plotly-mapbox.js +76 -11
- package/dist/plotly-mapbox.min.js +3 -3
- package/dist/plotly-strict.js +105 -17
- package/dist/plotly-strict.min.js +3 -3
- package/dist/plotly-with-meta.js +114 -17
- package/dist/plotly.js +106 -17
- package/dist/plotly.min.js +11 -11
- package/dist/translation-keys.txt +1 -1
- package/lib/locales/cs.js +1 -1
- package/lib/locales/cy.js +1 -1
- package/lib/locales/de.js +1 -1
- package/lib/locales/es.js +1 -1
- package/lib/locales/fi.js +1 -1
- package/lib/locales/fr.js +1 -1
- package/lib/locales/it.js +1 -1
- package/lib/locales/ja.js +1 -1
- package/lib/locales/ko.js +1 -1
- package/lib/locales/pt-br.js +1 -1
- package/lib/locales/pt-pt.js +1 -1
- package/lib/locales/ru.js +1 -1
- package/lib/locales/sv.js +1 -1
- package/lib/locales/sw.js +1 -1
- package/lib/locales/uk.js +1 -1
- package/lib/locales/zh-cn.js +1 -1
- package/package.json +11 -11
- package/src/components/colorbar/attributes.js +1 -0
- package/src/components/colorbar/draw.js +1 -0
- package/src/components/legend/draw.js +2 -1
- package/src/components/modebar/modebar.js +7 -1
- package/src/plots/cartesian/axes.js +47 -5
- package/src/plots/cartesian/layout_attributes.js +14 -0
- package/src/plots/cartesian/tick_label_defaults.js +8 -0
- package/src/plots/gl3d/layout/axis_defaults.js +1 -0
- package/src/plots/polar/layout_attributes.js +1 -0
- package/src/plots/smith/layout_defaults.js +1 -0
- package/src/plots/ternary/layout_attributes.js +1 -0
- package/src/traces/bar/plot.js +8 -1
- package/src/traces/carpet/ab_defaults.js +1 -0
- package/src/traces/heatmap/plot.js +4 -2
- package/src/traces/histogram/calc.js +3 -2
- package/src/traces/indicator/attributes.js +1 -0
- package/src/version.js +1 -1
- package/.vscode/launch.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js v2.
|
|
3
|
-
* Copyright 2012-
|
|
2
|
+
* plotly.js v2.9.0
|
|
3
|
+
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
6
6
|
*/
|
|
@@ -68,7 +68,7 @@ exports.topojson = saneTopojson;
|
|
|
68
68
|
'use strict';
|
|
69
69
|
|
|
70
70
|
// package version injected by `npm run preprocess`
|
|
71
|
-
exports.version = '2.
|
|
71
|
+
exports.version = '2.9.0';
|
|
72
72
|
|
|
73
73
|
},{}]},{},[16])(16)
|
|
74
74
|
});
|
package/dist/plotly-geo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (geo) v2.
|
|
3
|
-
* Copyright 2012-
|
|
2
|
+
* plotly.js (geo) v2.9.0
|
|
3
|
+
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
6
6
|
*/
|
|
@@ -35413,6 +35413,7 @@ module.exports = overrideAll({
|
|
|
35413
35413
|
ticklen: axesAttrs.ticklen,
|
|
35414
35414
|
tickwidth: axesAttrs.tickwidth,
|
|
35415
35415
|
tickcolor: axesAttrs.tickcolor,
|
|
35416
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
35416
35417
|
showticklabels: axesAttrs.showticklabels,
|
|
35417
35418
|
tickfont: fontAttrs({
|
|
35418
35419
|
}),
|
|
@@ -36503,6 +36504,7 @@ function mockColorBarAxis(gd, opts, zrange) {
|
|
|
36503
36504
|
showticklabels: opts.showticklabels,
|
|
36504
36505
|
ticklabelposition: opts.ticklabelposition,
|
|
36505
36506
|
ticklabeloverflow: opts.ticklabeloverflow,
|
|
36507
|
+
ticklabelstep: opts.ticklabelstep,
|
|
36506
36508
|
tickfont: opts.tickfont,
|
|
36507
36509
|
tickangle: opts.tickangle,
|
|
36508
36510
|
tickformat: opts.tickformat,
|
|
@@ -45309,7 +45311,6 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
45309
45311
|
offsetY += h;
|
|
45310
45312
|
maxWidthInGroup = Math.max(maxWidthInGroup, textGap + w);
|
|
45311
45313
|
});
|
|
45312
|
-
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
45313
45314
|
|
|
45314
45315
|
var next = maxWidthInGroup + itemGap;
|
|
45315
45316
|
|
|
@@ -45325,6 +45326,8 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
45325
45326
|
groupOffsetX = 0;
|
|
45326
45327
|
groupOffsetY += maxGroupHeightInRow + traceGroupGap;
|
|
45327
45328
|
maxGroupHeightInRow = offsetY;
|
|
45329
|
+
} else {
|
|
45330
|
+
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
45328
45331
|
}
|
|
45329
45332
|
|
|
45330
45333
|
Drawing.setTranslate(this, groupOffsetX, groupOffsetY);
|
|
@@ -47807,6 +47810,8 @@ var isNumeric = _dereq_('fast-isnumeric');
|
|
|
47807
47810
|
|
|
47808
47811
|
var Lib = _dereq_('../../lib');
|
|
47809
47812
|
var Icons = _dereq_('../../fonts/ploticon');
|
|
47813
|
+
var version = _dereq_('../../version').version;
|
|
47814
|
+
|
|
47810
47815
|
var Parser = new DOMParser();
|
|
47811
47816
|
|
|
47812
47817
|
/**
|
|
@@ -48085,6 +48090,10 @@ proto.hasButtons = function(buttons) {
|
|
|
48085
48090
|
return true;
|
|
48086
48091
|
};
|
|
48087
48092
|
|
|
48093
|
+
function jsVersion(str) {
|
|
48094
|
+
return str + ' (v' + version + ')';
|
|
48095
|
+
}
|
|
48096
|
+
|
|
48088
48097
|
/**
|
|
48089
48098
|
* @return {HTMLDivElement} The logo image wrapped in a group
|
|
48090
48099
|
*/
|
|
@@ -48094,7 +48103,7 @@ proto.getLogo = function() {
|
|
|
48094
48103
|
|
|
48095
48104
|
a.href = 'https://plotly.com/';
|
|
48096
48105
|
a.target = '_blank';
|
|
48097
|
-
a.setAttribute('data-title', Lib._(this.graphInfo, 'Produced with Plotly'));
|
|
48106
|
+
a.setAttribute('data-title', jsVersion(Lib._(this.graphInfo, 'Produced with Plotly.js')));
|
|
48098
48107
|
a.className = 'modebar-btn plotlyjsicon modebar-btn--logo';
|
|
48099
48108
|
|
|
48100
48109
|
a.appendChild(this.createIcon(Icons.newplotlylogo));
|
|
@@ -48136,7 +48145,7 @@ function createModeBar(gd, buttons) {
|
|
|
48136
48145
|
|
|
48137
48146
|
module.exports = createModeBar;
|
|
48138
48147
|
|
|
48139
|
-
},{"../../fonts/ploticon":229,"../../lib":248,"@plotly/d3":11,"fast-isnumeric":30}],182:[function(_dereq_,module,exports){
|
|
48148
|
+
},{"../../fonts/ploticon":229,"../../lib":248,"../../version":407,"@plotly/d3":11,"fast-isnumeric":30}],182:[function(_dereq_,module,exports){
|
|
48140
48149
|
'use strict';
|
|
48141
48150
|
|
|
48142
48151
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
@@ -72040,7 +72049,8 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72040
72049
|
var minRange = Math.min(rng[0], rng[1]);
|
|
72041
72050
|
var maxRange = Math.max(rng[0], rng[1]);
|
|
72042
72051
|
|
|
72043
|
-
var
|
|
72052
|
+
var numDtick = isNumeric(ax.dtick);
|
|
72053
|
+
var isDLog = (ax.type === 'log') && !(numDtick || ax.dtick.charAt(0) === 'L');
|
|
72044
72054
|
var isPeriod = ax.ticklabelmode === 'period';
|
|
72045
72055
|
|
|
72046
72056
|
// find the first tick
|
|
@@ -72071,13 +72081,36 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72071
72081
|
x = axes.tickIncrement(x, ax.dtick, !axrev, ax.calendar);
|
|
72072
72082
|
}
|
|
72073
72083
|
|
|
72084
|
+
var ticklabelstep = ax.ticklabelstep;
|
|
72085
|
+
|
|
72074
72086
|
var maxTicks = Math.max(1000, ax._length || 0);
|
|
72075
72087
|
var tickVals = [];
|
|
72076
72088
|
var xPrevious = null;
|
|
72089
|
+
|
|
72090
|
+
var dTick;
|
|
72091
|
+
if(numDtick) {
|
|
72092
|
+
dTick = ax.dtick;
|
|
72093
|
+
} else {
|
|
72094
|
+
if(ax.type === 'date') {
|
|
72095
|
+
if(typeof ax.dtick === 'string' && ax.dtick.charAt(0) === 'M') {
|
|
72096
|
+
dTick = ONEAVGMONTH * ax.dtick.substring(1);
|
|
72097
|
+
}
|
|
72098
|
+
} else {
|
|
72099
|
+
dTick = ax._roughDTick;
|
|
72100
|
+
}
|
|
72101
|
+
}
|
|
72102
|
+
|
|
72103
|
+
var id = Math.round((
|
|
72104
|
+
ax.r2l(x) -
|
|
72105
|
+
ax.r2l(ax.tick0)
|
|
72106
|
+
) / dTick) - 1;
|
|
72107
|
+
|
|
72077
72108
|
for(;
|
|
72078
72109
|
(axrev) ? (x >= endTick) : (x <= endTick);
|
|
72079
72110
|
x = axes.tickIncrement(x, ax.dtick, axrev, ax.calendar)
|
|
72080
72111
|
) {
|
|
72112
|
+
id++;
|
|
72113
|
+
|
|
72081
72114
|
if(ax.rangebreaks) {
|
|
72082
72115
|
if(!axrev) {
|
|
72083
72116
|
if(x < startTick) continue;
|
|
@@ -72095,10 +72128,16 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72095
72128
|
minor = true;
|
|
72096
72129
|
}
|
|
72097
72130
|
|
|
72098
|
-
|
|
72131
|
+
var obj = {
|
|
72099
72132
|
minor: minor,
|
|
72100
72133
|
value: x
|
|
72101
|
-
}
|
|
72134
|
+
};
|
|
72135
|
+
|
|
72136
|
+
if(ticklabelstep > 1 && id % ticklabelstep) {
|
|
72137
|
+
obj.skipLabel = true;
|
|
72138
|
+
}
|
|
72139
|
+
|
|
72140
|
+
tickVals.push(obj);
|
|
72102
72141
|
}
|
|
72103
72142
|
|
|
72104
72143
|
if(isPeriod) positionPeriodTicks(tickVals, ax, ax._definedDelta);
|
|
@@ -72151,12 +72190,20 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72151
72190
|
ax._prevDateHead = '';
|
|
72152
72191
|
ax._inCalcTicks = true;
|
|
72153
72192
|
|
|
72193
|
+
var lastVisibleHead;
|
|
72194
|
+
var hideLabel = function(tick) {
|
|
72195
|
+
tick.text = ' '; // don't use an empty string here which can confuse automargin (issue 5132)
|
|
72196
|
+
ax._prevDateHead = lastVisibleHead;
|
|
72197
|
+
};
|
|
72198
|
+
|
|
72154
72199
|
var ticksOut = [];
|
|
72155
72200
|
var t, p;
|
|
72156
72201
|
for(i = 0; i < tickVals.length; i++) {
|
|
72157
72202
|
var _minor = tickVals[i].minor;
|
|
72158
72203
|
var _value = tickVals[i].value;
|
|
72159
72204
|
|
|
72205
|
+
lastVisibleHead = ax._prevDateHead;
|
|
72206
|
+
|
|
72160
72207
|
t = axes.tickText(
|
|
72161
72208
|
ax,
|
|
72162
72209
|
_value,
|
|
@@ -72171,11 +72218,14 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72171
72218
|
if(p > maxRange) t.periodX = maxRange;
|
|
72172
72219
|
if(p < minRange) t.periodX = minRange;
|
|
72173
72220
|
|
|
72174
|
-
t
|
|
72175
|
-
ax._prevDateHead = '';
|
|
72221
|
+
hideLabel(t);
|
|
72176
72222
|
}
|
|
72177
72223
|
}
|
|
72178
72224
|
|
|
72225
|
+
if(tickVals[i].skipLabel) {
|
|
72226
|
+
hideLabel(t);
|
|
72227
|
+
}
|
|
72228
|
+
|
|
72179
72229
|
ticksOut.push(t);
|
|
72180
72230
|
}
|
|
72181
72231
|
|
|
@@ -74203,6 +74253,7 @@ axes.drawLabels = function(gd, ax, opts) {
|
|
|
74203
74253
|
var axId = ax._id;
|
|
74204
74254
|
var axLetter = axId.charAt(0);
|
|
74205
74255
|
var cls = opts.cls || axId + 'tick';
|
|
74256
|
+
|
|
74206
74257
|
var vals = opts.vals;
|
|
74207
74258
|
|
|
74208
74259
|
var labelFns = opts.labelFns;
|
|
@@ -79059,6 +79110,12 @@ module.exports = {
|
|
|
79059
79110
|
editType: 'ticks',
|
|
79060
79111
|
impliedEdits: {tickmode: 'linear'},
|
|
79061
79112
|
},
|
|
79113
|
+
ticklabelstep: {
|
|
79114
|
+
valType: 'integer',
|
|
79115
|
+
min: 1,
|
|
79116
|
+
dflt: 1,
|
|
79117
|
+
editType: 'ticks',
|
|
79118
|
+
},
|
|
79062
79119
|
tickvals: {
|
|
79063
79120
|
valType: 'data_array',
|
|
79064
79121
|
editType: 'ticks',
|
|
@@ -81923,6 +81980,14 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
|
|
|
81923
81980
|
color: dfltFontColor
|
|
81924
81981
|
});
|
|
81925
81982
|
|
|
81983
|
+
if(
|
|
81984
|
+
!options.noTicklabelstep &&
|
|
81985
|
+
axType !== 'multicategory' &&
|
|
81986
|
+
axType !== 'log'
|
|
81987
|
+
) {
|
|
81988
|
+
coerce('ticklabelstep');
|
|
81989
|
+
}
|
|
81990
|
+
|
|
81926
81991
|
if(!options.noAng) coerce('tickangle');
|
|
81927
81992
|
|
|
81928
81993
|
if(axType !== 'category') {
|
|
@@ -95378,7 +95443,7 @@ function getSortFunc(opts, d2c) {
|
|
|
95378
95443
|
'use strict';
|
|
95379
95444
|
|
|
95380
95445
|
// package version injected by `npm run preprocess`
|
|
95381
|
-
exports.version = '2.
|
|
95446
|
+
exports.version = '2.9.0';
|
|
95382
95447
|
|
|
95383
95448
|
},{}]},{},[8])(8)
|
|
95384
95449
|
});
|