hoffstadt / hoffstadt/DearPyGui
Double click on a plot does not consider drag points
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## Version of Dear PyGui
Version: 1.8.0
Operating System: Windows 10
## My Issue/Question
Double-click fit function in plots does not consider items such as drag points, drag lines and other elements drawn on it (such as lines and shapes), only actual data series.
## To Reproduce
1. Run the following snippet (this is actually an example from [documentation](https://dearpygui.readthedocs.io/en/latest/documentation/plots.html#drag-points-and-lines) with removed axis limits).
2. Drag the plot so that some of the points are not visible.
3. Left double click - nothing happens.
If a data series is added, plot _will_ be redrawn on double click, but only to include data from the series.
## Expected behavior
On double click plot should be redrawn to show all its children, not just data series.
## Standalone, minimal, complete and verifiable example
```python
import dearpygui.dearpygui as dpg
dpg.create_context()
with dpg.window(label="Tutorial", width=400, height=400):
with dpg.plot(label="Drag Lines/Points", height=-1, width=-1):
dpg.add_plot_legend()
dpg.add_plot_axis(dpg.mvXAxis, label="x")
dpg.add_plot_axis(dpg.mvYAxis, label="y")
# drag lines/points belong to the plot NOT axis
dpg.add_drag_line(label="dline1", color=[255, 0, 0, 255], default_value=2.0)
dpg.add_drag_line(label="dline2", color=[255, 255, 0, 255], vertical=False, default_value=-2)
dpg.add_drag_point(label="dpoint1", color=[255, 0, 255, 255], default_value=(1.0, 1.0))
dpg.add_drag_point(label="dpoint2", color=[255, 0, 255, 255], default_value=(-1.0, 1.0))
dpg.create_viewport(title='Custom Title', width=800, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```
Contributor guide
Assessment
This issue has not been assessed yet.