Skip to content

Commit ff5acd3

Browse files
committed
fix: pass current scale to axis component
1 parent 19ff5da commit ff5acd3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/vchart/src/component/axis/cartesian/axis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ export abstract class CartesianAxis<T extends ICartesianAxisCommonSpec = ICartes
750750
maxWidth: this._getTitleLimit(isX)
751751
},
752752
items,
753-
lastScale: this._lastScale
753+
scale: this._scale.clone()
754754
};
755755
if (!ignoreGrid) {
756756
attrs.grid = {

packages/vchart/src/component/axis/polar/axis.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ export abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarAxisCommo
461461
text: this._spec.title.text || this._dataFieldText
462462
},
463463
items,
464-
orient: 'angle'
464+
orient: 'angle',
465+
scale: this._scale
465466
};
466467
if (this._spec.grid.visible) {
467468
attrs.grid = {
@@ -494,7 +495,8 @@ export abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarAxisCommo
494495
text: this._spec.title.text || this._dataFieldText
495496
},
496497
items,
497-
orient: 'radius'
498+
orient: 'radius',
499+
scale: this._scale.clone()
498500
};
499501
if (this._spec.grid?.visible) {
500502
attrs.grid = {

0 commit comments

Comments
 (0)