jxmot / sensornet_chart

A charting application for viewing SensorNet data
MIT License
0 stars 1 forks source link

SensorNet Chart

An application that is part of the SensorNet project. It retrieves sensor data from the SensorNet server and creates graphs using Apex Charts.

Background

I've been running SensorNet in my home for about 3 years and collecting all the sensor data. For charting the data I had been exporting it from the database and importing the data into a spreadsheet. And then graphing it there. Not ideal, but it did what I needed.

Every so often I would search for a JavaScript charting plugin that I could use successfully. I won't bore you with the details of every plugin I investigated. But I did write testing code for each as part of their evaluation.

Dependencies

This client requires the following:

Live Demonstration

A live demonstration can be seen at my website. And SensorNet Live can also be viewed.

Running the Application

Select one or more sensors and then choose a date in the past. Click the "Get the Data" button and the data will be displayed.

SensorNet Chart Screen Shot

GUI Design

under contstruction

Color Scheme

under contstruction

Operation

under contstruction

Selecting Sensors

One or more sensors can be selected. Each is color-coded and when its graph is drawn the temperature line color will match.

SensorNet Chart Screen Shot

When a single sensor selected the humidity line will use an alternate color.

SensorNet Chart Screen Shot

Each sensors is associated with its own color to make it easier to distinguish them.

SensorNet Chart Screen Shot

Selecting a Start Date

When a date is selected from the picker and epoch value is calculated that represents 00:00 on the day chosen. The server will use that time stamp to search for sensor data.

SensorNet Chart Screen Shot

After the data is charted you can:

Details can be found in the Apex Charts documentation and demonstrations.

How it Works

under contstruction

Plug-in Modifications

under contstruction

Apex Chart

under contstruction

Zebra Datepicker

I chose the Zebra Datepicker because of the features and a very good(i.e. working) demo page. I also like that it has 3 themes to choose from. I also browsed the source and it's commented very well and is easy to follow.

I decided that the Bootstrap theme would work the best because I was already using Bootstrap here and on SensorNet Live.