How can I remove certain strokes in the react-native-chart-kit graph?

404 Views Asked by At

I want to remove all the strokes from this graph except the bottom one. I've tried going through the react-native-svg documentation and through the react-native-chart-kit documentation but I can't seem to find anything about it. The graph:

The graph

<StackedBarChart
    data={{
        labels: ["S", "M", "T", "W", "Th", "F", "S"],
        legend: ["L1", "L2"],
        data: data,
        barColors: ["#3d9e20", "#b21b1b", "#ffba00"]
    }}
    width={Dimensions.get("window").width * 0.8} // from react-native
    height={220}
    hideLegend={true}
    withHorizontalLabels={true}
    chartConfig={{
        backgroundGradientFrom: "#422692",
        backgroundGradientTo: "#422692",
        color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
        labelColor: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
        style: {
            borderRadius: 16,
        },
        propsForBackgroundLines: {
            strokeWidth: 5,
            strokeDasharray: [],
        },
        propsForVerticalLabels: {
            fontSize: 20,
            dx: -7.4
        },
    }}
    style={{
        borderRadius: 16,
    }}
/>
1

There are 1 best solutions below

0
On

Set strokeWidth

propsForBackgroundLines: {
  strokeDasharray: "",
  strokeWidth: 0,
},