【问题标题】:Remove chartjs pie chart highlight on hover删除悬停时的chartjs饼图突出显示
【发布时间】:2021-03-26 12:54:30
【问题描述】:

enter image description here

当我将鼠标悬停在图表上方时,它会用灰色边框突出显示我悬停在上面的部分。我该怎么做才能删除它。

【问题讨论】:

    标签: chart.js pie-chart


    【解决方案1】:

    您可以使用hoverBorderWidth 属性来移除悬停时的边框,如下所示:

    var myDoughnutChart = new Chart(ctx, {
        type: 'doughnut',
        data: {
          datasets: [
            data: [//data here],
            hoverBorderWidth: 0
          ]
        },
        options: options
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-04
      • 2012-05-13
      相关资源
      最近更新 更多