diff --git a/assets/src/js/components/Chart.js b/assets/src/js/components/Chart.js index 589d8497..93313b34 100644 --- a/assets/src/js/components/Chart.js +++ b/assets/src/js/components/Chart.js @@ -136,6 +136,8 @@ class Chart extends Component { @bind redrawChart() { let data = this.state.data; + + // hide chart & bail if we're trying to show less than 1 day worth of data this.base.parentNode.style.display = data.length <= 1 ? 'none' : ''; if(data.length <= 1) { return; diff --git a/assets/src/js/pages/dashboard.js b/assets/src/js/pages/dashboard.js index 008316f2..4a15f5f5 100644 --- a/assets/src/js/pages/dashboard.js +++ b/assets/src/js/pages/dashboard.js @@ -12,6 +12,7 @@ import Table from '../components/Table.js'; import Chart from '../components/Chart.js'; import { bind } from 'decko'; import Client from '../lib/client.js'; +import classNames from 'classnames'; const defaultSite = { id: window.localStorage.getItem('site_id') || 1, @@ -146,7 +147,7 @@ class Dashboard extends Component { return (
-
+