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,11 @@
{
"changes": [
{
"comment": "fix: only calculate multi layer label items when need, fix #4056\n\n",
"type": "none",
"packageName": "@visactor/vchart"
}
],
"packageName": "@visactor/vchart",
"email": "dingling112@gmail.com"
}
3 changes: 2 additions & 1 deletion packages/vchart/src/component/axis/mixin/band-axis-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ export class BandAxisMixin {
const labelItems: Dict<any>[][] = [];
let preData: any[] = [];

this._scales.forEach((scale, index) => {
// 只有需要展示多层标签的时候,才需要计算,否则不需要计算
(this._spec.showAllGroupLayers ? this._scales : [this._scales[0]]).forEach((scale, index) => {
const tickData = this._tickDataMap[index];

// 因为多层级标签会依赖上一层标签的分组值定位,所以如果上一层标签没有内容,那么就直接获取 bandScale 的 domain()
Expand Down
Loading