Make visualize.js more readable

This is almost exclusively a change of indentation levels (by modifying the way
the code checks for an error when connecting to the database). There are a
couple of minor changes on when we throw an error versus just report it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Better stats graph

Use side-by-side bars for distance, energy used and energy charged.
Fix Wh/mile calculation to only look at energy used (as charging may be offset
from driving, especially on multi-day trips)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use two y axes for stats plot

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add hover to stats chart

This makes it much easier to make sense of the bars.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge pull request #16 from dirkhh/betterEnergy

Better energy