Skip to content

Commit 177dca3

Browse files
committed
Merge remote-tracking branch 'origin-plotly/master' into pie-legend-visibility
# Conflicts: # test/plot-schema.json
2 parents 71c01fb + f07f1c7 commit 177dca3

File tree

1,462 files changed

+1769942
-1742635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,462 files changed

+1769942
-1742635
lines changed

.circleci/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ jobs:
303303
- run:
304304
name: Compare pixels
305305
command: .circleci/test.sh test-image ; find build -maxdepth 1 -type f -delete
306+
- image-diff-message
306307
- store_artifacts:
307308
path: build
308309
destination: /
@@ -317,6 +318,7 @@ jobs:
317318
- run:
318319
name: Compare pixels
319320
command: .circleci/test.sh test-image-virtual-webgl ; find build -maxdepth 1 -type f -delete
321+
- image-diff-message
320322
- store_artifacts:
321323
path: build
322324
destination: /
@@ -331,6 +333,7 @@ jobs:
331333
- run:
332334
name: Compare pixels
333335
command: .circleci/test.sh test-image ; find build -maxdepth 1 -type f -delete
336+
- image-diff-message
334337
- store_artifacts:
335338
path: build
336339
destination: /
@@ -345,6 +348,7 @@ jobs:
345348
- run:
346349
name: Compare pixels of mathjax v3 baselines
347350
command: .circleci/test.sh test-image-mathjax3
351+
- image-diff-message
348352
- store_artifacts:
349353
path: build
350354
destination: /
@@ -515,6 +519,16 @@ jobs:
515519
- store_artifacts:
516520
path: topojson.tar
517521

522+
commands:
523+
image-diff-message:
524+
steps:
525+
- run:
526+
name: IMAGE DIFF DETECTED - SEE NOTE BELOW
527+
when: on_fail
528+
command: |
529+
echo "Image Diff Detected: baseline images may need to be updated. Run 'tasks/circleci_image_artifact_download.sh' to download the baseline images generated by this job."
530+
echo "Add the new images to 'test/image/baselines/' and commit them to this pull request."
531+
518532
workflows:
519533
version: 2
520534
build-and-test:

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,42 @@ 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.3.0] -- 2025-11-14
13+
14+
### Added
15+
- Add `hovertemplate` for `candlestick` and `ohlc` traces [[#7619](https://github.com/plotly/plotly.js/pull/7619)]
16+
- Generate list of ISO codes for provided topojson maps, update info for some disputed territories [[#7622](https://github.com/plotly/plotly.js/pull/7622)]
17+
18+
### Changed
19+
- Turn off borders for plot container in CSS reset [[#7617](https://github.com/plotly/plotly.js/pull/7617)]
20+
21+
### Fixed
22+
- Fix KDE sampling precision in violin trace to eliminate floating-point drift and prevent density underrun/overrun [[#7581](https://github.com/plotly/plotly.js/pull/7581)], with thanks to @Koookadooo for the contribution!
23+
24+
25+
## [3.2.0] -- 2025-10-30
26+
27+
### Added
28+
- Add `hovertemplatefallback` and `texttemplatefallback` attributes [[#7577](https://github.com/plotly/plotly.js/pull/7577)]
29+
30+
### Fixed
31+
- Fix wrong scrolling behavior for legend [[#7067](https://github.com/plotly/plotly.js/pull/7067)], with thanks to @Lexachoc for the contribution!
32+
- Fix bug affecting use of `customdata` with typed arrays [[#7608](https://github.com/plotly/plotly.js/pull/7608)]
33+
34+
35+
## [3.1.2] -- 2025-10-16
36+
37+
### Added
38+
- Add "SI extended" formatting rule for tick exponents on axis labels, allowing values to be displayed with extended SI prefixes (e.g., femto, pico, atto) [[#7249](https://github.com/plotly/plotly.js/pull/7249)], with thanks to @dberardi99 for the contribution!
39+
40+
### Fixed
41+
- Fix editable `title.text` for `ternary`, `polar`, `colorbar`, and `rangeslider` (regression introduced in 3.0.0) [[#7513](https://github.com/plotly/plotly.js/pull/7513)], with thanks to @Lexachoc for the contribution!
42+
- Fix `layout.title.subtitle` does not properly clear/remove from the chart when `subtitle` object is not in place, or `subtitle.text` set to `null`, empty string, or whitespace-only values [[#7571](https://github.com/plotly/plotly.js/pull/7571)], with thanks to @cminn10 for the contribution!
43+
- Fix issue where `visible` property of one legend was affecting another. [[#7574](https://github.com/plotly/plotly.js/pull/7574)]
44+
- Resolve incorrect shape clipping for domain-referenced shapes on n*10th subplot. [[#7576](https://github.com/plotly/plotly.js/pull/7576)]
45+
- Update config diff check method to handle nested arrays [[#7579](https://github.com/plotly/plotly.js/pull/7579)]
46+
47+
1248
## [3.1.1] -- 2025-09-29
1349

1450
### Fixed

CITATION.cff

Lines changed: 2 additions & 2 deletions
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.1.1
12+
version: 3.3.0
1313
doi: 10.5281/zenodo.13964707
14-
date-released: 2025-09-29
14+
date-released: 2025-11-14
1515
url: "https://github.com/plotly/plotly.js"

README.md

Lines changed: 33 additions & 32 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.1.1.min.js" charset="utf-8"></script>
65+
<script src="https://cdn.plot.ly/plotly-3.3.0.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.1.1.min.js"
82+
import "https://cdn.plot.ly/plotly-3.3.0.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.1.1.js" charset="utf-8"></script>
92+
<script src="https://cdn.plot.ly/plotly-3.3.0.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.
@@ -145,35 +145,36 @@ Please read through our [contributing guidelines](https://github.com/plotly/plot
145145

146146
Plotly.js is at the core of a large and dynamic ecosystem with many contributors who file issues, reproduce bugs, suggest improvements, write code in this repo (and other upstream or downstream ones) and help users in the Plotly community forum. The following people deserve special recognition for their outsized contributions to this ecosystem:
147147

148-
| | GitHub | Twitter | Status |
149-
|---|--------|---------|--------|
150-
|**Alex C. Johnson**| [@alexcjohnson](https://github.com/alexcjohnson) | | Active, Maintainer |
151-
|**Mojtaba Samimi** | [@archmoj](https://github.com/archmoj) | [@solarchvision](https://twitter.com/solarchvision) | Active, Maintainer |
152-
|**Emily Kellison-Linn** | [@emilykl](https://github.com/emilykl) | | Active, Maintainer |
153-
|**My-Tien Nguyen**| [@my-tien](https://github.com/my-tien) | | Active, Community Contributor |
154-
|**Birk Skyum**| [@birkskyum](https://github.com/birkskyum) | | Active, Community Contributor |
155-
|**Étienne Tétreault-Pinard**| [@etpinard](https://github.com/etpinard) | [@etpinard](https://twitter.com/etpinard) | Hall of Fame |
156-
|**Antoine Roy-Gobeil** | [@antoinerg](https://github.com/antoinerg) | | Hall of Fame |
157-
|**Jack Parmer**| [@jackparmer](https://github.com/jackparmer) | | Hall of Fame |
158-
|**Nicolas Kruchten** | [@nicolaskruchten](https://github.com/nicolaskruchten) | [@nicolaskruchten](https://twitter.com/nicolaskruchten) | Hall of Fame |
159-
|**Mikola Lysenko**| [@mikolalysenko](https://github.com/mikolalysenko) | [@MikolaLysenko](https://twitter.com/MikolaLysenko) | Hall of Fame |
160-
|**Ricky Reusser**| [@rreusser](https://github.com/rreusser) | [@rickyreusser](https://twitter.com/rickyreusser) | Hall of Fame |
161-
|**Dmitry Yv.** | [@dy](https://github.com/dy) | [@DimaYv](https://twitter.com/dimayv)| Hall of Fame |
162-
|**Jon Mease** | [@jonmmease](https://github.com/jonmmease) | [@jonmmease](https://twitter.com/jonmmease) | Hall of Fame |
163-
|**Robert Monfera**| [@monfera](https://github.com/monfera) | [@monfera](https://twitter.com/monfera) | Hall of Fame |
164-
|**Robert Möstl** | [@rmoestl](https://github.com/rmoestl) | [@rmoestl](https://twitter.com/rmoestl) | Hall of Fame |
165-
|**Nicolas Riesco**| [@n-riesco](https://github.com/n-riesco) | | Hall of Fame |
166-
|**Miklós Tusz**| [@mdtusz](https://github.com/mdtusz) | [@mdtusz](https://twitter.com/mdtusz)| Hall of Fame |
167-
|**Chelsea Douglas**| [@cldougl](https://github.com/cldougl) | | Hall of Fame |
168-
|**Ben Postlethwaite**| [@bpostlethwaite](https://github.com/bpostlethwaite) | | Hall of Fame |
169-
|**Hannah Ker** | [@hannahker](https://github.com/hannahker) | [@hannahker11](https://twitter.com/hannahker11)| Hall of Fame |
170-
|**Chris Parmer**| [@chriddyp](https://github.com/chriddyp) | | Hall of Fame |
171-
|**Alex Vados**| [@alexander-daniel](https://github.com/alexander-daniel) | | Hall of Fame |
148+
| Contributor | GitHub | Status |
149+
|-------------|--------|---------|
150+
|**Alex C. Johnson**| [@alexcjohnson](https://github.com/alexcjohnson) | Active, Maintainer |
151+
|**Emily Kellison-Linn** | [@emilykl](https://github.com/emilykl) | Active, Maintainer |
152+
|**Cameron DeCoster** | [@camdecoster](https://github.com/camdecoster) | Active, Maintainer |
153+
|**Mojtaba Samimi** | [@archmoj](https://github.com/archmoj) | Active, Community Contributor |
154+
|**My-Tien Nguyen**| [@my-tien](https://github.com/my-tien) | Active, Community Contributor |
155+
|**Birk Skyum**| [@birkskyum](https://github.com/birkskyum) | Active, Community Contributor |
156+
|**Étienne Tétreault-Pinard**| [@etpinard](https://github.com/etpinard) | Hall of Fame |
157+
|**Antoine Roy-Gobeil** | [@antoinerg](https://github.com/antoinerg) | Hall of Fame |
158+
|**Jack Parmer**| [@jackparmer](https://github.com/jackparmer) | Hall of Fame |
159+
|**Nicolas Kruchten** | [@nicolaskruchten](https://github.com/nicolaskruchten) | Hall of Fame |
160+
|**Mikola Lysenko**| [@mikolalysenko](https://github.com/mikolalysenko) | Hall of Fame |
161+
|**Ricky Reusser**| [@rreusser](https://github.com/rreusser) | Hall of Fame |
162+
|**Dmitry Yv.** | [@dy](https://github.com/dy) | Hall of Fame |
163+
|**Jon Mease** | [@jonmmease](https://github.com/jonmmease) | Hall of Fame |
164+
|**Robert Monfera**| [@monfera](https://github.com/monfera) | Hall of Fame |
165+
|**Robert Möstl** | [@rmoestl](https://github.com/rmoestl) | Hall of Fame |
166+
|**Nicolas Riesco**| [@n-riesco](https://github.com/n-riesco) | Hall of Fame |
167+
|**Miklós Tusz**| [@mdtusz](https://github.com/mdtusz) | Hall of Fame |
168+
|**Chelsea Douglas**| [@cldougl](https://github.com/cldougl) | Hall of Fame |
169+
|**Ben Postlethwaite**| [@bpostlethwaite](https://github.com/bpostlethwaite) | Hall of Fame |
170+
|**Hannah Ker** | [@hannahker](https://github.com/hannahker) | Hall of Fame |
171+
|**Chris Parmer**| [@chriddyp](https://github.com/chriddyp) | Hall of Fame |
172+
|**Alex Vados**| [@alexander-daniel](https://github.com/alexander-daniel) | Hall of Fame |
172173

173174
---
174175
## Copyright and license
175176

176-
Code and documentation copyright 2021 Plotly, Inc.
177+
Code and documentation copyright 2025 Plotly, Inc.
177178

178179
Code released under the [MIT license](https://github.com/plotly/plotly.js/blob/master/LICENSE).
179180

@@ -186,7 +187,7 @@ See the [Releases section](https://github.com/plotly/plotly.js/releases) of our
186187
---
187188
## Community
188189

189-
* Follow [@plotlygraphs](https://twitter.com/plotlygraphs) on Twitter for the latest Plotly news.
190-
* Implementation help may be found on community.plot.com (tagged [`plotly-js`](https://community.plotly.com/c/plotly-js)) or
191-
on Stack Overflow (tagged [`plotly`](https://stackoverflow.com/questions/tagged/plotly)).
192-
* Developers should use the keyword `plotly` on packages which modify or add to the functionality of plotly.js when distributing through [npm](https://www.npmjs.com/browse/keyword/plotly).
190+
* Follow us on [X](https://x.com/plotlygraphs) and [LinkedIn](https://www.linkedin.com/company/plotly/) for the latest Plotly news.
191+
* Implementation help may be found on our community forum (tagged [`plotly-js`](https://community.plotly.com/c/plotly-js)) or
192+
on Stack Overflow (tagged [`plotly.js`](https://stackoverflow.com/questions/tagged/plotly.js)).
193+
* Developers should use the keyword `plotly` on packages which modify or add to the functionality of plotly.js when distributing through [npm](https://www.npmjs.com/search?q=keywords:plotly).

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"files": {
55
"maxSize": 10000000,
66
"includes": [
7+
"**/esbuild-config.js",
78
"**/src/**",
89
"**/lib/**",
910
"**/test/**",
@@ -122,7 +123,7 @@
122123
"formatter": {
123124
"enabled": true,
124125
"indentStyle": "space",
125-
"indentWidth": 1,
126+
"indentWidth": 2,
126127
"lineEnding": "lf",
127128
"lineWidth": 80
128129
}

build/plotcss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var Lib = require('../src/lib');
44
var rules = {
5-
"X,X div": "direction:ltr;font-family:\"Open Sans\",verdana,arial,sans-serif;margin:0;padding:0;",
5+
"X,X div": "direction:ltr;font-family:\"Open Sans\",verdana,arial,sans-serif;margin:0;padding:0;border:0;",
66
"X input,X button": "font-family:\"Open Sans\",verdana,arial,sans-serif;",
77
"X input:focus,X button:focus": "outline:none;",
88
"X a": "text-decoration:none;",

devtools/dashboard_utilities.mjs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import fs from 'fs';
2+
import path from 'path';
3+
import constants from '../tasks/util/constants.js';
4+
5+
function readFilePromise(file) {
6+
return new Promise((resolve, reject) => {
7+
fs.readFile(file, { encoding: 'utf-8' }, (err, contents) => {
8+
if (err) reject(err);
9+
else resolve({ name: file, contents: contents });
10+
});
11+
});
12+
}
13+
14+
function writeFilePromise(path, contents) {
15+
return new Promise((resolve, reject) => {
16+
fs.writeFile(path, contents, (err) => {
17+
if (err) reject(err);
18+
else resolve(path);
19+
});
20+
});
21+
}
22+
23+
export function getMockFiles() {
24+
return new Promise((resolve, reject) => {
25+
fs.readdir(constants.pathToTestImageMocks, (err, files) => {
26+
if (err) reject(err);
27+
else resolve(files);
28+
});
29+
});
30+
}
31+
32+
export function readFiles(files) {
33+
const promises = files.map((file) => readFilePromise(path.join(constants.pathToTestImageMocks, file)));
34+
35+
return Promise.all(promises);
36+
}
37+
38+
export function createMocksList(files) {
39+
// eliminate pollutants (e.g .DS_Store) that can accumulate in the mock directory
40+
const jsonFiles = files.filter((file) => file.name.substr(-5) === '.json');
41+
42+
const mocksList = jsonFiles.map((file) => {
43+
try {
44+
const contents = JSON.parse(file.contents);
45+
46+
// get plot type keywords from mocks
47+
const types = contents.data
48+
.map((trace) => trace.type || 'scatter')
49+
.reduce((acc, type, i, arr) => (arr.lastIndexOf(type) === i ? [...acc, type] : acc), []);
50+
51+
const filename = file.name.split(path.sep).pop();
52+
53+
return {
54+
name: filename.slice(0, -5),
55+
file: filename,
56+
keywords: types.join(', ')
57+
};
58+
} catch (error) {
59+
if (error instanceof SyntaxError) {
60+
console.log(`Couldn't parse ${file.name} as JSON. Excluding from mocks list.`);
61+
} else {
62+
throw error;
63+
}
64+
}
65+
});
66+
67+
return mocksList;
68+
}
69+
70+
function saveListToFile(filePath, fileName) {
71+
return (list) => writeFilePromise(path.join(filePath, fileName), JSON.stringify(list, null, 2));
72+
}
73+
74+
export const saveMockListToFile = saveListToFile(constants.pathToBuild, 'test_dashboard_mocks.json');
75+
export const saveReglTracesToFile = saveListToFile(constants.pathToBuild, 'regl_traces.json');

0 commit comments

Comments
 (0)