Disable graph touch interaction in dashboard on mobile so we can scroll properly

This commit is contained in:
nymkappa
2022-01-13 12:00:49 +09:00
parent 14b1606d91
commit 64b2664ba3
2 changed files with 12 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
left: this.left,
},
animation: false,
dataZoom: [{
dataZoom: (this.template === 'widget' && this.isMobile()) ? null : [{
type: 'inside',
realtime: true,
zoomLock: (this.template === 'widget') ? true : false,
@@ -93,6 +93,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
},
}],
tooltip: {
show: !this.isMobile(),
trigger: 'axis',
position: (pos, params, el, elRect, size) => {
const obj = { top: -20 };
@@ -219,4 +220,8 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
},
};
}
isMobile() {
return window.innerWidth <= 767.98;
}
}