ChartJS - UCL-ShippingGroup/shipviz GitHub Wiki

ChartJS is a easy to use JavaScript library for data visualisation. ShipViz people want to produce different graphs out of the data stored at CartoDB. CartoDB offers only histograms and these are often not enough. ChartJS can work well with data outputted from CartoDB and is easy to use.

I have created a small example to show how to connect from JavaScript to the data stored in our local CartoDB server. It first connects to the CartoDB username "shipviz" and then executes a SQL query using the appropriate SQL API server and MAPS API server URLs. The results of the query are then processed with Javascript and plotted with ChartJS. This example can only be seen correctly in computer that can connect to UCL's CartoDB server:

Find the example here. Note this example has everything in a single HTML file (JS, CSS and HTML), but the proper way of doing things is having those separate and refer to the CSS and JS from the HTML, like in this equivalent example.

Some links for reference: