Closed tylrk closed 1 year ago
These are some issues I don't think I can solve. To my knowledge, there is no way to communicate with the charts after loading them. So unless you keep the symbol in your own states (which is annoying since you are not able to retrieve the chosen symbol from the AdvancedRealTimeChart, there is no way to prevent this. https://github.com/serdimoa/charting/blob/master/Chart-Methods.md states that it is possible, but it seems outdated and is no longer working. I have looked trough the loaded JavaScript -> https://s3.tradingview.com/tv.js -> but I couldnt find a solution there either
Now that I think about it, you could technically get the iframe, retrieve the symbol from the URL and add that as default symbol when changing theme 🤔
Nvm, The URL obviously doesn't change when changing a symbol in the chart itself 😅
Yea, I tried looking through the JS as well, and I tried using various methods to get it to work through state. However, that was quite cumbersome and ended up as a dead end.
I appreciate the response though. This is still a great package. Thanks for putting this all together and sharing it!
Hello. I was wondering if there is any way to keep the chart from reverting to the default stock symbol when I change the theme of the chart. In my following code, when I switch from dark to light mode, my chart reverts back to the AAPL chart. Any help is much appreciated!