ChartJS散点图将最高点和最低点减少了一半

时间:2019-05-07 14:03:10

标签: javascript angular chart.js ng2-charts

当按类别(x轴=时间,y轴=类别)绘制时间散点图时,图形顶部和底部的点被切成两半: screenshot 有办法解决这个问题吗? 我将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,
        },

      }],
    }
  };

0 个答案:

没有答案