Skip to content

Commit 0a44827

Browse files
authored
Merge pull request #5610 from plotly/cam/update-doc-prod-v6.8.0
doc: Update docs with v6.8.0 changes
2 parents 99c555b + 8dc3438 commit 0a44827

35 files changed

Lines changed: 872 additions & 312 deletions

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,26 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## Unreleased
66

7+
8+
## [6.8.0] - 2026-06-03
9+
710
### Added
8-
- Add optional `font` parameter for `make_subplots` [[#5393](https://github.com/plotly/plotly.py/pull/5393)]
11+
- Add optional `font` parameter for `make_subplots` [[#5393](https://github.com/plotly/plotly.py/pull/5393)], with thanks to @Zomtir for the contribution!
912

1013
### Fixed
1114
- Fix issue where user-specified `color_continuous_scale` was ignored when template had `autocolorscale=True` [[#5439](https://github.com/plotly/plotly.py/pull/5439)], with thanks to @antonymilne for the contribution!
1215
- Use presence of `COLAB_NOTEBOOK_ID` env var to enable Colab renderer instead of testing import of `google.colab` [[#5473](https://github.com/plotly/plotly.py/pull/5473)], with thanks to @kevineger for the contribution!
16+
- Fix incorrect annotation placement for `add_vline`, `add_hline`, `add_vrect`, and `add_hrect` on datetime axes [[#5508](https://github.com/plotly/plotly.py/pull/5508)], with thanks to @mosh3eb for the contribution!
1317
- Update tests to be compatible with numpy 2.4 [[#5522](https://github.com/plotly/plotly.py/pull/5522)], with thanks to @thunze for the contribution!
14-
- Add default headers to be passed in to Kaleido v1.3.0 to avoid blocked Open Street Map tiles [#5588](https://github.com/plotly/plotly.py/pull/5588)]
18+
- Fix issue where `js/` directory was unintentionally installed as a top-level Python package when installing `plotly` [[#5587](https://github.com/plotly/plotly.py/pull/5587)]
19+
- Add default headers to be passed in to Kaleido v1.3.0 to avoid blocked Open Street Map tiles [[#5588](https://github.com/plotly/plotly.py/pull/5588)]
20+
- Propagate the requested `default_height`/`default_width` to the outer wrapper div produced by `to_html` so that responsive (percentage) dimensions inherit from a sized parent container instead of collapsing to the plotly.js 450px fallback [[#5591](https://github.com/plotly/plotly.py/issues/5591)], with thanks to @SharadhNaidu for the contribution!
1521

1622
### Updated
1723
- The `__eq__` method for `graph_objects` classes now returns `NotImplemented` to give the other operand an opportunity to handle the comparison [[#5547](https://github.com/plotly/plotly.py/pull/5547)], with thanks to @RazerM for the contribution!
24+
- Update plotly.js from version 3.5.0 to version 3.6.0. See the plotly.js [release notes](https://github.com/plotly/plotly.js/releases/tag/v3.6.0) for more information [[#5608](https://github.com/plotly/plotly.py/pull/5608)]. Notable changes include:
25+
- Add support for arrays for the pie property `legendrank`, so that it can be configured per slice [[#7723](https://github.com/plotly/plotly.js/pull/7723)]
26+
- Add `hoversort` layout attribute to sort unified hover label items by value [[#7734](https://github.com/plotly/plotly.js/pull/7734)]
1827

1928
## [6.7.0] - 2026-04-09
2029

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors:
99
- family-names: "Parmer"
1010
given-names: "Chris"
1111
title: "An interactive, open-source, and browser-based graphing library for Python"
12-
version: 6.7.0
12+
version: 6.8.0
1313
doi: 10.5281/zenodo.14503524
14-
date-released: 2026-04-09
14+
date-released: 2026-06-03
1515
url: "https://github.com/plotly/plotly.py"

CONTRIBUTING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,21 @@ python commands.py updateplotlyjs
274274

275275
This downloads new versions of `plot-schema.json` and `plotly.min.js` from the `plotly/plotly.js` GitHub repository
276276
and places them in `plotly/package_data`.
277-
It then regenerates all of the `graph_objs` classes based on the new schema.
277+
It then regenerates all of the `graph_objs` classes based on the new schema,
278+
and finally runs `npm install` in `js/` to refresh `js/package-lock.json` against the new `plotly.js`.
279+
Commit the updated `js/package-lock.json` along with the regenerated files.
280+
281+
The JupyterLab extension and FigureWidget bundles in `plotly/labextension` and `plotly/package_data/widgetbundle.js`
282+
are rebuilt as part of the release flow (see [RELEASE.md](RELEASE.md)) rather than on every plotly.js bump.
283+
284+
If you need to skip the `npm install` step entirely (e.g. `npm` isn't available),
285+
set the `SKIP_NPM=1` environment variable:
286+
287+
```bash
288+
SKIP_NPM=1 python commands.py updateplotlyjs
289+
```
290+
291+
If you do skip it, you'll need to run `npm install` in `js/` yourself before committing so the lockfile stays in sync.
278292

279293
### Using a Development Branch of Plotly.js
280294

@@ -319,6 +333,6 @@ Usage: `python commands.py <subcommand> <args>`
319333
| `codegen [--noformat]` | Regenerate Python files according to `plot-schema.json`.`--noformat` skips formatter step. |
320334
| `lint` | Lint all Python code in `plotly/`. |
321335
| `format` | Format all Python code in `plotly/`. |
322-
| `updateplotlyjs` | Update `plotly.min.js` and `plot-schema.json` to match the `plotly.js` version specified in `js/package.json`. Then, run codegen to regenerate the Python files. |
336+
| `updateplotlyjs` | Update `plotly.min.js` and `plot-schema.json` to match the `plotly.js` version specified in `js/package.json`, run codegen to regenerate the Python files, then run `npm install` in `js/` to refresh `js/package-lock.json`. Set `SKIP_NPM=1` to skip the npm step. |
323337
| `updateplotlyjsdev [--devrepo REPONAME --devbranch BRANCHNAME] \| [--local PATH]` | Update `plot-schema.json` and `plotly.min.js` to match the version in the provided plotly.js repo name and branch name, OR local path. Then, run codegen to regenerate the Python files. |
324338
| `bumpversion X.Y.Z` | Update the plotly.py version number to X.Y.Z across all files where it needs to be updated. |

RELEASE.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ Once these are verified working, you can move on to publishing the release.
110110

111111
### Publishing to PyPI
112112

113-
The final step is to publish the release to PyPI. **You will need special permissions from Plotly leadership to do this.**.
113+
The final step is to publish the release to PyPI. **You will need special permissions from Plotly leadership to do this.**
114114

115-
You must install first install [Twine](https://pypi.org/project/twine/) (`pip install twine`) if not already installed.
115+
You must first install [Twine](https://pypi.org/project/twine/) (`pip install twine`) if not already installed.
116116

117117
Publishing to PyPI:
118118
```bash
@@ -132,10 +132,21 @@ Your account must have permissions to publish to the `plotly` project on PyPI.
132132
start by doing it first if not. Then merge `main` into `doc-prod` to deploy the doc related
133133
to features in the release.
134134
3. in a clone of the [`graphing-library-docs` repo](https://github.com/plotly/graphing-library-docs):
135-
1. bump the version of plotly.py in `_data/pyversion.json`
135+
1. bump the version of plotly.py in `_data/pyversion.json`
136136
2. bump the version of plotly.js with `cd _data && python get_plotschema.py <PLOTLY.JS VERSION>` fixing any errors that come up.
137-
- If plotly.js contains any new traces or trace or layout attributes, you'll get a warning `“missing key in attributes: <attribute-name>`. To resolve, add the attribute to the relevant section in `/_data/orderings.json` in the position you want it to appear in the reference docs.
138-
3. rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`
137+
138+
**About `_data/orderings.json`:** `get_plotschema.py` downloads the raw `plot-schema.json` from the specified plotly.js release and uses `_data/orderings.json` (which lives in `graphing-library-docs`, not plotly.js) to determine the order in which traces, trace attributes, and layout attributes appear in the [reference documentation](https://plotly.com/python/reference/). The file has three sections:
139+
- `layout` — top-level layout attributes (e.g. `hovermode`, `clickmode`, `xaxis`)
140+
- `traces` — order of trace types (e.g. `scatter`, `bar`, `pie`)
141+
- `trace_attr_order` — order of attributes shared across traces
142+
143+
If plotly.js adds new traces or trace/layout attributes that aren't listed in `orderings.json`, `get_plotschema.py` prints a warning like `missing key in attributes: <attribute-name>` and appends the missing entry to the end of its section. To resolve:
144+
145+
- Add each missing attribute to the appropriate section of `/_data/orderings.json` in the position you want it to appear in the reference docs.
146+
- When in doubt about trace-attribute placement, match plotly.js's native order: open the regenerated `_data/plotschema.json` and find where plotly.js itself places the attribute (e.g. inspect a representative trace's `attributes` keys in order). Following the native order keeps related attributes grouped (for example, `texttemplate``texttemplatefallback``texttemplatesrc`).
147+
- For new top-level layout attributes, group them with semantically related entries rather than appending to the end (for example, a new click-behavior attribute like `clickanywhere` belongs next to `clickmode`).
148+
- Re-run `python get_plotschema.py <PLOTLY.JS VERSION>` after editing `orderings.json` and confirm the warnings are gone.
149+
3. Rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`
139150
4. Rebuild the Algolia `python` index with `ALGOLIA_API_KEY=<key> make update_python_search`
140151
5. Commit and push the changes to `master` in that repo
141152

@@ -158,5 +169,5 @@ PyPI RC (no special flags, just the `rc1` suffix):
158169
(plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
159170
```
160171

161-
The `--tag next` part ensures that users won't install this version unless
162-
they explicitly ask for the version or for the version with the `next` tag.
172+
The `rc1` suffix ensures that users won't install this version by default —
173+
they must explicitly request it (e.g., `pip install plotly==X.Y.Zrc1`).

codegen/resources/plot-schema.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3063,6 +3063,17 @@
30633063
"y unified"
30643064
]
30653065
},
3066+
"hoversort": {
3067+
"description": "Determines the order of items shown in unified hover labels. If *trace*, items are sorted by trace index. If *value descending*, items are sorted by value from largest to smallest. If *value ascending*, items are sorted by value from smallest to largest. Only applies when `hovermode` is *x unified* or *y unified*.",
3068+
"dflt": "trace",
3069+
"editType": "none",
3070+
"valType": "enumerated",
3071+
"values": [
3072+
"trace",
3073+
"value descending",
3074+
"value ascending"
3075+
]
3076+
},
30663077
"hoversubplots": {
30673078
"description": "Determines expansion of hover effects to other subplots If *single* just the axis pair of the primary point is included without overlaying subplots. If *overlaying* all subplots using the main axis and occupying the same space are included. If *axis*, also include stacked subplots using the same axis when `hovermode` is set to *x*, *x unified*, *y* or *y unified*.",
30683079
"dflt": "overlaying",
@@ -56775,11 +56786,17 @@
5677556786
}
5677656787
},
5677756788
"legendrank": {
56778-
"description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.",
56789+
"arrayOk": true,
56790+
"description": "Sets the legend rank for this pie. If passed as an array, this will set the legend rank of the individual pie slices. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.",
5677956791
"dflt": 1000,
5678056792
"editType": "style",
5678156793
"valType": "number"
5678256794
},
56795+
"legendranksrc": {
56796+
"description": "Sets the source reference on Chart Studio Cloud for `legendrank`.",
56797+
"editType": "none",
56798+
"valType": "string"
56799+
},
5678356800
"legendsrc": {
5678456801
"description": "Sets the source reference on Chart Studio Cloud for `legend`.",
5678556802
"editType": "none",

commands.py

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,15 @@ def plotly_js_version():
4444
return version
4545

4646

47-
def install_js_deps(local):
48-
"""Install package.json dependencies using npm."""
47+
def install_js_deps(local, build=True):
48+
"""Install package.json dependencies using npm.
49+
50+
When ``build`` is True (the default), also runs ``npm run build`` to
51+
rebuild the JupyterLab extension and FigureWidget bundles and verifies
52+
that the widget bundle exists. Pass ``build=False`` when you only need
53+
to refresh ``node_modules`` / ``package-lock.json`` (e.g. after a
54+
plotly.js version bump) and don't need the bundles rebuilt.
55+
"""
4956

5057
npmName = "npm"
5158
if platform.system() == "Windows":
@@ -86,18 +93,20 @@ def install_js_deps(local):
8693
stdout=sys.stdout,
8794
stderr=sys.stderr,
8895
)
89-
check_call(
90-
[npmName, "run", "build"],
91-
cwd=NODE_ROOT,
92-
stdout=sys.stdout,
93-
stderr=sys.stderr,
94-
)
96+
if build:
97+
check_call(
98+
[npmName, "run", "build"],
99+
cwd=NODE_ROOT,
100+
stdout=sys.stdout,
101+
stderr=sys.stderr,
102+
)
95103
os.utime(NODE_MODULES, None)
96104

97-
for target in WIDGET_TARGETS:
98-
if not os.path.exists(target):
99-
msg = "Missing file: %s" % target
100-
raise ValueError(msg)
105+
if build:
106+
for target in WIDGET_TARGETS:
107+
if not os.path.exists(target):
108+
msg = "Missing file: %s" % target
109+
raise ValueError(msg)
101110

102111

103112
def overwrite_schema_local(uri):
@@ -215,6 +224,7 @@ def update_plotlyjs(plotly_js_version, outdir):
215224
update_bundle(plotly_js_version)
216225
update_schema(plotly_js_version)
217226
perform_codegen(outdir)
227+
install_js_deps(local=None, build=False)
218228

219229

220230
# FIXME: switch to argparse

dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "uv"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
cooldown:
9+
default-days: 3 # Should match tool.uv.exclude-newer option in pyproject.toml

0 commit comments

Comments
 (0)