从 chart.js 图例中删除要点

Remove bullet points from chart.js legend

我按照 this 示例使用 chart.js。

我的图例在每个图例项旁边显示要点,我不知道为什么。出现在多个浏览器中。这是我得到的图像:

我尝试将 "list-style-type: none;" 添加到 css 中,但这对我来说没有任何影响。

有什么想法吗? 下面的 JSFiddle 代码:

**html**
<div style="width: 100%; height: 100%;">
<canvas id="myChart" style="width: 100%; height: auto;"></canvas>
</div>
<div id="js-legend" class="chart-legend"></div>

**js**
var data = [
{
value: 61,
color: "#09355C",
label: "Label 1"
}, {
value: 11,
color: "#CBCBCB",
label: "Label 2"
}, {
value: 28,
color: "#B61B12",
label: "Label 3"
}];

var options = {
segmentShowStroke: false,
animateRotate: true,
animateScale: false,
percentageInnerCutout: 50,
tooltipTemplate: "<%= value %>%"
}

var ctx = document.getElementById("myChart").getContext("2d");
var myChart = new Chart(ctx).Doughnut(data, options);
document.getElementById('js-legend').innerHTML = myChart.generateLegend();

**css**
.chart-legend li span{
display: inline-block;
width: 12px;
height: 12px;
margin-right: 5px;
}

您需要将 list-style-type: none; 添加到 li 元素,例如

.chart-legend li {
    list-style-type: none;
}

您当前的 CSS 规则集目标 .chart-legend li span - 添加 list-style-type: none; 没有帮助。