Skip to content

Commit 42fa76e

Browse files
authored
Merge branch 'main' into bugfix/7750-margin-pushers-again
2 parents d06de0a + d0c808b commit 42fa76e

93 files changed

Lines changed: 54770 additions & 49301 deletions

File tree

Some content is hidden

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

‎.github/actions/setup-image-env/action.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,23 @@ inputs:
88
uv-version:
99
description: 'uv version to use'
1010
default: '0.11.2'
11+
chrome-version:
12+
description: 'Chrome version for Kaleido. The baselines depend on this version.'
13+
default: '154.0.8037.92'
1114

1215
runs:
1316
using: 'composite'
1417
steps:
18+
# Pin Chrome so a runner image update does not change the rendered baselines
19+
- uses: ./.github/actions/setup-chrome
20+
with:
21+
chrome-version: ${{ inputs.chrome-version }}
22+
23+
# Kaleido uses the Chrome at BROWSER_PATH instead of the Chrome of the runner
24+
- name: Point Kaleido at the pinned Chrome
25+
run: echo "BROWSER_PATH=$CHROME_BIN" >> $GITHUB_ENV
26+
shell: bash
27+
1528
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
1629
with:
1730
python-version: ${{ inputs.python-version }}

‎CHANGELOG.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@ To see all merged commits on the main branch that will be part of the next plotl
99

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

