B. *_*non 0 jquery tooltip hover chart.js chart.js2
我有一个看起来像这样的水平条形图:
......但是当我将它悬停时,就像这样:
我试图阻止"悬停数据"显示如下:
var priceBarChart = new Chart(ctxBarChart, {
type: 'horizontalBar',
showTooltips: false,
data: barChartData,
options: optionsBar
});
Run Code Online (Sandbox Code Playgroud)
......并且像这样:
var optionsBar = {
scales: {
xAxes: [
{
stacked: true
}
],
yAxes: [
{
stacked: true
}
]
},
showTooltips: false
};
Run Code Online (Sandbox Code Playgroud)
...但是都不起作用 - 无论如何都会显示碾压的尖端.
如何防止悬停数据显示在Chart.JS中?
2022年回答:
options: {
plugins: {
tooltip: {
enabled: false
},
}
},
Run Code Online (Sandbox Code Playgroud)
Charts.js 上的文档位于此处
| 归档时间: |
|
| 查看次数: |
2392 次 |
| 最近记录: |