我有一个看起来像这样的水平条形图:
...但是当我将它悬停时就像这样:
我试图阻止“悬停数据”显示如下:
var priceBarChart = new Chart(ctxBarChart, {
type: 'horizontalBar',
showTooltips: false,
data: barChartData,
options: optionsBar
});
...像这样:
var optionsBar = {
scales: {
xAxes: [
{
stacked: true
}
],
yAxes: [
{
stacked: true
}
]
},
showTooltips: false
};
...但两者都不起作用 - 无论如何都会显示皱缩的尖端。
如何防止悬停数据显示在 Chart.JS 中?