Skip to content

Commit ea4eca8

Browse files
committed
Address PR feedback
1 parent e57adbd commit ea4eca8

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1515
- 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!
1616
- 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!
1717
- 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!
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)]
1819
- 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)]
1920
- 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!
2021

2122
### Updated
2223
- 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!
23-
- Migrate build backend from setuptools to hatchling [[#5540](https://github.com/plotly/plotly.py/pull/5540)]. As part of this change, the `js/` directory is no longer installed as a top-level Python package.
2424
- 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:
2525
- 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)]
2626
- Add `hoversort` layout attribute to sort unified hover label items by value [[#7734](https://github.com/plotly/plotly.js/pull/7734)]

doc/python/hover-text-and-formatting.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -243,19 +243,9 @@ fig.show()
243243

244244
*New in 6.7*
245245

246-
By default, hover and click events are only emitted when the cursor is over a trace. Set `layout.hoveranywhere=True` or `layout.clickanywhere=True` to emit these events anywhere inside the plot area, including over empty space. The events carry the cursor's data coordinates, which is useful when building interactive callbacks (for example, in [Dash](https://dash.plotly.com/)) that need to respond to clicks on locations that don't correspond to a specific data point.
246+
By default, hover and click events are only emitted when the cursor is over a trace. Set `hoveranywhere` or `clickanywhere` to `True` to emit these events anywhere inside the plot area, including over empty space: `fig.update_layout(hoveranywhere=True, clickanywhere=True)`. The events carry the cursor's data coordinates, which is useful when building interactive callbacks (for example, in [Dash](https://dash.plotly.com/)) that need to respond to clicks on locations that don't correspond to a specific data point.
247247

248-
```python
249-
import plotly.express as px
250-
251-
df = px.data.iris()
252-
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species")
253-
fig.update_layout(hoveranywhere=True, clickanywhere=True)
254-
255-
fig.show()
256-
```
257-
258-
### Customizing Hover text with Plotly Express
248+
### Customizing Hover Text with Plotly Express
259249

260250
Plotly Express functions automatically add all the data being plotted (x, y, color etc) to the hover label. Many Plotly Express functions also support configurable hover text. The `hover_data` argument accepts a list of column names to be added to the hover tooltip, or a dictionary for advanced formatting (see the next section). The `hover_name` property controls which column is displayed in bold as the tooltip title.
261251

0 commit comments

Comments
 (0)