Skip to content

Commit c6007a8

Browse files
committed
Merge remote-tracking branch 'origin/master' into cam/5192/add-min-max-scale-limits
2 parents 048f178 + 92a6bfa commit c6007a8

34 files changed

+2262
-1877
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ 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+
## [3.0.1] -- 2025-02-18
13+
14+
### Changed
15+
- Update `color-rgba` from 2.1.1 to 3.0.0 to fix hsl color conversion bug [[#7325](https://github.com/plotly/plotly.js/pull/7325)]
16+
17+
### Fixed
18+
- Fix click event handling for plots in shadow DOM elements [[#7357](https://github.com/plotly/plotly.js/pull/7357)]
19+
- Fix hoverlabels and other text labels with null values templated in [[#7360](https://github.com/plotly/plotly.js/pull/7360)]
20+
- Fix importing plotly.js via require on pages with [AMD](https://en.wikipedia.org/wiki/Asynchronous_module_definition) [[#7367](https://github.com/plotly/plotly.js/pull/7367)]
21+
- Update Romanian locale [[#7351](https://github.com/plotly/plotly.js/pull/7351)]
22+
- Update Italian locale [[#4425](https://github.com/plotly/plotly.js/pull/4425)]
23+
- Update Turkish locale [[#7352](https://github.com/plotly/plotly.js/pull/7352)]
24+
1225
## [3.0.0] -- 2025-01-27
1326

1427
### Removed

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors:
99
- family-names: "Samimi"
1010
given-names: "Mojtaba"
1111
title: "Open source Plotly charting library"
12-
version: 3.0.0
12+
version: 3.0.1
1313
doi: 10.5281/zenodo.13964707
1414
date-released: 2025-01-27
1515
url: "https://github.com/plotly/plotly.js"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
6262
6363
```html
6464
<head>
65-
<script src="https://cdn.plot.ly/plotly-3.0.0.min.js" charset="utf-8"></script>
65+
<script src="https://cdn.plot.ly/plotly-3.0.1.min.js" charset="utf-8"></script>
6666
</head>
6767
<body>
6868
<div id="gd"></div>
@@ -79,7 +79,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
7979
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
8080
```html
8181
<script type="module">
82-
import "https://cdn.plot.ly/plotly-3.0.0.min.js"
82+
import "https://cdn.plot.ly/plotly-3.0.1.min.js"
8383
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
8484
</script>
8585
```
@@ -89,7 +89,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
8989
### Un-minified versions are also available on CDN
9090
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
9191
```html
92-
<script src="https://cdn.plot.ly/plotly-3.0.0.js" charset="utf-8"></script>
92+
<script src="https://cdn.plot.ly/plotly-3.0.1.js" charset="utf-8"></script>
9393
```
9494

9595
> 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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
4646
| 10.3 MB | 4.4 MB | 1.4 MB | 10.6 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-3.0.0.js
49+
> https://cdn.plot.ly/plotly-3.0.1.js
5050
51-
> https://cdn.plot.ly/plotly-3.0.0.min.js
51+
> https://cdn.plot.ly/plotly-3.0.1.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 | 1008.8 kB | 349.3 kB |
94+
| 2.6 MB | 1008.3 kB | 349.2 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-3.0.0.js
97+
> https://cdn.plot.ly/plotly-basic-3.0.1.js
9898
99-
> https://cdn.plot.ly/plotly-basic-3.0.0.min.js
99+
> https://cdn.plot.ly/plotly-basic-3.0.1.min.js
100100
101101

102102
#### npm packages
@@ -114,12 +114,12 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
114114

115115
| Raw size | Minified size | Minified + gzip size |
116116
|------|-----------------|------------------------|
117-
| 3.3 MB | 1.3 MB | 446.5 kB |
117+
| 3.3 MB | 1.3 MB | 446.4 kB |
118118

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

125125
#### npm packages
@@ -137,12 +137,12 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
137137

138138
| Raw size | Minified size | Minified + gzip size |
139139
|------|-----------------|------------------------|
140-
| 2.9 MB | 1.1 MB | 398.8 kB |
140+
| 2.9 MB | 1.1 MB | 398.7 kB |
141141

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

148148
#### npm packages
@@ -160,12 +160,12 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
160160

161161
| Raw size | Minified size | Minified + gzip size |
162162
|------|-----------------|------------------------|
163-
| 4.1 MB | 1.5 MB | 513.8 kB |
163+
| 4.1 MB | 1.5 MB | 513.5 kB |
164164

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

171171
#### npm packages
@@ -183,12 +183,12 @@ The `gl2d` partial bundle contains trace modules `parcoords`, `scatter`, `scatte
183183

184184
| Raw size | Minified size | Minified + gzip size |
185185
|------|-----------------|------------------------|
186-
| 3.4 MB | 1.3 MB | 469.1 kB |
186+
| 3.4 MB | 1.3 MB | 470.3 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-3.0.0.js
189+
> https://cdn.plot.ly/plotly-gl2d-3.0.1.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-3.0.0.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-3.0.1.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.8 MB | 564.4 kB |
210210

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

217217
#### npm packages
@@ -229,12 +229,12 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
229229

230230
| Raw size | Minified size | Minified + gzip size |
231231
|------|-----------------|------------------------|
232-
| 2.8 MB | 1.1 MB | 383 kB |
232+
| 2.8 MB | 1.1 MB | 382.9 kB |
233233

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

240240
#### npm packages
@@ -252,12 +252,12 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
252252

253253
| Raw size | Minified size | Minified + gzip size |
254254
|------|-----------------|------------------------|
255-
| 11.1 MB | 4.8 MB | 1.4 MB |
255+
| 11.1 MB | 4.8 MB | 1.5 MB |
256256

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

263263
#### npm packages

dist/plotly-basic.js

Lines changed: 35 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v3.0.0
2+
* plotly.js (basic) v3.0.1
33
* Copyright 2012-2025, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -38,7 +38,7 @@ var Plotly = (() => {
3838
var require_version = __commonJS({
3939
"src/version.js"(exports) {
4040
"use strict";
41-
exports.version = "3.0.0";
41+
exports.version = "3.0.1";
4242
}
4343
});
4444

@@ -49,7 +49,7 @@ var Plotly = (() => {
4949
context[name] = context[name] || definition();
5050
if (typeof module != "undefined" && module.exports) {
5151
module.exports = context[name];
52-
} else if (typeof define == "function" && define.amd) {
52+
} else if (typeof define == "function" && false) {
5353
define(function $AMD$() {
5454
return context[name];
5555
});
@@ -7224,7 +7224,7 @@ var Plotly = (() => {
72247224
d3.xml = d3_xhrType(function(request) {
72257225
return request.responseXML;
72267226
});
7227-
if (typeof define === "function" && define.amd) define(d3);
7227+
if (typeof define === "function" && false) define(d3);
72287228
else if (typeof module === "object" && module.exports) module.exports = d3;
72297229
else this.d3 = d3;
72307230
}.apply(self);
@@ -7235,7 +7235,7 @@ var Plotly = (() => {
72357235
var require_d3_time = __commonJS({
72367236
"node_modules/d3-time/dist/d3-time.js"(exports, module) {
72377237
(function(global2, factory) {
7238-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = global2 || self, factory(global2.d3 = global2.d3 || {}));
7238+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && false ? define(["exports"], factory) : (global2 = global2 || self, factory(global2.d3 = global2.d3 || {}));
72397239
})(exports, function(exports2) {
72407240
"use strict";
72417241
var t0 = /* @__PURE__ */ new Date(), t1 = /* @__PURE__ */ new Date();
@@ -7573,7 +7573,7 @@ var Plotly = (() => {
75737573
var require_d3_time_format = __commonJS({
75747574
"node_modules/d3-time-format/dist/d3-time-format.js"(exports, module) {
75757575
(function(global2, factory) {
7576-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require_d3_time()) : typeof define === "function" && define.amd ? define(["exports", "d3-time"], factory) : (global2 = global2 || self, factory(global2.d3 = global2.d3 || {}, global2.d3));
7576+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require_d3_time()) : typeof define === "function" && false ? define(["exports", "d3-time"], factory) : (global2 = global2 || self, factory(global2.d3 = global2.d3 || {}, global2.d3));
75777577
})(exports, function(exports2, d3Time) {
75787578
"use strict";
75797579
function localDate(d) {
@@ -8126,7 +8126,7 @@ var Plotly = (() => {
81268126
var require_d3_format = __commonJS({
81278127
"node_modules/d3-format/dist/d3-format.js"(exports, module) {
81288128
(function(global2, factory) {
8129-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.d3 = global2.d3 || {}));
8129+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && false ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.d3 = global2.d3 || {}));
81308130
})(exports, function(exports2) {
81318131
"use strict";
81328132
function formatDecimal(x) {
@@ -8483,7 +8483,7 @@ var Plotly = (() => {
84838483
var require_base64_arraybuffer_umd = __commonJS({
84848484
"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(exports, module) {
84858485
(function(global2, factory) {
8486-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["base64-arraybuffer"] = {}));
8486+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && false ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["base64-arraybuffer"] = {}));
84878487
})(exports, function(exports2) {
84888488
"use strict";
84898489
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -8785,7 +8785,7 @@ var Plotly = (() => {
87858785
};
87868786
};
87878787
function npGet(cont, parts) {
8788-
return function() {
8788+
return function(retainNull) {
87898789
var curCont = cont;
87908790
var curPart;
87918791
var allSame;
@@ -8798,7 +8798,7 @@ var Plotly = (() => {
87988798
allSame = true;
87998799
out = [];
88008800
for (j = 0; j < curCont.length; j++) {
8801-
out[j] = npGet(curCont[j], parts.slice(i + 1))();
8801+
out[j] = npGet(curCont[j], parts.slice(i + 1))(retainNull);
88028802
if (out[j] !== out[0]) allSame = false;
88038803
}
88048804
return allSame ? out[0] : out;
@@ -8813,7 +8813,7 @@ var Plotly = (() => {
88138813
}
88148814
if (typeof curCont !== "object" || curCont === null) return void 0;
88158815
out = curCont[parts[i]];
8816-
if (out === null) return void 0;
8816+
if (!retainNull && out === null) return void 0;
88178817
return out;
88188818
};
88198819
}
@@ -10034,7 +10034,7 @@ var Plotly = (() => {
1003410034
}
1003510035
if (typeof module !== "undefined" && module.exports) {
1003610036
module.exports = tinycolor;
10037-
} else if (typeof define === "function" && define.amd) {
10037+
} else if (typeof define === "function" && false) {
1003810038
define(function() {
1003910039
return tinycolor;
1004010040
});
@@ -13737,10 +13737,10 @@ var Plotly = (() => {
1373713737
}
1373813738
});
1373913739

13740-
// stylePlugin:/Users/alex/plotly/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css
13740+
// stylePlugin:/Users/ekl/code/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css
1374113741
var maplibre_gl_exports = {};
1374213742
var init_maplibre_gl2 = __esm({
13743-
"stylePlugin:/Users/alex/plotly/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() {
13743+
"stylePlugin:/Users/ekl/code/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() {
1374413744
init_maplibre_gl();
1374513745
}
1374613746
});
@@ -15710,9 +15710,9 @@ var Plotly = (() => {
1571015710
v = obj[key];
1571115711
} else {
1571215712
getterCache[key] = getterCache[key] || lib.nestedProperty(obj, key).get;
15713-
v = getterCache[key]();
15713+
v = getterCache[key](true);
1571415714
}
15715-
return lib.isValidTextValue(v) ? v : "";
15715+
return v !== void 0 ? v : "";
1571615716
});
1571715717
};
1571815718
var hovertemplateWarnings = {
@@ -15751,7 +15751,6 @@ var Plotly = (() => {
1575115751
var opts = this;
1575215752
var args = arguments;
1575315753
if (!labels) labels = {};
15754-
var getterCache = {};
1575515754
return string.replace(lib.TEMPLATE_STRING_REGEX, function(match, rawKey, format) {
1575615755
var isOther = rawKey === "xother" || rawKey === "yother";
1575715756
var isSpaceOther = rawKey === "_xother" || rawKey === "_yother";
@@ -15783,9 +15782,7 @@ var Plotly = (() => {
1578315782
break;
1578415783
}
1578515784
if (!SIMPLE_PROPERTY_REGEX.test(key)) {
15786-
value = lib.nestedProperty(obj, key).get();
15787-
value = getterCache[key] || lib.nestedProperty(obj, key).get();
15788-
if (value) getterCache[key] = value;
15785+
value = lib.nestedProperty(obj, key).get(true);
1578915786
}
1579015787
if (value !== void 0) break;
1579115788
}
@@ -29852,33 +29849,25 @@ var Plotly = (() => {
2985229849
if (gd._dragged) {
2985329850
if (options.doneFn) options.doneFn();
2985429851
} else {
29855-
if (options.clickFn) options.clickFn(numClicks, initialEvent);
29852+
var clickEvent;
29853+
if (initialEvent.target === initialTarget) {
29854+
clickEvent = initialEvent;
29855+
} else {
29856+
clickEvent = {
29857+
target: initialTarget,
29858+
srcElement: initialTarget,
29859+
toElement: initialTarget
29860+
};
29861+
Object.keys(initialEvent).concat(Object.keys(initialEvent.__proto__)).forEach((k) => {
29862+
var v = initialEvent[k];
29863+
if (!clickEvent[k] && typeof v !== "function") {
29864+
clickEvent[k] = v;
29865+
}
29866+
});
29867+
}
29868+
if (options.clickFn) options.clickFn(numClicks, clickEvent);
2985629869
if (!rightClick) {
29857-
var e2;
29858-
try {
29859-
e2 = new MouseEvent("click", e);
29860-
} catch (err) {
29861-
var offset = pointerOffset(e);
29862-
e2 = document.createEvent("MouseEvents");
29863-
e2.initMouseEvent(
29864-
"click",
29865-
e.bubbles,
29866-
e.cancelable,
29867-
e.view,
29868-
e.detail,
29869-
e.screenX,
29870-
e.screenY,
29871-
offset[0],
29872-
offset[1],
29873-
e.ctrlKey,
29874-
e.altKey,
29875-
e.shiftKey,
29876-
e.metaKey,
29877-
e.button,
29878-
e.relatedTarget
29879-
);
29880-
}
29881-
initialTarget.dispatchEvent(e2);
29870+
initialTarget.dispatchEvent(new MouseEvent("click", e));
2988229871
}
2988329872
}
2988429873
gd._dragging = false;

0 commit comments

Comments
 (0)