问题描述
你好,我正在制作胜利条形图,当我在 y 轴上显示数据时,它给了我所有的数据,而不是我想要的范围。现在数据是这样显示的。enter image description here
但我想要像这样 y 轴上的数据enter image description here
我的代码是
<ScrollView horizontal={true} style={{
width: 500,}}>
<View style={{
flexDirection: 'row',flexWrap: 'wrap',}}>
<Svg width={800} height={280} viewBox="0 0 2300 400" style={{ width: "100%",height: "auto",marginLeft: 10 }}>
<VictoryChart standalone={false}
domainPadding={{ y: 10 }}
width={2000}
height={400}
>
<VictoryBar
animate={{ duration: 500 }}
data={this.state.internalperiodData}
style={{
data: {
fill: data => data.fill,padding: 155,width: 40
},}}
events={[{
target: 'data',eventHandlers: {
}
}]}
/>
</VictoryChart>
</Svg>
<Text style={{ position: 'absolute',left: 0,right: 0,fontWeight: 'bold',top:
290,textAlign: 'center' }}>Daily</Text>
</View>
</ScrollView>
我的回答是enter image description here
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)