ChartJs - 折线图填充与y轴重叠

时间:2016-12-04 09:14:41

标签: charts

正如您在下面的屏幕截图中看到的,我在x和y轴上有一个白色的线条颜色。折线图上的填充颜色与覆盖它的y轴重叠。

我想要的是整个垂直Y轴为白色。有可能吗?

Screenshot of Chart

var ctx = $("#revenue");
        var myChart = new Chart(ctx, {
            type: 'line',
            data: {
        labels: [04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 01, 02, 03, ],
        datasets: [{
          data: [5, 6, 8, 6, 1, 8, 4, 3, 4, 5, 0, 1, 3, 4, 5, 8, 4, 5, 6, 4, 3, 2, 5, 8, 9, 7, 6, 5, 4, 4],
          label: 'Revenue in INR',
          fill: true,
          lineTension: 0.4,
          backgroundColor: '#4dd0e1',
          borderColor: '#FFF',
          borderWidth: 1,
          pointBackgroundColor: '#FFF',
          pointRadius: 1,
          pointBorderWidth: 0
        }]
      },
            options: {
                responsive: true,
                legend: {
                    display: false
                },
                scales: {
                    xAxes: [{
                        gridLines: {
                            display: false,
                            zeroLineColor: '#FFF',
                            color: '#FFF'
                        },
                        ticks: {
                            fontColor: '#FFF'
                        }
                    }],
                    yAxes: [{
                        stacked: true,
                        gridLines: {
                            display: false,
                            color: '#FFF',
                            zeroLineColor: '#FFF'
                        },
                        ticks: {
                            beginAtZero:true,
                            fontColor: '#FFF'
                        }
                    }]
                }
            }
        });

0 个答案:

没有答案