简体   繁体   English

如何更改Google甘特图字体?

[英]How can I change the google gantt chart font?

When I start the first jsfiddle from the Google Gantt Chart Documentation , I get a serif font. 当我从Google Gantt图表文档启动第一个jsfiddle时 ,我得到了衬线字体。

How can I switch to sans-serif as Google does it on its page? 我如何在Google在其页面上切换到无衬线?

I discovered gantt.labelStyle , but that only sets the labels' style but not the tooltip font when hovering over items . 我发现了gantt.labelStyle ,但是当将鼠标悬停在items上时 ,它只会设置标签的样式, 而不会设置工具提示字体

The quick and dirty way would be to add this CSS 快速而肮脏的方法是添加此CSS

text {
  font-family: sans-serif !important;
}

This will style all text nodes with a sans-serif font. 这将使用sans-serif字体设置所有text节点的样式。

Updated Fiddle 更新小提琴

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM