最佳答案
我能够弄清楚这一点。我使用 hidePointsAtIndex
属性实现了这一点。它接受您不想显示的数据点索引数组。
使用示例:
<LineChart
data={data}
width={screenWidth}
height={256}
verticalLabelRotation={30}
chartConfig={chartConfig}
withHorizontalLines={false}
withVerticalLines={false}
bezier
hidePointsAtIndex={chartData.map((item, idx) => ((idx !== showDotIndex) && idx) )}
/>
关于reactjs - 隐藏折线图中的一些点 - react-native-chart-kit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74143551/