0

是否可以只显示折线图中的点?我有这个基本的折线图,我想隐藏它的线条和填充,所以它只显示点。

这是我的代码:

var renChart = new Chart($('#ren-chart'), {
  type: 'line',
  data: {
    labels: ren_labels,
    datasets: [{
      label: 'Renovation',
      data: ren_data,
      backgroundColor: 'rgba(244, 81, 30, 0.5)',
      borderColor: 'rgba(244, 81, 30, 0.8)',
      pointBackgroundColor: 'rgba(244, 81, 30, 0.5)',
      pointBorderColor: 'rgba(244, 81, 30, 0.8)',
      pointRadius: 5
    }]
  },
  options: {
    scales: {
      yAxes: [{
        ticks: {
          beginAtZero: true,
          stepSize: 20
        }
      }]
    }
  }
});

对此的任何帮助表示赞赏。提前致谢。

4

1 回答 1

0
于 2017-09-19T19:04:40.213 回答