From 06c2922a570a52fecab83902973b938bfd7ea584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Wed, 9 Nov 2016 14:10:11 +0000 Subject: [PATCH] remove epoch docs from chartjs --- spikes/graphs-matrix/chartjs/client/store.js | 4 +++- spikes/graphs-matrix/chartjs/package.json | 2 +- spikes/graphs-matrix/chartjs/readme.md | 15 ++++++--------- spikes/graphs-matrix/chartjs/server/metric.js | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/spikes/graphs-matrix/chartjs/client/store.js b/spikes/graphs-matrix/chartjs/client/store.js index 452af806..27f9837a 100644 --- a/spikes/graphs-matrix/chartjs/client/store.js +++ b/spikes/graphs-matrix/chartjs/client/store.js @@ -12,7 +12,9 @@ const { module.exports = (state = Object.freeze({})) => { return createStore(reducer, state, applyMiddleware( - createLogger(), + createLogger({ + predicate: (getState, action) => action.type !== 'UPDATE_STATS' + }), promiseMiddleware(), thunk )); diff --git a/spikes/graphs-matrix/chartjs/package.json b/spikes/graphs-matrix/chartjs/package.json index ed4bba13..8573286a 100644 --- a/spikes/graphs-matrix/chartjs/package.json +++ b/spikes/graphs-matrix/chartjs/package.json @@ -1,5 +1,5 @@ { - "name": "epoch-matrix-spike", + "name": "chartjs-matrix-spike", "private": true, "license": "private", "main": "server/index.js", diff --git a/spikes/graphs-matrix/chartjs/readme.md b/spikes/graphs-matrix/chartjs/readme.md index 5172d589..ae5ad210 100644 --- a/spikes/graphs-matrix/chartjs/readme.md +++ b/spikes/graphs-matrix/chartjs/readme.md @@ -1,15 +1,12 @@ -# Epoch +# ChartJS - - [x] Graphs should maintain aspect ration + - [ ] Graphs should maintain aspect ration - [ ] Graphs should match Antonas' first draft designs - - [x] Should have 3 Graphs on each row - - [x] Should be a 3 x 4 matrix of graphs, showing different data - - [x] Graphs should not jitter, ideally smoothly move across the x axis - - [x] All graphs should be a bar graph + - [ ] Should have 3 Graphs on each row + - [ ] Should be a 3 x 4 matrix of graphs, showing different data + - [ ] Graphs should not jitter, ideally smoothly move across the x axis + - [ ] All graphs should be a bar graph - [ ] Animations when a graph comes into view ## notes - - Epoch is not responsive. Even though they maintain aspect ratio, using a responsive grid they get cluttered between each other - - With short update intervals, the graphs start using to much cpu and can't handle it - - Even looking at the [documentation](https://epochjs.github.io/epoch/styles), it's not obvious how styling works and I wasn't able to make it work. diff --git a/spikes/graphs-matrix/chartjs/server/metric.js b/spikes/graphs-matrix/chartjs/server/metric.js index 0d64fad2..24015f70 100644 --- a/spikes/graphs-matrix/chartjs/server/metric.js +++ b/spikes/graphs-matrix/chartjs/server/metric.js @@ -19,7 +19,7 @@ module.exports = (server) => ({ when: new Date().getTime(), cpu: Math.random() * 100 }); - }, 400); + }, 100); cdm[id] = { interval,