TradingPal / react-native-highcharts

📈 Add Highcharts charts to react-native app for IOS and Android
https://github.com/TradingPal/react-native-highcharts
256 stars 158 forks source link

Chart rendering different each time #61

Open aliceathens opened 6 years ago

aliceathens commented 6 years ago

On first load of my application the chart will render at the correct view. However if i refresh the app it will render weird and almost like its zoomed in... happens on simulator and real device. Please help!!

screen shot 2017-11-27 at 11 12 26 am screen shot 2017-11-27 at 11 12 13 am
salujaharkirat commented 6 years ago

23

NachoJusticia commented 6 years ago

Hi @aliceathens I had the same problem and I solved it passing the following properties to the chart:

import ChartView from 'react-native-highcharts';
...
// declare conf variable
<ChartView style={{ flex: 1, backgroundColor: 'transparent'  }} config={conf} scalesPageToFit={false} automaticallyAdjustContentInsets={false}></ChartView>

I'm adding a Pull Request to this project in order to update the README adding these two properties. I hope this is useful for you 👍

drc37 commented 6 years ago

I am seeing the same thing. The graph component has just been copied and pasted on the same page. This is the exact same just copied and pasted multiple times on the page.

screen shot 2018-03-28 at 11 15 45 am