You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/09/23 13:46:42 UTC
[incubator-echarts] branch pr/13317 updated: fix
List#indicesOfNearest when there are multiple chunks
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch pr/13317
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/pr/13317 by this push:
new 67f5524 fix List#indicesOfNearest when there are multiple chunks
67f5524 is described below
commit 67f55242d1a06089cc5f196f6b4423eed9577cd7
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Sep 23 21:46:06 2020 +0800
fix List#indicesOfNearest when there are multiple chunks
---
src/data/List.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/data/List.ts b/src/data/List.ts
index cb4b3e0..4298f9e 100644
--- a/src/data/List.ts
+++ b/src/data/List.ts
@@ -1137,8 +1137,8 @@ class List<
// Check the test case of `test/ut/spec/data/List.js`.
for (let i = 0, len = this.count(); i < len; i++) {
- const chunkIndex = mathFloor(i / chunkSize);
const dataIndex = this.getRawIndex(i);
+ const chunkIndex = mathFloor(dataIndex / chunkSize);
const chunkOffset = dataIndex % chunkSize;
const diff = value - (dimData[chunkIndex][chunkOffset] as number);
const dist = Math.abs(diff);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org