• Google Charts API
    2 replies, posted
Has anyone had any experience with Google Charts? It's a lot of fun to mess around with, but I'm having some issues with data organization. Basically what I'm trying to do is grab some metrics from Google Analytics API and chart them on a google chart. The two metrics I'm comparing right now are Bounce Rate vs Visits. The problem with this is that one is a percentage and the other is an integer. When I go to Google Analytics (google.com/analytics), and map those two metrics, Google Charts seems to find a nice way of charting a percentage and a very high integer on the same axis without re-evaluating the Y-Axis values. In fact, the Y-Axis values on Google Analytics when charting these two data types are all percentages, but the tooltip still shows the correct integer value of visits. SO, my question is, how do I do this?! My datatable looks like this: [code] data[6] = new google.visualization.DataTable(); data[6].addColumn('string', 'Date'); data[6].addColumn('number', 'Bounce Rate'); data[6].addColumn('number', 'Visits'); data[6].addRow(['Oct-28', 67.3, 1046]); data[6].addRow(['Oct-29', 67.89, 1062]); data[6].addRow(['Oct-30', 66.73, 992]); data[6].addRow(['Oct-31', 69.91, 977]); data[6].addRow(['Nov-01', 69.56, 887]); [/code] As you can see, my chart is very unbalanced, and ends up with the Bounce Rate looking like a flat line on the bottom. Is my best bet to just take the Bounce integer value and compare that against the # of visits? How did Google pull this off in their chart in Google Analytics?
It's not really the answer you are looking for, but I have found google charts to be somewhat constrained. Try DevExpress Chart.js. It's far more extensible and much more developer-friendly imo.
These DevExpress charts look bulky. It also looks like you have to pay for the framework? I'm pretty sure they're also generated as images, which doesn't necessarily help for rollover events and tooltips. In fact, I'm confident Google Charts is a much better choice and more developer-friendly. I appreciate the suggestion though. I think?
Sorry, you need to Log In to post a reply to this thread.