holoviz / holoviz/hvplot

Support active_tools argument

Open
#909 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

## Request

Add `active_tools` to `hvplot`.

## Motivation

Motivated by working on https://discourse.holoviz.org/t/bi-dashboard-with-easy-crossfiltering-also-of-categorical-data/4263/2 I need the `box_select` to be the `active_tool`. But hvPlot only exposes the `tools` not the `active_tool`.

You can set the `active_tools` via `.opts` as shown below.

I believe this is inconsistent. And it was also confusing to me.

```python
import plotly.express as px

import hvplot.pandas

df = px.data.tips()

print("hvplot")
df.hvplot.scatter(x="total_bill", y="tip", tools=["box_select"], active_tools=["box_select"])
print("holoviews opts")
df.hvplot.scatter(x="total_bill", y="tip", tools=["box_select"]).opts(active_tools=["box_select"])
```

```bash
$ python script.py
python 'script2.py'
hvplot
WARNING:param.main: active_tools option not found for scatter plot with bokeh; similar options include: []
holoviews opts
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.