1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 02:28:54 +08:00

events refactor

This commit is contained in:
lana-k
2022-06-25 22:37:09 +02:00
parent 48e311bff8
commit d56604a7d6
14 changed files with 66 additions and 100 deletions

View File

@@ -201,13 +201,19 @@ export default {
this.exportSignal('html')
},
exportSignal (to) {
send({
category: this.plotlyInPivot || this.mode === 'chart'
? 'viz_plotly' : 'viz_pivot',
action: 'export',
label: `type=${to}${this.plotlyInPivot
? ' pivot=true' : this.mode === 'chart' ? ' pivot=false' : ''}`
})
const eventLabels = { type: to }
if (this.mode === 'chart' || this.plotlyInPivot) {
eventLabels.pivot = this.plotlyInPivot
}
send(
this.mode === 'chart' || this.plotlyInPivot
? 'viz_plotly.export'
: 'viz_pivot.export',
undefined,
eventLabels
)
}
}
}