Skip to content

Commit 15b6bf2

Browse files
committed
Merge remote-tracking branch 'origin/master' into range-inside-ticklables and resolve conflicts
2 parents ba16783 + 7a7b412 commit 15b6bf2

33 files changed

+790
-524
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ To see all merged commits on the master branch that will be part of the next plo
99

1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

12+
## [2.26.2] -- 2023-10-04
13+
14+
### Fixed
15+
- Fix range interactions affecting partial ranges in other subplots [[#6743](https://github.com/plotly/plotly.js/pull/6743)]
16+
- Fix to emit `plotly_click` event on touchscreens with "select" `dragmode` [[#6724](https://github.com/plotly/plotly.js/pull/6724)]),
17+
with thanks to @lvlte for the contribution!
18+
- Fix error display for failing builds [[#6739](https://github.com/plotly/plotly.js/pull/6739)],
19+
with thanks to @dmt0 for the contribution!
20+
- Use the "willReadFrequently" 2d context creation attribute to optimize readback performance for heat map traces [[#6741](https://github.com/plotly/plotly.js/pull/6741)],
21+
with thanks to @bebeal for the contribution!
22+
23+
1224
## [2.26.1] -- 2023-09-22
1325

1426
### Fixed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
5555
5656
```html
5757
<head>
58-
<script src="https://cdn.plot.ly/plotly-2.26.1.min.js" charset="utf-8"></script>
58+
<script src="https://cdn.plot.ly/plotly-2.26.2.min.js" charset="utf-8"></script>
5959
</head>
6060
<body>
6161
<div id="gd"></div>
@@ -72,7 +72,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
7272
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
7373
```html
7474
<script type="module">
75-
import "https://cdn.plot.ly/plotly-2.26.1.min.js"
75+
import "https://cdn.plot.ly/plotly-2.26.2.min.js"
7676
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
7777
</script>
7878
```
@@ -82,7 +82,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
8282
### Un-minified versions are also available on CDN
8383
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
8484
```html
85-
<script src="https://cdn.plot.ly/plotly-2.26.1.js" charset="utf-8"></script>
85+
<script src="https://cdn.plot.ly/plotly-2.26.2.js" charset="utf-8"></script>
8686
```
8787

8888
> Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.

dist/README.md

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

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.26.1.js
49+
> https://cdn.plot.ly/plotly-2.26.2.js
5050
51-
> https://cdn.plot.ly/plotly-2.26.1.min.js
51+
> https://cdn.plot.ly/plotly-2.26.2.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.6 MB | 973.9 kB | 325.6 kB |
94+
| 2.6 MB | 974 kB | 325.6 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-2.26.1.js
97+
> https://cdn.plot.ly/plotly-basic-2.26.2.js
9898
99-
> https://cdn.plot.ly/plotly-basic-2.26.1.min.js
99+
> https://cdn.plot.ly/plotly-basic-2.26.2.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 | 412 kB |
118118

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

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

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

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

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

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

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.26.1.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.26.2.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.26.1.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.26.2.min.js
192192
193193

194194
#### npm packages
@@ -209,9 +209,9 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
209209
| 4.4 MB | 1.7 MB | 526.9 kB |
210210

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

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

234234
#### CDN links
235-
> https://cdn.plot.ly/plotly-finance-2.26.1.js
235+
> https://cdn.plot.ly/plotly-finance-2.26.2.js
236236
237-
> https://cdn.plot.ly/plotly-finance-2.26.1.min.js
237+
> https://cdn.plot.ly/plotly-finance-2.26.2.min.js
238238
239239

240240
#### npm packages
@@ -255,9 +255,9 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
255255
| 8.6 MB | 3.7 MB | 1.1 MB |
256256

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

263263
#### npm packages

dist/plotly-basic.js

+53-40
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v2.26.1
2+
* plotly.js (basic) v2.26.2
33
* Copyright 2012-2023, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -16608,7 +16608,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
1660816608
emitSelected(gd, undefined);
1660916609
}
1661016610
}
16611-
Fx.click(gd, evt);
16611+
Fx.click(gd, evt, plotinfo.id);
1661216612
}).catch(Lib.error);
1661316613
};
1661416614
dragOptions.doneFn = function () {
@@ -30227,6 +30227,8 @@ var Registry = __webpack_require__(3972);
3022730227
var PlotSchema = __webpack_require__(6281);
3022830228
var Plots = __webpack_require__(4875);
3022930229
var Axes = __webpack_require__(9298);
30230+
var handleRangeDefaults = __webpack_require__(3608);
30231+
var cartesianLayoutAttributes = __webpack_require__(3838);
3023030232
var Drawing = __webpack_require__(1424);
3023130233
var Color = __webpack_require__(7901);
3023230234
var initInteractions = (__webpack_require__(4305).initInteractions);
@@ -31844,21 +31846,17 @@ function axRangeSupplyDefaultsByPass(gd, flags, specs) {
3184431846
for (var k in flags) {
3184531847
if (k !== 'axrange' && flags[k]) return false;
3184631848
}
31849+
var axIn, axOut;
31850+
var coerce = function (attr, dflt) {
31851+
return Lib.coerce(axIn, axOut, cartesianLayoutAttributes, attr, dflt);
31852+
};
31853+
var options = {}; // passing empty options for now!
31854+
3184731855
for (var axId in specs.rangesAltered) {
3184831856
var axName = Axes.id2name(axId);
31849-
var axIn = gd.layout[axName];
31850-
var axOut = fullLayout[axName];
31851-
axOut.autorange = axIn.autorange;
31852-
var r0 = axOut._rangeInitial0;
31853-
var r1 = axOut._rangeInitial1;
31854-
// partial range needs supplyDefaults
31855-
if (r0 === undefined && r1 !== undefined || r0 !== undefined && r1 === undefined) {
31856-
return false;
31857-
}
31858-
if (axIn.range) {
31859-
axOut.range = axIn.range.slice();
31860-
}
31861-
axOut.cleanRange();
31857+
axIn = gd.layout[axName];
31858+
axOut = fullLayout[axName];
31859+
handleRangeDefaults(axIn, axOut, coerce, options);
3186231860
if (axOut._matchGroup) {
3186331861
for (var axId2 in axOut._matchGroup) {
3186431862
if (axId2 !== axId) {
@@ -41472,7 +41470,7 @@ var handleTickLabelDefaults = __webpack_require__(6115);
4147241470
var handlePrefixSuffixDefaults = __webpack_require__(9426);
4147341471
var handleCategoryOrderDefaults = __webpack_require__(5258);
4147441472
var handleLineGridDefaults = __webpack_require__(2128);
41475-
var handleAutorangeOptionsDefaults = __webpack_require__(3074);
41473+
var handleRangeDefaults = __webpack_require__(3608);
4147641474
var setConvert = __webpack_require__(1994);
4147741475
var DAY_OF_WEEK = (__webpack_require__(5555).WEEKDAY_PATTERN);
4147841476
var HOUR = (__webpack_require__(5555).HOUR_PATTERN);
@@ -41524,29 +41522,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
4152441522
coerce('ticklabeloverflow', ticklabelposition.indexOf('inside') !== -1 ? 'hide past domain' : axType === 'category' || axType === 'multicategory' ? 'allow' : 'hide past div');
4152541523
}
4152641524
setConvert(containerOut, layoutOut);
41527-
coerce('minallowed');
41528-
coerce('maxallowed');
41529-
var range = coerce('range');
41530-
var autorangeDflt = containerOut.getAutorangeDflt(range, options);
41531-
var autorange = coerce('autorange', autorangeDflt);
41532-
var shouldAutorange;
41533-
41534-
// validate range and set autorange true for invalid partial ranges
41535-
if (range && (range[0] === null && range[1] === null || (range[0] === null || range[1] === null) && (autorange === 'reversed' || autorange === true) || range[0] !== null && (autorange === 'min' || autorange === 'max reversed') || range[1] !== null && (autorange === 'max' || autorange === 'min reversed'))) {
41536-
range = undefined;
41537-
delete containerOut.range;
41538-
containerOut.autorange = true;
41539-
shouldAutorange = true;
41540-
}
41541-
if (!shouldAutorange) {
41542-
autorangeDflt = containerOut.getAutorangeDflt(range, options);
41543-
autorange = coerce('autorange', autorangeDflt);
41544-
}
41545-
if (autorange) {
41546-
handleAutorangeOptionsDefaults(coerce, autorange, range);
41547-
if (axType === 'linear' || axType === '-') coerce('rangemode');
41548-
}
41549-
containerOut.cleanRange();
41525+
handleRangeDefaults(containerIn, containerOut, coerce, options);
4155041526
handleCategoryOrderDefaults(containerIn, containerOut, coerce, options);
4155141527
if (axType !== 'category' && !options.noHover) coerce('hoverformat');
4155241528
var dfltColor = coerce('color');
@@ -45811,6 +45787,43 @@ module.exports = function handlePrefixSuffixDefaults(containerIn, containerOut,
4581145787

4581245788
/***/ }),
4581345789

45790+
/***/ 3608:
45791+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
45792+
45793+
"use strict";
45794+
45795+
45796+
var handleAutorangeOptionsDefaults = __webpack_require__(3074);
45797+
module.exports = function handleRangeDefaults(containerIn, containerOut, coerce, options) {
45798+
var axTemplate = containerOut._template || {};
45799+
var axType = containerOut.type || axTemplate.type || '-';
45800+
coerce('minallowed');
45801+
coerce('maxallowed');
45802+
var range = coerce('range');
45803+
var autorangeDflt = containerOut.getAutorangeDflt(range, options);
45804+
var autorange = coerce('autorange', autorangeDflt);
45805+
var shouldAutorange;
45806+
45807+
// validate range and set autorange true for invalid partial ranges
45808+
if (range && (range[0] === null && range[1] === null || (range[0] === null || range[1] === null) && (autorange === 'reversed' || autorange === true) || range[0] !== null && (autorange === 'min' || autorange === 'max reversed') || range[1] !== null && (autorange === 'max' || autorange === 'min reversed'))) {
45809+
range = undefined;
45810+
delete containerOut.range;
45811+
containerOut.autorange = true;
45812+
shouldAutorange = true;
45813+
}
45814+
if (!shouldAutorange) {
45815+
autorangeDflt = containerOut.getAutorangeDflt(range, options);
45816+
autorange = coerce('autorange', autorangeDflt);
45817+
}
45818+
if (autorange) {
45819+
handleAutorangeOptionsDefaults(coerce, autorange, range);
45820+
if (axType === 'linear' || axType === '-') coerce('rangemode');
45821+
}
45822+
containerOut.cleanRange();
45823+
};
45824+
45825+
/***/ }),
45826+
4581445827
/***/ 2449:
4581545828
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4581645829

@@ -60555,7 +60568,7 @@ function getSortFunc(opts, d2c) {
6055560568

6055660569

6055760570
// package version injected by `npm run preprocess`
60558-
exports.version = '2.26.1';
60571+
exports.version = '2.26.2';
6055960572

6056060573
/***/ }),
6056160574

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)