tradingview / charting-library-examples

Examples of Charting Library integrations with other libraries, frameworks and data transports
MIT License
1.32k stars 744 forks source link

Responsiveness not working in React-JS example #345

Open vinayak-ventura opened 1 year ago

vinayak-ventura commented 1 year ago

When I run the react-javascript example, its not adapting as per the screen size. SS given below for reference

To Reproduce

Steps to reproduce the behavior:

  1. Clone the repo
  2. Go to 'react-javascript' folder
  3. Run command - npm install | npm start

Expected behavior Chart should adapt as per the screen size

Screenshots

image

romfrancois commented 1 year ago

Hi @vinayak-ventura !

Are you by any chance testing on a real device or is it coming from the browser emulation?

vinayak-ventura commented 1 year ago

hey @romfrancois tried on both, its not adapting, mobile SS attached for your ref IMG_4039

romfrancois commented 1 year ago

What's not working on the attached screenshot?

The reason I was asking if you were checking on the dev tools emulating a device and especially an iOS device, Chrome/Chromium doesn't render it properly and it displays some elements such as the price scale on the right hand side by truncating the numbers.

vinayak-ventura commented 1 year ago

the screenshot is taken from real mobile device(iPhone 13), its not responsive, its loading as if its a desktop site. @romfrancois

vinayak-ventura commented 1 year ago

hey @romfrancois it worked when I added the following line to my index.html <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">