重新绘制 xAxis 坐标

我没有找到有关 Xaxis 坐标的任何信息。在屏幕截图上,我试图根据特定日期拟合所有点,但是,有时点会越过 Xaxis。我的问题是如何了解 Xaxis 长度以对我的点进行一些测量?

http://img.mukewang.com/62899eaa0001c92e13170493.jpg


慕桂英3389331
浏览 112回答 1
1回答

慕尼黑的夜晚无繁华

你的意思是你想确保你的点在轴的范围内?如果是这样,请在 XAxis 中使用填充:&nbsp; &nbsp; &nbsp;<XAxis type="number" dataKey="x" height={40}&nbsp; &nbsp; &nbsp; &nbsp; scale="time" domain={xDomain}&nbsp; &nbsp; &nbsp; &nbsp; padding={{ left: 10, right: 10 }}&nbsp; &nbsp; &nbsp; &nbsp; tick={{ fontFamily: 'sans-serif', fontSize: '0.8rem' }}&nbsp; &nbsp; &nbsp; &nbsp; tickFormatter={props.xTickFormater}&nbsp; &nbsp; &nbsp;>这就是我将酒吧保持在“内部”的方式。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript