当按类别(x轴=时间,y轴=类别)绘制时间散点图时,图形顶部和底部的点被切成两半:
有办法解决这个问题吗?
我将ChartJS与Angular 6和ng2-charts包装器一起使用。这是我的选项对象:
public scatterChartOptions: ChartOptions = {
responsive: true,
maintainAspectRatio: false,
tooltips: {
enabled: true
},
legend: {
display: false
},
scales: {
xAxes: [{
type: 'time',
time: {
unit: 'hour',
min: this.minDate.toISOString(),
max: this.maxDate.toISOString()
},
display: true,
ticks:{
padding: 50
}
}],
yAxes: [{
display: true,
type: 'category',
gridLines: {
display:true,
},
}],
}
};