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

Cant remove indicators!!! (PyQt5) #1721

Open
XRGYT opened this issue Nov 6, 2024 · 0 comments
Open

Cant remove indicators!!! (PyQt5) #1721

XRGYT opened this issue Nov 6, 2024 · 0 comments

Comments

@XRGYT
Copy link

XRGYT commented Nov 6, 2024

im implementing a lightweight charts into a pyqt5 gui, deleting an indicator doesnt seem to be removing it. like it would stop updating and reacting with price but it was still visually there and wouldnt be removed from the chart, ive tried stuff like this and it doesnt work

Delete each line and update the chart

for indicator_name, line in list(self.indicators.items()):
    line.delete()  # Remove the line from the chart
    logging.debug(f"Deleted indicator: {indicator_name}")

# Clear the indicators dictionary
self.indicators.clear()

# Force an update or re-render of the chart to reflect changes
self.chart.repaint()  # Trigger a repaint if available
self.chart.update()   # Call update() if repaint alone is insufficient
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

1 participant