There's a service that returns a promise. You can wait for that promise to resolve before using the APIs directly.
psyogi
@psyogi
ok. I will try to use it like this . thank you Nicholas!
Nicholas Bering
@nbering
That promise also returns the google namespace object, which is handy for mocking. Just stub the methods you're going to use and override the service.
psyogi
@psyogi
It worked! solved my problem. Thanks a lot!
Nicholas Bering
@nbering
No problem at all.
psyogi
@psyogi
and I learnt something that I didnt know :)
Tobias Bohwalli
@futhr
Hi, wonder if anyone know how I display a chart tooltip as a directive, know how to display regular html but unable to get it to work with angular content? Here is sample code: https://codepen.io/futhr/pen/BPeNaJ
Nicholas Bering
@nbering
Chart tooltip HTML is outside Angular scope because it is rendered by Google Chart library.
Your approach might work... but would most likely lead to pain. I think you’d probably be best to use your controller to setup the tooltip content in advance and then feed that as tooltip data with isHtml enabled like most of the Google Charts examples do.
spnshguy
@spnshguy
hi, does anyone know if this is compatible with IE9?
Raghavendra Gautam
@rgautam98
What is the type that we are supposed to keep if we are putting a date?
in the charts
never mind. I got it
it is date
sorry for the stupid question
Nubie here
kkasiviswa
@kkasiviswa
Hi how to add scroll bar in x axis
Nicholas Bering
@nbering
@kkasiviswa There might be one or two chart types that support that. What chart type are you looking at?
There's "explorer" mode, but unfortunately this isn't supported by angular-google-chart because the data binding breaks it. The user-interaction state isn't persisted when the chart is re-drawn.
The next-best thing would be the "annotation chart", but I imagine it will suffer from the same issue.
In the past, I've supported changes to the chart range by implementing it in the Angular code. Since the range changes are implemented from the side that causes the re-draw, instead of the chart's internal state.. it makes the experience a little smoother.