Feat(Categories): use tags as legend for graphs

This commit is contained in:
Bertrand Benjamin 2019-01-27 20:05:41 +01:00
parent 6f069832c0
commit ecf7db6a8f
2 changed files with 14 additions and 20 deletions

View File

@ -16,15 +16,6 @@ export default {
},
data () {
return {
selected_tags: [
'virements',
'cash',
'autoroute',
'train',
'essence',
'courses',
'sans tags'
],
options: {
responsive: true,
maintainAspectRatio: false,
@ -39,8 +30,14 @@ export default {
'tag_filter_rows'
]),
...mapGetters('config', [
'tag'
'tag',
'tags'
]),
selected_tags () {
var sel = Object.keys(this.tags)
sel.push('sans tags')
return sel
},
chartdata () {
return {
labels: this.selected_tags,

View File

@ -17,15 +17,6 @@ export default {
},
data () {
return {
selected_tags: [
'virements',
'cash',
'autoroute',
'train',
'essence',
'courses',
'sans tags'
],
options: {
responsive: true,
maintainAspectRatio: false,
@ -41,8 +32,14 @@ export default {
'tag_filter_rows': 'tag_filter_rows'
}),
...mapGetters('config', [
'tag'
'tag',
'tags'
]),
selected_tags () {
var sel = Object.keys(this.tags)
sel.push('sans tags')
return sel
},
datasets () {
var datas = []
this.selected_tags.forEach(t => {