我在我的项目中使用谷歌折线图和 angularjs 指令,我正在搜索如何在悬停时获得垂直线,如 Google Trends而是放一条固定的线,但我找不到怎么做。
这是我想尝试做的:
我只是隐藏了垂直线,但在鼠标悬停时不显示,这是我对 angular-google-chart 指令的选项
options: {
vAxis: {
title: 'My title',
gridlines: {
count: 10
}
},
hAxis: {
title: 'title hAxis',
gridlines: {
color: 'transparent'
}
}
}
最佳答案
现在可以通过标准配置选项使用十字准线:
https://developers.google.com/chart/interactive/docs/crosshairs
您案例的示例配置:
crosshair: {orientation: 'vertical', trigger: 'focus'}
关于javascript - 悬停在谷歌图表中的垂直线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42350656/