我有以下条形图,我正在尝试关闭其悬停工具提示:
= bar_chart [["", current_admin.company.progress_to_target_this_month]], colors: [current_admin.company.progress_bar_colour]在他们的主页上,我可以创建一个初始化文件,我已经这样做了:
config/initializers/chartkick.rb
Chartkick.options = {
height: '300px',
colors: ['#b00', '#666'],
discrete: true,
library: {
pointSize: 0,
vAxis: {
points: false,
legend: false,
discrete: true
},
hAxis: {
points: false,
legend: false,
discrete: true,
textPosition: 'none'
},
tooltips: {
enabled: false
}
},
options: {
tooltips: {
enabled: false
}
},
tooltips: {
enabled: false
}
}如果有人有任何建议,我们将不胜感激。
发布于 2017-08-31 02:00:09
从2017年夏季开始,chartkick.js中不支持自定义工具提示。在GitHub存储库中有两个与此相关的未决问题:
发布于 2018-12-18 10:17:49
如果图表不需要任何其他指针事件,那么只需为包含图表的div设置pointer-events: none即可。
https://stackoverflow.com/questions/45965739
复制相似问题