hoffstadt / hoffstadt/DearPyGui

Horizontal Drag Line assigned to 2nd/3rd Y-Axis

Open
#1,737 0 comments 0 reactions 0 assignees View on GitHub
state: pending type: improvement
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Unable to assign a horizontal drag line to the 2nd (or 3rd) Y-Axis. The callback values are from the primary Y-Axis.

**Describe the solution you'd like**
Add `yaxis` optional tag parameter. If not set, the drag line uses the primary y-axis, making it consistent with current API. If set, uses the y-axis specified.

```python
dpg.add_drag_line(..., yaxis="my_2ndy_tag", ...)
```

**Describe alternatives you've considered**
One alternative is to calculate the drag line's 2nd Y-Axis intercept by using the primary y-axis value referred to the 2nd y-axis. But this is hard, especially with log axis.

**Additional Context**
Also consider adding `item_deactivated_after_edit_handler` or some sub-set of handlers for (any) drag lines. The value of the drag line could be used in a long running calculation that should only be done when the user is done.

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.