Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vchart",
"comment": "fix: not update layout when scrollbar domain is the same as before. fix#3452",
"type": "none"
}
],
"packageName": "@visactor/vchart"
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ export abstract class DataFilterBaseComponent<T extends IDataFilterComponentSpec
protected _spanCache!: number;
protected _shouldChange: boolean = true;

protected _domainCache!: any;

protected _field!: string | undefined;
protected _stateField: string = 'x';
protected _valueField?: string;
Expand Down Expand Up @@ -404,7 +406,8 @@ export abstract class DataFilterBaseComponent<T extends IDataFilterComponentSpec
this._stateScale.domain(domain, false);
this._handleChange(this._start, this._end, true);
// auto 模式下需要重新布局
if (this._spec.auto) {
if (this._spec.auto && !isEqual(this._domainCache, domain)) {
this._domainCache = domain;
this._dataUpdating = true;
this.getChart()?.setLayoutTag(true, null, false);
}
Expand Down