不知道如何使用http://recharts.org/设置Y轴的范围
希望Y轴在其范围内显示100,而不是当前的60.
Belive code example is not needed or fill purpose in this specific case
不知道如何使用http://recharts.org/设置Y轴的范围
希望Y轴在其范围内显示100,而不是当前的60.
Belive code example is not needed or fill purpose in this specific case
在YAxis组件上,将域值设置为0到YAxis(或任何你想要的值)
<YAxis type="number" domain={[0, 20000]}/>
判断一下这把小提琴
Domain
当轴是数字轴时,指定轴的域.长度
FORMAT:
<YAxis type="number" domain={['dataMin', 'dataMax']} />
<YAxis type="number" domain={[0, 'dataMax']} />
<YAxis type="number" domain={['auto', 'auto']} />
<YAxis type="number" domain={[0, 'dataMax + 1000']} />
<YAxis type="number" domain={['dataMin - 100', 'dataMax + 100']} />
<YAxis type="number" domain={[dataMin => (0 - Math.abs(dataMin)), dataMax => (dataMax * 2)]} />