Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dataZoom): fix the dataZoom was unexpectedly displayed at the top when data contains null values #16730

Merged
merged 1 commit into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.