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

WIP: fix: chart not update when datazoom change. fix#3597 #3598

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vchart",
"comment": "fix: chart not update when datazoom change. fix#3597",
"type": "none"
}
],
"packageName": "@visactor/vchart"
}
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ export class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends DataFilte

this._component.addEventListener('change', (e: any) => {
const { start, end, tag } = e.detail;
this._handleChange(start, end, undefined, tag);
// 传入tag后, datazoom每次只更新 startHandler / endHandler, 如果快速拖动会出现handler更新不及时的情况
// 追溯上下文发现tag逻辑与auto有关(pull#1492), 所以在此做判断, 尽量不产生额外影响, 如果有额外影响应当再做处理
this._handleChange(start, end, undefined, this._auto ? tag : undefined);
});
container.add(this._component as unknown as INode);

Expand Down Expand Up @@ -448,7 +450,8 @@ export class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends DataFilte
line: { visible: false },
area: { visible: false }
},
disableTriggerEvent: this._option.disableTriggerEvent
disableTriggerEvent: this._option.disableTriggerEvent,
disableDispatchOutSide: (this._spec as any).disableDispatchOutSide ?? false
};
}

Expand Down
Loading