如何删除react-native-chart-kit图表中的某些笔划?

9rygscc1  于 2023-01-27  发布在  React
关注(0)|答案(1)|浏览(90)

我想删除这个图中除了最下面的笔画之外的所有笔画。我试着浏览react-native-svg文档和react-native-chart-kit文档,但是我似乎找不到任何关于它的东西。

<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,
    }}
/>
cngwdvgl

cngwdvgl1#

设置笔划宽度

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

相关问题