hoffstadt / hoffstadt/DearPyGui
drop_callback not working for 2nd and more axis since version 2.0.0 (working with 1.10.1)
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## Version of Dear PyGui
Version: 2.0.0
Operating System: Windows 11
## My Issue/Question
When using multiple axis on a plot. The drop_callback is not working for 2nd and more axis since version 2.0.0 (working with 1.10.1)
## To Reproduce
Simply put two axis with callback, drag an item into it. The 2nd axis isn't going yellow and no callback are call.
## Expected behavior
Same script was working well with drop back with 1.10.1
## Screenshots/Video
## Standalone, minimal, complete and verifiable example
def new_axis_drop_callback(y: str):
def _callback(_s, app_data, _u):
dpg.add_text('new axis', indent=10, parent="Console")
ds: DataTable = app_data["dragged_data"]
if dpg.does_item_exist(ds.formatted_key):
return
if ds in {TimeseriesDataTables.FRINGE_EDGES}:
add_stem_series(ds, y)
else:
add_line_series(ds, y)
return _callback
with dpg.plot(
drop_callback=plot_drop, payload_type="plotting", width=-1, height=-1, tag="log view",
):
dpg.add_plot_legend(payload_type="plotting")
dpg.add_plot_axis(dpg.mvXAxis, tag="x_axis", label="t")
dpg.add_plot_axis(
dpg.mvYAxis,
tag="y1_axis",
label="y1",
drop_callback=new_axis_drop_callback("y1_axis"),
payload_type="plotting",
)
dpg.add_plot_axis(
dpg.mvYAxis,
tag="y2_axis",
label="y2",
drop_callback=new_axis_drop_callback("y2_axis"),
payload_type="plotting",
)
dpg.add_plot_axis(
dpg.mvYAxis,
tag="y3_axis",
label="y3",
drop_callback=new_axis_drop_callback("y3_axis"),
payload_type="plotting",
)
Contributor guide
Assessment
This issue has not been assessed yet.