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

Column graph clipping off ChartView #73

Open shrupa opened 6 years ago

shrupa commented 6 years ago

I'm rendering column graph in a table cell-

    <Bar style={{ flex: 1 }} data={data} />

And the Highcharts bar configuration-

    var conf = {
            chart: {
                type: 'column'
            },
            xAxis: {
                categories: ['1','2','3','4','5','6']
            },
            plotOptions: {
                series: {
                    //pointPadding: 0,
                    //groupPadding: 0,
                    pointWidth: 20
                }
            },
            series: [{
                data: [10,20,-10,30,50,30]
            }]
        };

    return (
            <ChartView style={{ height: 35, width: 150 }} config={conf}></ChartView>
        );

This code renders only 4 columns at a time. The remaining columns show up when I increase the width of ChartView.But problem is there is a lot of empty space between columns that are not going away using pointPadding or groupPadding. screen shot 2018-02-07 at 1 07 43 pm