Skip to content

Commit

Permalink
fix: cancel default clear states when updatespec
Browse files Browse the repository at this point in the history
  • Loading branch information
skie1997 committed Sep 6, 2024
1 parent 7e55a41 commit 7f54058
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/vchart/src/core/vchart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,6 @@ export class VChart implements IVChart {
*/
async updateDataInBatches(list: { id: string; data: Datum[]; options?: IParserOptions }[]): Promise<IVChart> {
if (this._chart) {
this._chart.clearAllStates();
this._chart.updateFullData(
list.map(({ id, data, options }) => {
return { id, values: data, parser: options };
Expand Down Expand Up @@ -891,7 +890,6 @@ export class VChart implements IVChart {
return this as unknown as IVChart;
}
if (this._chart) {
this._chart.clearAllStates();
if (userUpdateOptions?.reAnimate) {
this.stopAnimation();
this._updateAnimateState(true);
Expand Down Expand Up @@ -921,7 +919,6 @@ export class VChart implements IVChart {
userUpdateOptions?: IUpdateSpecResult
) {
if (this._chart) {
this._chart.clearAllStates();
if (userUpdateOptions?.reAnimate) {
this.stopAnimation();
this._updateAnimateState(true);
Expand Down Expand Up @@ -984,7 +981,6 @@ export class VChart implements IVChart {
morphConfig?: IMorphConfig,
userUpdateOptions?: IUpdateSpecResult
) {
this.clearAllStates();
const result = this._updateSpec(spec, forceMerge, userUpdateOptions);

if (!result) {
Expand All @@ -1011,7 +1007,6 @@ export class VChart implements IVChart {
morphConfig?: IMorphConfig,
userUpdateOptions?: IUpdateSpecResult
) {
this.clearAllStates();
const result = this._updateSpec(spec, forceMerge, userUpdateOptions);

if (!result) {
Expand Down

0 comments on commit 7f54058

Please sign in to comment.