hoffstadt / hoffstadt/DearPyGui
When hiding a series by clicking on the legend, `dpg.is_item_shown(series_id)` is not updated
- 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: Ubuntu 20.04
## My Issue/Question
When changing the visibility of a plot series in the legend. The value of `dpg.is_item_shown` is not updated.
If there is any other way of retrieving this information. I would also be fine with that.
## To Reproduce
Steps to reproduce the behavior:
1. Run example code
2. Show and hide the series using the legend
3. See that the printed value is not changed
## Expected behavior
The value of `dpg.is_item_shown` should be updated
## Screenshots/Video
My use case is that I use a `custom_series` alongside a normal series to overlay the hovered point. When the main series is hidden, I would like to hide the custom series.


## Standalone, minimal, complete and verifiable example
```python
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()
with dpg.window(label="tutorial"):
with dpg.plot():
dpg.add_plot_legend()
dpg.add_plot_axis(dpg.mvXAxis)
with dpg.plot_axis(dpg.mvYAxis):
series = dpg.add_line_series([1,2,3], [2,4,5], label="Line 1")
def _(sender, data):
print(f"{dpg.is_item_shown(series)=}")
dpg.set_frame_callback(dpg.get_frame_count() + 200, _)
dpg.set_frame_callback(dpg.get_frame_count() + 200, _)
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```
## Note
I found that when calling `is_item_shown`, it calls: https://github.com/hoffstadt/DearPyGui/blob/138983b073c4e35797457192f80784e190298252/src/dearpygui_commands.h#L3731
Which reads from:
https://github.com/hoffstadt/DearPyGui/blob/138983b073c4e35797457192f80784e190298252/src/mvAppItem.h#L112
The value which is updated by the legend is
https://github.com/epezent/implot/blob/f156599faefe316f7dd20fe6c783bf87c8bb6fd9/implot_internal.h#L940
which can be retrieved with `GetItem` from `implot_internal.h`
If you are open to contribution, I am willing to help. For now I don't know what would be your preferred solution as it seems difficult to update the value of `AppItemConfig` from `ImPlotItem`.
Contributor guide
Assessment
This issue has not been assessed yet.