indiespirit / react-native-chart-kit

📊React Native Chart Kit: Line Chart, Bezier Line Chart, Progress Ring, Bar chart, Pie chart, Contribution graph (heatmap)
https://expo.io/@indiespirit/react-native-chart-kit
MIT License
2.85k stars 658 forks source link

Bar Chart Y axis Space on left issue #719

Open Vidhun-Coderz opened 8 months ago

Vidhun-Coderz commented 8 months ago

It occupies some space on the left side, but I'm not sure why (see image).Please offer a fix or workaround for this.

Screenshot (82)

` const chartConfig = { backgroundGradientFrom: "#fff", backgroundGradientFromOpacity: 0, backgroundGradientTo: "#fff", backgroundGradientToOpacity: 1, color: () =>config?.primaryClr, strokeWidth: 0, // optional, default 3 barPercentage: .9, useShadowColorFromDataset: false, // optional barRadius:10, labelColor: (opacity = 1) => config?.primaryText, fillShadowGradientTo: config?.primaryClr, fillShadowGradientFrom:config?.primaryClr, fillShadowGradientOpacity: 1, fillShadowGradientFromOpacity:1, fillShadowGradientFromOffset:1, decimalPlaces: 0, // optional, defaults to 2dp // fillShadowGradientToOffset: propsForBackgroundLines: {

  x1:50

}

}; <BarChart style={{backgroundColor:"#000",transform:[{translateX:-0}]}} data={ChartData} width={width - 40} height={225} yAxisSuffix="k" chartConfig={chartConfig} verticalLabelRotation={0} showBarTops={false} showValuesOnTopOfBars={true} withInnerLines={true} fromZero={true} propsForBackgroundLines={{ translateX:40 }}

        />`
khuznain commented 2 months ago

any update one this please ?