charting-library-examples icon indicating copy to clipboard operation
charting-library-examples copied to clipboard

Change symbol programatically in react native (or react)

Open jalaliyev opened this issue 1 year ago • 1 comments

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.

Screenshot 2023-11-03 at 11 05 49

My real question is how can I send selected value from my source code to the lib?

Thanks!

jalaliyev avatar Nov 03 '23 07:11 jalaliyev

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.

romfrancois avatar Nov 03 '23 10:11 romfrancois