lundi 28 mars 2016

Using node.js and sqlite3 to generate charts

I'm running a node.js server on my beaglebone that displays the readings of a light and temperature sensor to an html file. I've installed sqlite3 and I can create/query a simple database but I'm a bit confused on how to implement a chart feature.

Essentially I want to write each temperature reading to the database and allow the user to query the database and generate a chart through the website. I'm wondering if it is possible to create the query on the server side, put the values returned into an object and send it to the client where it can be used to generate the charts via highcharts or Google charts.

Would it be better to query the database from the client if that is possible?

Aucun commentaire:

Enregistrer un commentaire