Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
083b847
Fix to_html responsive height by styling outer wrapper div
SharadhNaidu May 15, 2026
c42261a
add dependabot config for updating uv.lock
emilykl May 15, 2026
480a531
weekly cadence
emilykl May 15, 2026
af8e14b
Don't use matplotlib internal API _major_tick_kw
timhoffm May 17, 2026
2f7ed14
docs: Update release, docs readme files with info, corrections
camdecoster May 18, 2026
9efa19c
Merge pull request #5597 from plotly/dependabot-uv-lock
emilykl May 19, 2026
913be14
Address PR feedback
camdecoster May 19, 2026
92aea8b
Merge pull request #5599 from plotly/cam/update-md-files
camdecoster May 19, 2026
dc6c302
Merge pull request #5598 from timhoffm/tick-params
camdecoster May 21, 2026
00b9b7e
Update test_div_output to allow inline style on outer wrapper
SharadhNaidu May 30, 2026
1c5a080
Merge branch 'main' into fix-5591-responsive-html-height
SharadhNaidu May 30, 2026
7212aa1
Update test per `to_html` changes
camdecoster Jun 1, 2026
2333a91
Update CHANGELOG.md
camdecoster Jun 1, 2026
43bc90f
Merge pull request #5596 from SharadhNaidu/fix-5591-responsive-html-h…
camdecoster Jun 1, 2026
f2bb95c
ci: Pin python-frontmatter to keep Python 3.9 compatibility
camdecoster Jun 1, 2026
f0755e5
Merge pull request #5605 from plotly/cam/pin-python-frontmatter
camdecoster Jun 1, 2026
8f699a3
chore: Update plotly.js to v3.6.0
camdecoster Jun 3, 2026
1f26820
Update lock file
camdecoster Jun 3, 2026
f57cf96
Update command to run `npm install` for `updateplotlyjs`
camdecoster Jun 3, 2026
7f2eb35
Merge pull request #5608 from plotly/cam/update-plotly.js-3.6.0
camdecoster Jun 3, 2026
f94e304
Version changes for v6.8.0
camdecoster Jun 3, 2026
2de1059
Update docs for release
camdecoster Jun 3, 2026
b8c2bf4
Update Jupyter Lab extension files
camdecoster Jun 3, 2026
e57adbd
Fix broken example
camdecoster Jun 3, 2026
ea4eca8
Address PR feedback
camdecoster Jun 3, 2026
010e298
Merge pull request #5609 from plotly/release-6.8.0
camdecoster Jun 3, 2026
c6fa17b
Merge remote-tracking branch 'origin/main' into cam/update-doc-prod-v…
camdecoster Jun 3, 2026
f92771a
Update version references
camdecoster Jun 3, 2026
b9e10b1
ci: Exempt plotly.py from exclude-newer rule
camdecoster Jun 3, 2026
0c5becf
Update lock file
camdecoster Jun 3, 2026
2a91b77
Merge pull request #5612 from plotly/cam/5611/exempt-plotly.py-exclud…
camdecoster Jun 3, 2026
8dc3438
Merge remote-tracking branch 'origin/main' into cam/update-doc-prod-v…
camdecoster Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,26 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased


## [6.8.0] - 2026-06-03

### Added
- Add optional `font` parameter for `make_subplots` [[#5393](https://github.com/plotly/plotly.py/pull/5393)]
- Add optional `font` parameter for `make_subplots` [[#5393](https://github.com/plotly/plotly.py/pull/5393)], with thanks to @Zomtir for the contribution!

### Fixed
- 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!
- 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!
- 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!
- 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!
- 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)]
- 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)]
- 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)]
- 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!

### Updated
- 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!
- 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:
- 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)]
- Add `hoversort` layout attribute to sort unified hover label items by value [[#7734](https://github.com/plotly/plotly.js/pull/7734)]

## [6.7.0] - 2026-04-09

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors:
- family-names: "Parmer"
given-names: "Chris"
title: "An interactive, open-source, and browser-based graphing library for Python"
version: 6.7.0
version: 6.8.0
doi: 10.5281/zenodo.14503524
date-released: 2026-04-09
date-released: 2026-06-03
url: "https://github.com/plotly/plotly.py"
18 changes: 16 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,21 @@ python commands.py updateplotlyjs

This downloads new versions of `plot-schema.json` and `plotly.min.js` from the `plotly/plotly.js` GitHub repository
and places them in `plotly/package_data`.
It then regenerates all of the `graph_objs` classes based on the new schema.
It then regenerates all of the `graph_objs` classes based on the new schema,
and finally runs `npm install` in `js/` to refresh `js/package-lock.json` against the new `plotly.js`.
Commit the updated `js/package-lock.json` along with the regenerated files.

The JupyterLab extension and FigureWidget bundles in `plotly/labextension` and `plotly/package_data/widgetbundle.js`
are rebuilt as part of the release flow (see [RELEASE.md](RELEASE.md)) rather than on every plotly.js bump.

If you need to skip the `npm install` step entirely (e.g. `npm` isn't available),
set the `SKIP_NPM=1` environment variable:

```bash
SKIP_NPM=1 python commands.py updateplotlyjs
```

If you do skip it, you'll need to run `npm install` in `js/` yourself before committing so the lockfile stays in sync.

### Using a Development Branch of Plotly.js

Expand Down Expand Up @@ -319,6 +333,6 @@ Usage: `python commands.py <subcommand> <args>`
| `codegen [--noformat]` | Regenerate Python files according to `plot-schema.json`.`--noformat` skips formatter step. |
| `lint` | Lint all Python code in `plotly/`. |
| `format` | Format all Python code in `plotly/`. |
| `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. |
| `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. |
| `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. |
| `bumpversion X.Y.Z` | Update the plotly.py version number to X.Y.Z across all files where it needs to be updated. |
25 changes: 18 additions & 7 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Once these are verified working, you can move on to publishing the release.

### Publishing to PyPI

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

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

Publishing to PyPI:
```bash
Expand All @@ -132,10 +132,21 @@ Your account must have permissions to publish to the `plotly` project on PyPI.
start by doing it first if not. Then merge `main` into `doc-prod` to deploy the doc related
to features in the release.
3. in a clone of the [`graphing-library-docs` repo](https://github.com/plotly/graphing-library-docs):
1. bump the version of plotly.py in `_data/pyversion.json`
1. bump the version of plotly.py in `_data/pyversion.json`
2. bump the version of plotly.js with `cd _data && python get_plotschema.py <PLOTLY.JS VERSION>` fixing any errors that come up.
- 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.
3. rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`

**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:
- `layout` — top-level layout attributes (e.g. `hovermode`, `clickmode`, `xaxis`)
- `traces` — order of trace types (e.g. `scatter`, `bar`, `pie`)
- `trace_attr_order` — order of attributes shared across traces

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:

- Add each missing attribute to the appropriate section of `/_data/orderings.json` in the position you want it to appear in the reference docs.
- 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`).
- 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`).
- Re-run `python get_plotschema.py <PLOTLY.JS VERSION>` after editing `orderings.json` and confirm the warnings are gone.
3. Rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`
4. Rebuild the Algolia `python` index with `ALGOLIA_API_KEY=<key> make update_python_search`
5. Commit and push the changes to `master` in that repo

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

The `--tag next` part ensures that users won't install this version unless
they explicitly ask for the version or for the version with the `next` tag.
The `rc1` suffix ensures that users won't install this version by default —
they must explicitly request it (e.g., `pip install plotly==X.Y.Zrc1`).
19 changes: 18 additions & 1 deletion codegen/resources/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3063,6 +3063,17 @@
"y unified"
]
},
"hoversort": {
"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*.",
"dflt": "trace",
"editType": "none",
"valType": "enumerated",
"values": [
"trace",
"value descending",
"value ascending"
]
},
"hoversubplots": {
"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*.",
"dflt": "overlaying",
Expand Down Expand Up @@ -56775,11 +56786,17 @@
}
},
"legendrank": {
"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.",
"arrayOk": true,
"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.",
"dflt": 1000,
"editType": "style",
"valType": "number"
},
"legendranksrc": {
"description": "Sets the source reference on Chart Studio Cloud for `legendrank`.",
"editType": "none",
"valType": "string"
},
"legendsrc": {
"description": "Sets the source reference on Chart Studio Cloud for `legend`.",
"editType": "none",
Expand Down
34 changes: 22 additions & 12 deletions commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,15 @@ def plotly_js_version():
return version


def install_js_deps(local):
"""Install package.json dependencies using npm."""
def install_js_deps(local, build=True):
"""Install package.json dependencies using npm.

When ``build`` is True (the default), also runs ``npm run build`` to
rebuild the JupyterLab extension and FigureWidget bundles and verifies
that the widget bundle exists. Pass ``build=False`` when you only need
to refresh ``node_modules`` / ``package-lock.json`` (e.g. after a
plotly.js version bump) and don't need the bundles rebuilt.
"""

npmName = "npm"
if platform.system() == "Windows":
Expand Down Expand Up @@ -86,18 +93,20 @@ def install_js_deps(local):
stdout=sys.stdout,
stderr=sys.stderr,
)
check_call(
[npmName, "run", "build"],
cwd=NODE_ROOT,
stdout=sys.stdout,
stderr=sys.stderr,
)
if build:
check_call(
[npmName, "run", "build"],
cwd=NODE_ROOT,
stdout=sys.stdout,
stderr=sys.stderr,
)
os.utime(NODE_MODULES, None)

for target in WIDGET_TARGETS:
if not os.path.exists(target):
msg = "Missing file: %s" % target
raise ValueError(msg)
if build:
for target in WIDGET_TARGETS:
if not os.path.exists(target):
msg = "Missing file: %s" % target
raise ValueError(msg)


def overwrite_schema_local(uri):
Expand Down Expand Up @@ -215,6 +224,7 @@ def update_plotlyjs(plotly_js_version, outdir):
update_bundle(plotly_js_version)
update_schema(plotly_js_version)
perform_codegen(outdir)
install_js_deps(local=None, build=False)


# FIXME: switch to argparse
Expand Down
9 changes: 9 additions & 0 deletions dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

updates:
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 3 # Should match tool.uv.exclude-newer option in pyproject.toml
Loading
Loading