我正在尝试为我的反应项目创建一个图形组件。虽然我指定tickAmount
为 10,但它显示了从 1 到 300 的所有数字。它应该只打印 10 个数据点:
this.state = {
// data/:[],
options: {
chart: {
id: "basic-bar"
},
xaxis: {
categories: this.props.options,
interval: 50,
width:1000,
hideOverlappingLabels: true,
tickAmount: 10,
tickPlacement: 'between',
},
},
// options:,
series:this.props.series
};
}
render() {
return (
<React.Fragment>
<Chart
options={this.state.options}
series={this.state.series}
type="area"
width="1000"
/>
</React.Fragment>
)
}
}