12-
## [X.Y.Z] -- UNRELEASED
12+
## [4.1.2] -- 2026-10-05
13+
14+
### Changed
15+
- Use `ResizeObserver` for responsive chart resizing instead of listening for window resize events [[#8017](https://github.com/plotly/plotly.js/pull/8017)], with thanks to @Lexachoc for the contribution!
16+
- Describe `config.toImageButtonOptions` in the plot schema [[#8066](https://github.com/plotly/plotly.js/pull/8066)]
17+
18+
### Fixed
19+
- Fix modebar hover colors not updating after `color` or `activecolor` changes [[#8024](https://github.com/plotly/plotly.js/pull/8024)], with thanks to @Lexachoc for the contribution!
20+
- Correct the image export types: `format` now accepts `full-json`, `width` and `height` accept `null`, and `ToImgopts.format`, `ToImgopts.width`, `ToImgopts.height` and `DownloadImgopts.filename` are optional because `toImage` and `downloadImage` supply them [[#8066](https://github.com/plotly/plotly.js/pull/8066)]
21+
- Pick the trace drawn last on a hover tie in `scattergl` and `splom` (matching `scatter`) [[#8079](https://github.com/plotly/plotly.js/pull/8079)]
22+
- Allow typed arrays in the types for `arrayOk` number and color attributes [[#8087](https://github.com/plotly/plotly.js/pull/8087)]
23+
- Redraw plots when a font that they use finishes loading [[#8094](https://github.com/plotly/plotly.js/pull/8094)]
24+
25+
26+
## [4.1.1] -- 2026-09-14
1327

1428
### Changed
1529
- Update `maplibre-gl` to v6 to address [CVE-2026-85061](https://github.com/advisories/GHSA-jrc7-96c5-q579) [[#8035](https://github.com/plotly/plotly.js/pull/8035)]

‎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: 4.1.1
12+
version: 4.1.2
1313
doi: 10.5281/zenodo.13964707
14-
date-released: 2026-09-14
14+
date-released: 2026-10-05
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-4.1.1.min.js" charset="utf-8"></script>
65+
<script src="https://cdn.plot.ly/plotly-4.1.2.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-4.1.1.min.js"
82+
import "https://cdn.plot.ly/plotly-4.1.2.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-4.1.1.js" charset="utf-8"></script>
92+
<script src="https://cdn.plot.ly/plotly-4.1.2.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.

‎RELEASE.md‎

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Releasing plotly.js
2+
3+
This document is for maintainers who publish plotly.js. For contributor workflows, read [CONTRIBUTING.md](CONTRIBUTING.md) and [BUILDING.md](BUILDING.md).
4+
5+
plotly.js follows [semver](https://semver.org). A release that adds functionality bumps the minor version. A minor version can go past 9, so `v1.22.0` is valid.
6+
7+
Do every step below for each release, unless indicated otherwise.
8+
9+
## Update README, CHANGELOG, and CITATION
10+
11+
- Open [GitHub Actions](https://github.com/plotly/plotly.js/actions?query=branch%3Amain) and confirm that the `main` branch passes the tests
12+
- Run `git switch main && git pull`
13+
- Run `git status` and confirm that the working tree is clean
14+
- Run `git switch -c release-vX.Y.Z`, where `X.Y.Z` is the new version number
15+
- Run `npx check-node-version --node 22 --npm 10` to confirm the tooling versions before you install
16+
- Run `npm ci`
17+
- Run `npm run preversion`
18+
- Update the version number and the release date in [README.md](README.md) and [CITATION.cff](CITATION.cff). Skip this step for a release candidate.
19+
- Use find-and-replace in the README. The version number appears in three `https://cdn.plot.ly/plotly-X.Y.Z...` script URLs.
20+
- Update the `version` field and the `date-released` field in [CITATION.cff](CITATION.cff)
21+
- Run `npm run use-draftlogs` to copy the `draftlogs/` folder into [CHANGELOG.md](CHANGELOG.md)
22+
23+
> [!NOTE]
24+
> `npm run use-draftlogs` accepts a filename that ends in `_add.md`, `_remove.md`, `_deprecate.md`, `_change.md`, or `_fix.md`. This will raise an error for any other name; rename files if necessary.
25+
26+
- Review [CHANGELOG.md](CHANGELOG.md). Replace the placeholder heading `## [X.Y.Z] -- UNRELEASED` with the real version number and release date.
27+
- Follow [keepachangelog](https://keepachangelog.com/) style
28+
- Correct typos and add missing entries and extra details
29+
- Open `https://github.com/plotly/plotly.js/compare/vX.Y.Q...main` to view every commit since the previous release `vX.Y.Q`
30+
- Confirm that every draftlog entry uses the link template `[[#1234](https://github.com/plotly/plotly.js/pull/1234)]`
31+
- Credit a community contributor at the end of that entry: **', with thanks to @<USERNAME> for the contribution!'**
32+
- Run `npm run empty-draftlogs` to empty the `draftlogs/` folder. Skip this step for a release candidate.
33+
- Run `git add -u . && git commit -m "chore: Updates for release vX.Y.Z"`
34+
35+
## Update package.json and generate the release build
36+
37+
- Run `npm version vX.Y.Z` from the repository root (for a release candidate, include the prerelease part, as in `npm version v4.2.0-rc.0`). The command runs these steps in order:
38+
- Run the `preversion` script, which tests the Node.js and `npm` versions, tests for `npm link`ed packages, and walks the dependency tree
39+
- Bump the version in `package.json`
40+
- Run the `version` script, which runs `npm run build` and then `git add -A lib dist build src/version.js`
41+
- `git commit`, with the message `'X.Y.Z'`
42+
- `git tag -a`, with the tag `'vX.Y.Z'`
43+
- The `postversion` script, which prints _Version bumped and committed. If ok, run: git push && git push --tags_
44+
45+
The build writes the `dist/` files: main bundles, partial bundles, locales, plot-schema, and geo assets. The build also writes the generated build files under [`build/`](build/README.md) and the package version file in `src/`.
46+
47+
> [!NOTE]
48+
> The `npm ls` step inside `preversion` fails if the dependencies under `node_modules/` don't meet the requirements listed in `package.json`. Run `npm ci` to fix this issue.
49+
50+
- Run `git show HEAD` to review the commit
51+
- The output shows the new CDN bundle links and the new bundle sizes in `dist/README.md`, plus the new code in the dist bundles
52+
- Carefully review the new bundle sizes in `dist/README.md`. If a bundle size has changed unexpectedly, or the diff contains any other unexpected change, run `git reset --hard HEAD^` and `git tag -d vX.Y.Z` to undo the last commit and tag. Investigate the issue before proceeding.
53+
- If everything looks good, run `git push && git push --tags` to push the release branch and the release tag
54+
- Open a pull request against `main`, and assign the `no-draftlog` label
55+
- Wait for CI to pass, and get an approval
56+
- Merge the pull request with a merge commit
57+
58+
> [!CAUTION]
59+
> Do not squash merge, since that will result in the tagged commit `vX.Y.Z` not being part of `main`
60+
61+
## Publish the release
62+
63+
- Run `git switch main && git pull` after the pull request merges
64+
- Run `git branch --contains vX.Y.Z` and confirm that the output includes `main`
65+
66+
### Publish to npm
67+
68+
- Run `npm access list packages | grep plotly` to confirm your permission to publish the plotly.js packages
69+
- The output lists the Plotly packages that you can update
70+
- If that command returns no result, authenticate with npm:
71+
- Confirm your membership in the `plotly` npm organization. If you're not a member, contact the Libraries team for next steps.
72+
- Run `npm login`
73+
- Complete the authentication flow with the credentials for your account
74+
- Confirm in the terminal that the command finished
75+
- Run `npm access list packages | grep plotly` again, and read the list of Plotly packages
76+
- Run `npm pack --dry-run`. This shows what will be included in the published package without actually publishing.
77+
- Compare the package size against the previous release. An unexpected large change can be an indicator that something was added/removed that shouldn't have been.
78+
- Look for any files that don't belong in the release (usually at the project root level). If you find any, investigate why they're showing up. One resolution option is updating [.npmignore](.npmignore).
79+
- For a full release, run `npm publish`. This will publish the new version to the [npm registry](https://www.npmjs.com/package/plotly.js).
80+
- For a release candidate, run `npm publish --tag rc` instead
81+
- You will be prompted by npm to authorize publishing before proceeding. If you see an option to allow publishing without a challenge for the next few minutes, enable it. This will allow for easy partial bundle publishing that immediately follows completion of the `publish` step.
82+
83+
> [!NOTE]
84+
> Before the `publish` step starts, the `prepack` and `postpack` scripts will run. These manage converting TS files to JS before packing and removing them after packing. After the `publish` step completes, the `postpublish` script will run. This kicks off `tasks/sync_packages.js`, which publishes the partial bundles.
85+
86+
### Publish to the Plotly CDN
87+
88+
- Run `aws --version` and confirm that the output starts with `aws-cli/2`
89+
- If the command is not found, or the output shows version 1, install AWS CLI v2:
90+
- On macOS, run `brew install awscli`
91+
- On Linux or Windows, follow the [AWS CLI install guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
92+
- Run `./tasks/cdn_publish.sh` to upload the new release files to the CDN bucket on S3
93+
- If that step fails with an authentication error, run `aws configure` and enter the credentials for the plotly.js CDN bucket
94+
95+
### Publish to GitHub
96+
97+
- Open the [releases page](https://github.com/plotly/plotly.js/releases) and click "Draft a new release"
98+
- Select the tag for the release
99+
- Set the title to `vX.Y.Z`, the same text as the tag
100+
- Copy the description from the matching section of the CHANGELOG. Add extra context if necessary.
101+
- For a release candidate, select the "This is a pre-release" box
102+
- Click "Publish release"
103+
104+
## Post-release tasks
105+
106+
- Post a link to the release tag, `https://github.com/plotly/plotly.js/releases/tag/vX.Y.Z`, in the team announcement channels
107+
108+
## Make a maintenance release
109+
110+
At times it may be required to patch an older version of plotly.js (for a security fix, etc.). This example patches `v3.7.0` and publishes `3.7.1`.
111+
112+
- Run `git show v3.7.0:package.json` and read the `preversion` script for the toolchain
113+
- A v3 tag needs Node.js 18. A v4 tag needs Node.js 22.
114+
- Run `git switch -c maintenance-v3.7.1 v3.7.0`
115+
- Run `npm ci`
116+
- Find the commits on `main` that fixed the bugs in question. This example uses `a34ad3`.
117+
- Run `git cherry-pick a34ad3`, fix the merge conflicts, and test the behavior
118+
- To apply several patches at once, use GitHub's `.patch` URLs with `git am`
119+
- Run `npm version patch`. The command bumps the version to `3.7.1`, runs `npm run build`, commits, and adds the tag `v3.7.1`.
120+
- Run `git show HEAD` to review the version commit
121+
- Run `git push && git push --tags`
122+
- Run `DRYRUN=1 npm publish --tag maintenance`
123+
- `DRYRUN` prevents publishing of the partial bundles via `tasks/sync_packages.js`. The patched bundle will still be published.
124+
- Run `npm view plotly.js versions` and confirm that the list holds `3.7.1`
125+
- Run `npm dist-tag ls plotly.js` and confirm that `latest` still points at the current release
126+
127+
### Notes on maintenance releases
128+
129+
- The `--tag` argument in the `npm publish` step is **very important**. Without that argument, the maintenance release takes the `latest` tag on npm. A clean `npm install plotly.js` then installs `3.7.1` instead of the current release from `main`.
130+
- Do not push a maintenance release to the CDN. This policy encourages every user to run the current plotly.js release.

‎biome.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.5.5/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
33
"assist": { "actions": { "source": { "organizeImports": "on" } } },
44
"files": {
55
"maxSize": 10000000,

‎build/maplibre_worker.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/README.md‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ The main plotly.js bundles weight in at:
4343

4444
| plotly.js | plotly.min.js | plotly.min.js + gzip | plotly-with-meta.js |
4545
|-----------|---------------|----------------------|---------------------|
46-
| 10.1 MB | 4.82 MB | 1.48 MB | 10.5 MB |
46+
| 10.1 MB | 4.83 MB | 1.49 MB | 10.5 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-4.1.1.js
49+
> https://cdn.plot.ly/plotly-4.1.2.js
5050
51-
> https://cdn.plot.ly/plotly-4.1.1.min.js
51+
> https://cdn.plot.ly/plotly-4.1.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.94 MB | 1.19 MB | 398 kB |
94+
| 2.96 MB | 1.2 MB | 401 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-4.1.1.js
97+
> https://cdn.plot.ly/plotly-basic-4.1.2.js
9898
99-
> https://cdn.plot.ly/plotly-basic-4.1.1.min.js
99+
> https://cdn.plot.ly/plotly-basic-4.1.2.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.71 MB | 1.5 MB | 500 kB |
117+
| 3.72 MB | 1.51 MB | 504 kB |
118118

119119
#### CDN links
120-
> https://cdn.plot.ly/plotly-cartesian-4.1.1.js
120+
> https://cdn.plot.ly/plotly-cartesian-4.1.2.js
121121
122-
> https://cdn.plot.ly/plotly-cartesian-4.1.1.min.js
122+
> https://cdn.plot.ly/plotly-cartesian-4.1.2.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-
| 3.39 MB | 1.4 MB | 467 kB |
140+
| 3.4 MB | 1.41 MB | 470 kB |
141141

142142
#### CDN links
143-
> https://cdn.plot.ly/plotly-geo-4.1.1.js
143+
> https://cdn.plot.ly/plotly-geo-4.1.2.js
144144
145-
> https://cdn.plot.ly/plotly-geo-4.1.1.min.js
145+
> https://cdn.plot.ly/plotly-geo-4.1.2.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.44 MB | 1.75 MB | 562 kB |
163+
| 4.46 MB | 1.76 MB | 564 kB |
164164

165165
#### CDN links
166-
> https://cdn.plot.ly/plotly-gl3d-4.1.1.js
166+
> https://cdn.plot.ly/plotly-gl3d-4.1.2.js
167167
168-
> https://cdn.plot.ly/plotly-gl3d-4.1.1.min.js
168+
> https://cdn.plot.ly/plotly-gl3d-4.1.2.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.68 MB | 1.49 MB | 498 kB |
186+
| 3.7 MB | 1.49 MB | 502 kB |
187187

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

194194
#### npm packages
@@ -206,12 +206,12 @@ The `map` partial bundle contains trace modules `choroplethmap`, `densitymap`, `
206206

207207
| Raw size | Minified size | Minified + gzip size |
208208
|------|-----------------|------------------------|
209-
| 5.39 MB | 2.96 MB | 887 kB |
209+
| 5.41 MB | 2.98 MB | 892 kB |
210210

211211
#### CDN links
212-
> https://cdn.plot.ly/plotly-map-4.1.1.js
212+
> https://cdn.plot.ly/plotly-map-4.1.2.js
213213
214-
> https://cdn.plot.ly/plotly-map-4.1.1.min.js
214+
> https://cdn.plot.ly/plotly-map-4.1.2.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-
| 3.2 MB | 1.3 MB | 432 kB |
232+
| 3.21 MB | 1.3 MB | 436 kB |
233233

234234
#### CDN links
235-
> https://cdn.plot.ly/plotly-finance-4.1.1.js
235+
> https://cdn.plot.ly/plotly-finance-4.1.2.js
236236
237-
> https://cdn.plot.ly/plotly-finance-4.1.1.min.js
237+
> https://cdn.plot.ly/plotly-finance-4.1.2.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-
| 10.9 MB | 5.16 MB | 1.58 MB |
255+
| 11 MB | 5.18 MB | 1.59 MB |
256256

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

263263
#### npm packages

0 commit comments

Comments
 (0)