Fix style issues

This commit is contained in:
Matthias 2021-06-02 15:47:02 +02:00
parent f0030e16ff
commit 8b7dbbed53

View File

@ -169,10 +169,10 @@ export default class CandleChart extends Vue {
},
},
// positioning copied from https://echarts.apache.org/en/option.html#tooltip.position
position: function (pos, params, dom, rect, size) {
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.
var obj = {top: 60};
const obj = { top: 60 };
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
return obj;
},