diff --git a/config/config.yml b/config/config.yml index 27f2d9c..14a9a95 100644 --- a/config/config.yml +++ b/config/config.yml @@ -106,3 +106,12 @@ tags: words: - ALVEOLES - LYON FRITE ALORS ! + voiture: + color: '#0077c8' + icon: car + name: Voiture + variant: '' + words: + - VOITURE + - ARBENT A84 OYONNAX + - ST CLAUDE ALAIN PNEU diff --git a/src/components/graph_time.vue b/src/components/graph_time.vue index 3cc0f19..4c09710 100644 --- a/src/components/graph_time.vue +++ b/src/components/graph_time.vue @@ -20,6 +20,19 @@ export default { options: { responsive: true, maintainAspectRatio: false, + scales: { + xAxes: [{ + type: 'time', + time: { + parser: 'MMMM YYYY', + }, + scaleLabel: { + display: true, + format: 'MMMM YYYY', + labelString: 'Date' + } + }] + }, legend: { position: 'left' } diff --git a/src/store/modules/datas.js b/src/store/modules/datas.js index 976814b..2509c40 100644 --- a/src/store/modules/datas.js +++ b/src/store/modules/datas.js @@ -123,7 +123,9 @@ export default { }, months: (state, getters) => { // Set of month - return [...new Set(getters.rows.map(x => moment(x.Date).format('MMMM YYYY')))] + return [...new Set(getters.rows.map(x => moment(x.Date).format('MMMM YYYY')))].sort((left, right) => { + return moment(left, 'MMMM YYYY').diff(moment(right, 'MMMM YYYY')) + }) } }, mutations: { diff --git a/src/views/home.vue b/src/views/home.vue index f8b42a5..0e36877 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -121,7 +121,6 @@ export default { 'categorie_filter_rows': 'datas/categorie_filter_rows', 'datas_present': 'datas/present', 'month': 'datas/month', - 'months': 'datas/months', 'tags': 'config/tags', 'categories': 'config/categories' }),