charting-library-examples
charting-library-examples copied to clipboard
Change symbol programatically in react native (or react)
I am creating stock app with using React Native. I want to send some customization value to change chart. For instance, If user clicks Bitcoin or some other coin, I have to display appropriate coin info. Do we have acceptable coin list to validate? Another example should be, I want to display in 1 hour changes as default. If I select 1 week, I should be able to send this value to the TradingView widget.
My real question is how can I send selected value from my source code to the lib?
Thanks!
I would suggest having a read at the documentation website to have a better understand on how the library and the datafeed work.
Do we have acceptable coin list to validate?
That's up to your datafeed. You cold have a function that would target a specific endpoint to return that list. But that's not something TradingView supports.
I want to display in 1 hour changes as default
If you want to set that resolution at the instantiation level that would be a Widget Constructor parameter to set. If that's at a later stage, you could use the setResolution API.