1
votes

I have an web (PHP) application that collects some internal usage statistics (like memory usage, transfer speed, compression ratio/speed, etc). By using the collected data I want to create a report (a chart, a bar graph, etc) that shows this data.

Usually we have (at least) two options:

  1. write the report with the aid of some PHP reporting engine
  2. use an external web service where (i) I can define a report specification up-front and (ii) feed the web service with the data collected from user and retrieve (an object/image) the report representation of that data.

I'm wondering if I can use the Google Reporting API as in the case 2) above.

Everything I read about Google Reporting API looks like the Reporting API is used in connection with data collected by Google (or pushed to Google), i.e. Google Analytics.

Google has a powerful reporting engine. If I could use it somehow to create custom reports using custom data it will be a big help for my project.

@Edit: may Google Charts be the answer? I will read their specification and I'll come later with my own answer.

1

1 Answers

0
votes

The question was wrong: I didn't meant "report" but "chart". So instead looking toward Google Reporting I should look toward Google Chart. Thus the answer seems now trivial: Google Chart.

Google Chart is rather a client library (eg. JavaScript) than a server library (eg. PHP).

You can plot a chart in less than 5 minutes. All you need is to link the Google's API .js file in your .html source code, create a DataTable (where you should specify the columns and their respective data), set some options for your chart (like the title, the type, the parent DIV element that will encapsulate the final child chart object). Last but not least you have to call the draw method that will plot the chart. That's all folks!