File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -148,8 +148,14 @@ function legend(params: Params<BulletOptions>): Params<BulletOptions> {
148
148
const { chart, options } = params ;
149
149
const { legend } = options ;
150
150
chart . removeInteraction ( 'legend-filter' ) ;
151
+ // @TODO 后续看是否内部自定义一个 legend
151
152
chart . legend ( legend ) ;
152
153
154
+ // 默认关闭掉所在 color 字段的 legend, 从而不影响自定义的legend
155
+ chart . legend ( 'rKey' , false ) ;
156
+ chart . legend ( 'mKey' , false ) ;
157
+ chart . legend ( 'tKey' , false ) ;
158
+
153
159
return params ;
154
160
}
155
161
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ export class Bullet extends Plot<BulletOptions> {
20
20
protected getDefaultOptions ( ) {
21
21
return deepMix ( { } , super . getDefaultOptions ( ) , {
22
22
layout : 'horizontal' ,
23
- legend : false , // 默认关掉
24
23
size : {
25
24
range : 30 ,
26
25
measure : 20 ,
You can’t perform that action at this time.
0 commit comments