Skip to content

Commit

Permalink
fix(master): 不使用默认legend (#388)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhang Rui <zhangrui@growingio.com>
  • Loading branch information
Quesle and Zhang Rui authored Apr 24, 2024
1 parent 1eb9fcb commit 73e6b86
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/area/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class Area extends BaseChart {
this.instance.interaction('element-highlight-by-color');
this.instance.render();
// like Line framework, render twice to fix wrong label issue.
this.instance.legend(false);
this.instance.render(true);
} catch (err) {
/* istanbul ignore next */
Expand Down
1 change: 1 addition & 0 deletions src/bar/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export class TimeBar extends Bar {
leadView.render();
textView.render();
fetchTooltip(this.instance, config);
this.instance.legend(false);
this.instance.render();
};
}
1 change: 1 addition & 0 deletions src/box/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export class Box extends BaseChart {
this.options = options;
this.config = config;
this.views = [boxView];
this.instance.legend(false);
return { chart, views: [boxView], update: this.update };
};

Expand Down
1 change: 1 addition & 0 deletions src/bubble/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class Bubble extends BaseChart {

fetchTooltip(this.instance, config);
this.instance.interaction('element-highlight');
this.instance.legend(false);
// this.instance.interaction('brush');
this.instance.render();
};
Expand Down
2 changes: 2 additions & 0 deletions src/column/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const intervalShape = (
}
interval.state(getShapeState(options));
interval.customInfo(setCustomInfo(options, config, customInfo));

return interval;
};

Expand Down Expand Up @@ -146,6 +147,7 @@ export class Column extends BaseChart {
},
});
// this.instance.interaction('element-active');
this.instance.legend(false);
this.instance.render();
} catch (err) {}
};
Expand Down
1 change: 1 addition & 0 deletions src/donut/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class Donut extends BaseChart {
textView.render();

fetchTooltip(this.instance, config);
this.instance.legend(false);
this.instance.render();
this.instance.render(true);

Expand Down
1 change: 1 addition & 0 deletions src/double-axes/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export class DoubleAxes extends BaseChart {
this.lineShape(this.instance, options, lineCfg);

fetchTooltip(this.instance, config);
this.instance.legend(false);
this.instance.render();
this.instance.render(true);

Expand Down

0 comments on commit 73e6b86

Please sign in to comment.