Skip to content

Commit

Permalink
fix: fix update type of chart when axis update
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Jul 26, 2024
1 parent e9de61b commit 2cfb950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/vchart/__tests__/unit/core/update-spec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ describe('vchart updateSpec of different about label', () => {
});
});

it('should recompile when `alternateColor` of axis grid change', () => {
it('should reRender when `alternateColor` of axis grid change', () => {
const spec = {
type: 'area',
data: [
Expand Down Expand Up @@ -1401,7 +1401,7 @@ describe('vchart updateSpec of different about label', () => {
expect(updateRes).toEqual({
change: false,
changeTheme: false,
reCompile: true,
reCompile: false,
reMake: false,
reRender: true,
reSize: false,
Expand Down
5 changes: 0 additions & 5 deletions packages/vchart/src/component/axis/base-axis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,6 @@ export abstract class AxisComponent<T extends ICommonAxisSpec & Record<string, a
return prevSpec?.[k]?.visible !== spec?.[k]?.visible;
});

if (!result.reMake && !isEqual(prevSpec, spec)) {
result.reCompile = true;
return result;
}

return result;
}

Expand Down

0 comments on commit 2cfb950

Please sign in to comment.