Skip to content

Commit

Permalink
Merge pull request #3562 from VisActor/fix/bug-of-updateModelSpecSync…
Browse files Browse the repository at this point in the history
…-in-axis-tick

Fix/bug of update model spec sync in axis tick
  • Loading branch information
xile611 authored Dec 13, 2024
2 parents 876692a + 519e18d commit 3d6e915
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: fix the bug of updateModelSpecSync can not set axis.tick.forceTickCount\n\n",
"type": "none",
"packageName": "@visactor/vchart"
}
],
"packageName": "@visactor/vchart",
"email": "[email protected]"
}
7 changes: 6 additions & 1 deletion packages/vchart/src/component/axis/cartesian/linear-axis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { Factory } from '../../../core/factory';
import { registerAxis } from '../base-axis';
import { registerLineAxis, registerLineGrid } from '@visactor/vgrammar-core';
import { registerDataSetInstanceTransform } from '../../../data/register';
import { continuousTicks, ICartesianTickDataOpt } from '@visactor/vrender-components';
import type { ICartesianTickDataOpt } from '@visactor/vrender-components';
import { continuousTicks } from '@visactor/vrender-components';
import { isXAxis, isZAxis } from './util';
import { combineDomains, isPercent } from '../../../util';

Expand Down Expand Up @@ -46,6 +47,10 @@ export class CartesianLinearAxis<
setAttrFromSpec(): void {
super.setAttrFromSpec();
this.setExtraAttrFromSpec();
const tickTransform = this._tickData?.[0]
?.getDataView()
.transformsArr.find(t => t.type === this.registerTicksTransform());
tickTransform && (tickTransform.options = this._tickTransformOption());
}

/**
Expand Down

0 comments on commit 3d6e915

Please sign in to comment.