mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-22 11:05:17 +00:00
Merge pull request #370 from VanessaE/patch-1
make tooltip jump instead of follow
This commit is contained in:
commit
2056c0464c
|
@ -168,6 +168,14 @@ export default class CandleChart extends Vue {
|
|||
opacity: 1,
|
||||
},
|
||||
},
|
||||
// positioning copied from https://echarts.apache.org/en/option.html#tooltip.position
|
||||
position(pos, params, dom, rect, size) {
|
||||
// tooltip will be fixed on the right if mouse hovering on the left,
|
||||
// and on the left if hovering on the right.
|
||||
const obj = { top: 60 };
|
||||
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
||||
return obj;
|
||||
},
|
||||
},
|
||||
axisPointer: {
|
||||
link: [{ xAxisIndex: 'all' }],
|
||||
|
|
Loading…
Reference in New Issue
Block a user