Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a subchart clear all or legend remove/ delete method ? #356

Open
Tapanhaz opened this issue May 13, 2024 · 9 comments
Open

Is there a subchart clear all or legend remove/ delete method ? #356

Tapanhaz opened this issue May 13, 2024 · 9 comments

Comments

@Tapanhaz
Copy link

Tapanhaz commented May 13, 2024

Question

Screenshot from 2024-05-13 21-52-15

I didn't found any subchart delete method. So I used same chart objects (previously removed indicator pane). That requires a full cleanup . After all lines, histograms removed, the legend is there . So it will show up twice if I used to show another indicator in the same pane.

We can set the chart height to 0 and proceed with new subchart but I think it will be good if we can fully clean the chart object and reuse it.

Code example

No response

@97-ozzy
Copy link

97-ozzy commented May 14, 2024

bro how you enable toolbox? when i set toolbox to True data doesnt show

@Tapanhaz
Copy link
Author

bro how you enable toolbox? when i set toolbox to True data doesnt show

I didn't faced any such issue. Did your terminal shows any error?

@Anshufi
Copy link

Anshufi commented May 16, 2024

bro can you please tell me which library you used for such a good looking Gui

@Tapanhaz
Copy link
Author

Tapanhaz commented May 16, 2024

bro can you please tell me which library you used for such a good looking Gui

Thanks for the compliment. This was developed using PyQt5.

@Anshufi
Copy link

Anshufi commented May 20, 2024

bro can you please tell me which library you used for such a good looking Gui

Thanks for the compliment. This was developed using PyQt5.

How can I connect with you bro please reply

@P-Lamont
Copy link

Never had this issue using pyqt5. I think that you should keep track of lines and histograms after creation in subchart. Before reusing the subchart, check first if there are remaining lines/histograms. It is also possible that you are passing two columns with the same name to subchart. Other than that I have no idea.

@Tapanhaz
Copy link
Author

Never had this issue using pyqt5. I think that you should keep track of lines and histograms after creation in subchart. Before reusing the subchart, check first if there are remaining lines/histograms. It is also possible that you are passing two columns with the same name to subchart. Other than that I have no idea.

I cann't able to find out where I made the mistake. On release, I cleared lines + histograms (version < 2.0)
Screenshot from 2024-06-11 11-39-06

@P-Lamont
Copy link

P-Lamont commented Jun 11, 2024

data

I used dictionaries to track everything: indicators/subcharts. For every line/histogram created, it is recorded in dictionary. To delete, loop through dictionary. Hide subchart if any. Then delete dictionary key.

I didn't use chart.lines()/chart.histograms() to get the lines/histograms. I think I never had a problem with this from v 1.16 to 1.20. Just upgraded to v2 though

@Tapanhaz
Copy link
Author

data

I used dictionaries to track everything: indicators/subcharts. For every line/histogram created, it is recorded in dictionary. To delete, loop through dictionary. Hide subchart if any. Then delete dictionary key.

I didn't use chart.lines()/chart.histograms() to get the lines/histograms. I think I never had a problem with this from v 1.16 to 1.20. Just upgraded to v2 though

Thanks for the suggestion. Maybe that is the cause. I will try refactoring my code and let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants