react-native-chart-kit icon indicating copy to clipboard operation
react-native-chart-kit copied to clipboard

How to remove the spacing between the bars in BarChart?

Open tavareshenrique opened this issue 3 years ago • 1 comments

Screenshot_20210525_112456

My code:

<BarChart
      data={data}
      width={Dimensions.get('window').width}
      height={220}
      showValuesOnTopOfBars
      yAxisSuffix=""
      segments={3}
      style={{
        borderRadius: 24,
        marginVertical: 16,
        paddingRight: 72,
        paddingHorizontal: 16,
      }}
      chartConfig={{
        backgroundColor: colors.red,
        backgroundGradientFrom: colors.red,
        fillShadowGradient: colors.white,
        fillShadowGradientOpacity: 1,
        backgroundGradientTo: colors.red,
        decimalPlaces: 2,
        color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
        data: data.datasets,
        backgroundGradientFromOpacity: 75,
        backgroundGradientToOpacity: 30,
        propsForLabels: {
          fontSize: '11',
        },
        propsForBackgroundLines: {
          strokeDasharray: '',
        },
      }}
    />

tavareshenrique avatar May 25 '21 14:05 tavareshenrique

any solution ??

Tushar321321 avatar Sep 21 '22 12:09 Tushar321321