Reputation: 4715
I have a Cordova application that I want to add charting to. I want to use Google Charts because they look the best (and free). Anyone had any success using Google Charts on Cordova with the touch interactivity? I saw a few questions posted a few years back that said they didn't work on Android but maybe they have evolved?
Upvotes: 0
Views: 1411
Reputation: 2800
I stumbled across this GitHub repo some time ago while playing with Ionic (which is just another framework on top of Cordova).
https://github.com/saurabhgupta050890/ionic-chart-example
There's examples of how to use multiple chart libraries with AngularJS in Cordova. I'm not sure if this answers your question, but it suggests that it does work (though I haven't personally tried it). The only super big downside to using Google Charts API in this context, as opposed to some of the alternatives, is that you are forced to load them asynchronously from the Google server. This makes offline scenarios impossible. If you are ok with users not being able to view charts while disconnected (for example, if they need to connect to a server to get the data anyway), then this shouldn't be a problem.
As to the question about Touch... Cordova is just a web browser with some fancy native features. Load up the charts examples on your device and see if the charts do what you want them to. I haven't had any complaints from my business users on touch, but there are a few things you can't do the same way you do with a mouse.
Upvotes: 2