Skip to content

Commit 5db8197

Browse files
authored
Fix donut statistic (#1218)
1 parent d467e5a commit 5db8197

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/plots/donut/component/statistic-template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const containerStyle =
33
"color:#4d4d4d;font-size:14px;text-align:center;line-height:2;font-family:'-apple-system',BlinkMacSystemFont,'SegoeUI',Roboto,'HelveticaNeue',Helvetica,'PingFangSC','HiraginoSansGB','MicrosoftYaHei',SimSun,'sans-serif';pointer-events:none;";
44

5-
const nameStyle = 'font-weight:300;';
5+
const nameStyle = 'font-weight:300;white-space: nowrap;text-overflow: ellipsis;';
66

77
const valueStyle = 'font-size:32px;font-weight:bold;color:#4D4D4D';
88

src/plots/donut/component/statistic.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default class StatisticHtml {
3535
this.container.appendChild(this.wrapperNode);
3636
modifyCSS(this.wrapperNode, {
3737
position: 'absolute',
38+
pointerEvents: 'none', // 阻止 dom 事件击穿
3839
});
3940
const htmlNode = createDom(this.html);
4041
this.wrapperNode.appendChild(htmlNode);

0 commit comments

Comments
 (0)