【发布时间】:2021-07-29 17:00:52
【问题描述】:
1.我想在 xAxis 上垂直定位所有日期(每 3 小时 5 天)?
2。我想在屏幕上以 100% 的宽度和 600 像素的高度拉伸图形?
<LineChart width={600} height={200} data={chartData}>
<Line type="monotone" dataKey="temp" stroke="#fc7f03" name="Temperature" unit=" °C"/>
<CartesianGrid stroke="#ccc" strokeDasharray="5 5" />
<XAxis dataKey="date" tick={{fontSize: 10, fill: 'orange'}} tickFormatter={(unixTime) => moment(unixTime).format('DD.MM - HHч.')}/>
<YAxis />
<Tooltip />
</LineChart>
【问题讨论】:
标签: javascript reactjs recharts