Skip to content

Commit 86e2309

Browse files
authored
fix(rose): 玫瑰图 legend 默认配置,不进行 offset 偏移 (#2683)
* fix(rose): 修改玫瑰图 legend 默认配置 * test: 增加一个单测
1 parent dbafaf4 commit 86e2309

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

__tests__/unit/plots/rose/index-spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ describe('rose', () => {
5151
expect(geometry.getAdjust('stack')).toBeUndefined();
5252
expect(geometry.getAttribute('color')?.getFields()).toEqual(['series']);
5353

54+
// legend 默认不进行 offset
55+
// @ts-ignore
56+
expect(rose.chart.getController('legend').components[0].component.get('offsetX')).not.toBeGreaterThan(0);
57+
5458
rose.destroy();
5559
});
5660

src/plots/rose/constant.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export const DEFAULT_OPTIONS = deepAssign({}, Plot.getDefaultOptions(), {
99
yAxis: false,
1010
legend: {
1111
position: 'right',
12-
offsetX: -10,
1312
},
1413
sectorStyle: {
1514
stroke: '#fff',

0 commit comments

Comments
 (0)