Skip to content

Commit 73313b4

Browse files
author
anhaohui.ahh
committed
fix: thumbnail of dual-axes are out of sync
1 parent 0b5a9af commit 73313b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plots/dual-axes/util/render-sider.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export const doSliderFilter = (view: View, sliderValue: [number, number]) => {
2121
const values = valuesOfKey(data, xScale.field);
2222
const xValues = isHorizontal ? values : values.reverse();
2323
const xTickCount = size(xValues);
24-
const minIndex = Math.floor(min * (xTickCount - 1));
25-
const maxIndex = Math.floor(max * (xTickCount - 1));
24+
const minIndex = Math.round(min * (xTickCount - 1));
25+
const maxIndex = Math.round(max * (xTickCount - 1));
2626

2727
// 增加 x 轴的过滤器
2828
view.filter(xScale.field, (value: any) => {

0 commit comments

Comments
 (0)