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

Rendering issue with multiple charts on the same page #80

Closed drc37 closed 5 years ago

drc37 commented 6 years ago

When I put multiple graphs on the same page, the first one renders correctly while the other ones have tiny text. The is the exact same component rendered on the page 3 times. I tried adding the scalesPageToFit={false} to no avail. This is what I have now:

<ChartView
          style={styles.chart}
          config={config[this.props.type]}
          scalesPageToFit={false}
          automaticallyAdjustContentInsets={false}
          />

the bar chart config:

bar: {
        chart: {
          type: 'bar',
          animation: false
        },
        credits: false,
        title: false,
        legend: false,
        exporting: false,
        xAxis: {
          categories: this.props.categories,
          lineColor: colors.lightGray,
          tickWidth: 0,
          labels: {
            style: flattenStyle(styles.xAxis)
          }
        },
        yAxis: {
          title: false,
          gridLineColor: colors.lightGray,
          labels: {
            style: flattenStyle(styles.yAxis)
          }
        },
        series: this.props.data
      },
screen shot 2018-03-28 at 11 15 45 am
drc37 commented 5 years ago

Upgrading to the latest version fixed the issue.