Javascript Chartjs无边框条形图

Javascript Chartjs无边框条形图,javascript,chart.js,Javascript,Chart.js,我试图用chartjs构建一个条形图,相邻的条形图之间应该没有空间。我的问题是,我没有摆脱酒吧之间的边界: 这是我的配置: new Chart($('#weekly-availabilities-chart'), { type: 'bar', data: { labels: ..., datasets: [ { backgroundColor: 'rgba(153, 193, 72, 0.4)', label: 'label a',

我试图用chartjs构建一个条形图,相邻的条形图之间应该没有空间。我的问题是,我没有摆脱酒吧之间的边界:

这是我的配置:

new Chart($('#weekly-availabilities-chart'), {
  type: 'bar',
  data: {
  labels: ...,
  datasets: [
    {
      backgroundColor: 'rgba(153, 193, 72, 0.4)',
      label: 'label a',
      borderWidth: 0,
      data: dataset_1
    }, {
      backgroundColor: 'rgba(13, 39, 73, 0.4)',
      label: 'label b',
      borderWidth: 0,
      data: dataset_2
    }
  ]
},
  options: {
  scales: {
    xAxes: [
      {
        barPercentage: 1,
        categoryPercentage: 1,
        gridLines: {
          display: false
        }
      }
    ],
    yAxes: [
      {
        stacked: true,
        gridLines: {
          color: 'rgba(0,0,0,0.05)'
        },
        ticks: {
          beginAtZero: true,
          max: 40
        }
      }
    ]
  }
}
});
在数据集中使用

datasets: [
  {
    backgroundColor: 'rgba(153, 193, 72, 0.4)',
    label: 'label a',
    data: dataset_1,
    borderWidth: 0
  }, {
    backgroundColor: 'rgba(13, 39, 73, 0.4)',
    label: 'label b',
    data: dataset_2,
    borderWidth: 0
  }
]
在数据集中使用

datasets: [
  {
    backgroundColor: 'rgba(153, 193, 72, 0.4)',
    label: 'label a',
    data: dataset_1,
    borderWidth: 0
  }, {
    backgroundColor: 'rgba(13, 39, 73, 0.4)',
    label: 'label b',
    data: dataset_2,
    borderWidth: 0
  }
]

我试过了,但没有效果。我会更新我的问题,包括这个选项。你找到解决方案了吗?我试过了,但没有任何效果。我将更新包含此选项的问题。您找到解决方案了吗?检查此检查此