Skip to content
Closed
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
12 changes: 10 additions & 2 deletions src/component/dataZoom/AxisProxy.ts
Comment thread
Skuperday marked this conversation as resolved.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the new version of implement, that don't generate errors on eslinter

Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,16 @@ class AxisProxy {
for (let i = 0; i < dataDims.length; i++) {
const value = store.get(dataDimIndices[i], dataIndex) as number;
const thisHasValue = !isNaN(value);
const thisLeftOut = value < valueWindow[0];
const thisRightOut = value > valueWindow[1];
let thisRightOut = value > valueWindow[1];
let thisLeftOut = value < valueWindow[0];
if (seriesModel.subType !== 'bar') {
const parsedRightValue = seriesData.get(dataDims[i], dataIndex + 1);
const parsedLeftValue = seriesData.get(dataDims[i], dataIndex - 1);
const leftValue = (typeof parsedLeftValue === 'number') ? parsedLeftValue : NaN;
const rightValue = (typeof parsedRightValue === 'number') ? parsedRightValue : NaN;
thisLeftOut = thisLeftOut && leftValue < valueWindow[0];
thisRightOut = thisRightOut && rightValue > valueWindow[1];
}
if (thisHasValue && !thisLeftOut && !thisRightOut) {
return true;
}
Expand Down
141 changes: 141 additions & 0 deletions test/axis-weak-filter.html
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just test case that demonstrate diff in logic under weakFilter and without it

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

Loading