I am working with google line charts and angularjs directive in my project, I am searching how to get vertical lines on hover like Google Trends instead put a fixed lines, but I can't find how to do this.
This is that I want trying to do:
I just got hide vertical lines but not show on mouse hover, this is my options for angular-google-chart directive
options: {
vAxis: {
title: 'My title',
gridlines: {
count: 10
}
},
hAxis: {
title: 'title hAxis',
gridlines: {
color: 'transparent'
}
}
}
there are no standard config options for this, but you could add your own line on hover...
see following working snippet for an example...
Thanks to @WhiteHat in his previous answer, I have adjusted his code to use it with angular-google-charts in an angular 1.5 component, this is my approach:
Angular-google-charts have some directives to attach custom events like mouseover, mouseout, ready etc, Example:
If you can see, I have added agc-on-ready, agc-on-mouseover and agc-on-mouseout this directives allow me to attach my custom functions to these events.
Using @WhiteHat solutions my functions are here:
I hope you find it useful and your comments to improve this implementation.