gpt4 book ai didi

html - Google Gauge 设置字体大小和标签

转载 作者:行者123 更新时间:2023-11-28 02:36:26 25 4
gpt4 key购买 nike

我试图设置由 google chart api 创建的 gauge gauge 的字体大小

我对如何使用 css 来改变 gauge 的字体大小有点困惑

html代码

<div class="center-block" style="margin-top: 8%" >
<div id="gauge_chart"
[chartData]="pie_ChartData"
[chartOptions]= "pie_ChartOptions"
chartType="Gauge" GoogleChart>
</div>
</div>

enter image description here我使用以下几行 css 代码来减小字体大小,但它不起作用

svg:first-child > g > text[text-anchor~=middle]{
font-size:9px;
}

谁能帮我解决这个问题。

提前谢谢你

最佳答案

尝试

CSS

svg g text{
font-size:.7em;
}

对我有用

关于html - Google Gauge 设置字体大小和标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47386696/

25 4 0