Skip to content

Commit

Permalink
Merge pull request #16730 from yuanjiangxia/fix-dataZoom
Browse files Browse the repository at this point in the history
fix(dataZoom): fix the dataZoom was unexpectedly displayed at the top when data contains null values
  • Loading branch information
pissang authored Mar 23, 2022
2 parents 5c9430c + d7786c5 commit 4f7e2d7
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/data/DataStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,10 @@ class DataStore {
// Parse from previous data offset. len may be changed after appendData
for (let i = offset; i < len; i++) {
const val = (chunk as any)[i] = ordinalMeta.parseAndCollect(chunk[i]);
dimRawExtent[0] = Math.min(val, dimRawExtent[0]);
dimRawExtent[1] = Math.max(val, dimRawExtent[1]);
if (!isNaN(val)) {
dimRawExtent[0] = Math.min(val, dimRawExtent[0]);
dimRawExtent[1] = Math.max(val, dimRawExtent[1]);
}
}

dim.ordinalMeta = ordinalMeta;
Expand Down Expand Up @@ -1308,4 +1310,4 @@ class DataStore {
})();
}

export default DataStore;
export default DataStore;
112 changes: 111 additions & 1 deletion test/dataZoom-feature.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4f7e2d7

Please sign in to comment.