react-native-highcharts icon indicating copy to clipboard operation
react-native-highcharts copied to clipboard

Chart rendering different each time

Open aliceathens opened this issue 8 years ago • 3 comments

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

aliceathens avatar Nov 27 '17 00:11 aliceathens

#23

salujaharkirat avatar Dec 27 '17 08:12 salujaharkirat

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

  • scalesPageToFit to false
  • automaticallyAdjustContentInsets to false
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 👍

NachoJusticia avatar Jan 15 '18 21:01 NachoJusticia

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

drc37 avatar Mar 28 '18 17:03 drc37