angular-gauge icon indicating copy to clipboard operation
angular-gauge copied to clipboard

How can i change the font size of value without changing the size of gauge

Open MuhammadTahir92 opened this issue 7 years ago • 4 comments

capture

MuhammadTahir92 avatar Oct 25 '17 11:10 MuhammadTahir92

Well, the value is written inside a span tag. If somehow from CSS you can able to access the <span></span> inside the <ng-gauge></ng-gauge>, then you can play with its font-size.

ashish-chopra avatar Oct 29 '17 15:10 ashish-chopra

I edited the js file... the directive uses a variable called tpl for its template. Edit the template by adding a class to the appropriate tag then edit the style in your css. I had to use the !important rule for it to take effect. image

If the classes were added to the master this would make it easier for others in the future???

Emlynkm avatar Nov 01 '17 15:11 Emlynkm

I would suggest to mark each element with css classes. For example:

ng-gauge-prepend ng-gauge-append ng-gauge-value ng-gauge-label

This way it would be easy to change the default style and allow customization without having to change the code.

By the way, if we do this, we could remove the 'label-only' property, since you could set 'display: none' to the elements you're not interested in.

camiteca avatar Dec 18 '17 10:12 camiteca

Good suggestion @karlmtc. I will take it up soon, most probably after Christmas.

ashish-chopra avatar Dec 20 '17 16:12 ashish-chopra