Google Gauge set Font size and Label

1.7k Views Asked by At

I trying to set the font size of a gauge gauge created by the google chart api

I am a little stuck on how to use css to change the font-size of gauge

html code

<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 I using below lines of css code to reduce font-size , but its not working

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

Can anyone please help me in this.

Thank you in advance

1

There are 1 best solutions below

0
alQemist On

try

CSS

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

Works for me