diff --git a/ui/src/components/metric/graph.js b/ui/src/components/metric/graph.js
index 0be2cc5c..fd58b795 100644
--- a/ui/src/components/metric/graph.js
+++ b/ui/src/components/metric/graph.js
@@ -121,7 +121,8 @@ class Graph extends React.Component {
// remove leading data before first time on scale x
let dataWithTime = [];
if(data && data.length) {
- const totalData = data.slice(data.length - 1 - duration/10);
+ const sliceIndex = data.length - 1 - duration/10;
+ const totalData = sliceIndex < 0 ? data : data.slice(sliceIndex);
// adjust time of first data, if there's less data than would fill the chart
const start = moment(before)
.add(duration - (totalData.length-1)*10, 'minutes');
diff --git a/ui/src/components/metric/story.js b/ui/src/components/metric/story.js
index fd38a2c7..62b2b27d 100644
--- a/ui/src/components/metric/story.js
+++ b/ui/src/components/metric/story.js
@@ -80,7 +80,7 @@ storiesOf('Metric', module)
Aggregated CPU usage
-
+
@@ -93,11 +93,33 @@ storiesOf('Metric', module)
+
+
+ Aggregated CPU usage
+
+
+
+
+
+
+
+ Settings
+
+
+
+
+
));