Browse Source

use right y series on mouse move

pull/3/head
vargburz 2 years ago
parent
commit
d763d8591b
  1. 7
      src/index.ts

7
src/index.ts

@ -302,7 +302,12 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
this.hideCrosshairCircle(serie.idx);
} else {
const xPosition = this.state.xScale(closestDatapoint[0]);
const yPosition = this.state.yScale(closestDatapoint[1]);
let yPosition;
if(serie.yOrientation === yAxisOrientation.RIGHT) {
yPosition = this.state.y1Scale(closestDatapoint[1]);
} else {
yPosition = this.state.yScale(closestDatapoint[1]);
}
this.moveCrosshairCircle(xPosition, yPosition, serie.idx);
}

Loading…
Cancel
Save