Skip to content

Commit

Permalink
fix(funnel): 不将 label 的 layout 的 type 设置为 interval-adjust-position (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini authored Aug 24, 2021
1 parent b517666 commit de2efd5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion __tests__/unit/plots/funnel/basic-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ describe('basic funnel', () => {
});

const geometry = funnel.chart.geometries[0];
expect(geometry.labelOption.cfg.layout.type).toBe('interval-adjust-position');
const shapeFields = geometry.getAttribute('shape').getFields();
expect(shapeFields[0]).toBe('pyramid');
});
Expand Down
10 changes: 1 addition & 9 deletions src/plots/funnel/geometries/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,7 @@ function geometry(params: Params<FunnelOptions>): Params<FunnelOptions> {
color,
style: funnelStyle,
},
// 使用 Interval 绘制的漏斗图,默认使用 'interval-adjust-position', 否则尖底漏斗图最后一行 label 错位
label: deepAssign(
{
layout: {
type: 'interval-adjust-position',
},
},
label
),
label,
state,
},
});
Expand Down

0 comments on commit de2efd5

Please sign in to comment.