B4J Tutorial [Server] Google Charts service


Staff member
Licensed User

Online example: http://basic4ppc.com:51042/reports/google_charts.html

Google Charts is a free web service that makes it simple to add many types of nice looking, interactive charts to the web page.

As in the table example, the server is responsible for returning a JSON object with the chart data. The format is explained here: https://developers.google.com/chart/interactive/docs/reference#dataparam

In this case the data is coded inside the handler. So all the handler does is to prepare the JSON response.

The handler code and files are attached. The handler path is "chartsHelper" (you can see it in the html file).