@@ -227,7 +227,7 @@ export class NgxGauge implements AfterViewInit, OnChanges, OnDestroy, OnInit {
227
227
for ( let i = 0 ; i < ranges . length ; ++ i ) {
228
228
let r = ranges [ i ] ;
229
229
this . _context . beginPath ( ) ;
230
- this . _context . strokeStyle = r . backgroundColor ? r . backgroundColor : r . color ;
230
+ this . _context . strokeStyle = r . backgroundColor ? r . backgroundColor : ( r . bgOpacity ) ? r . color : this . backgroundColor ;
231
231
if ( r . bgOpacity !== undefined && r . bgOpacity !== null ) {
232
232
this . _context . globalAlpha = r . bgOpacity ;
233
233
}
@@ -266,7 +266,7 @@ export class NgxGauge implements AfterViewInit, OnChanges, OnDestroy, OnInit {
266
266
267
267
}
268
268
269
- private _addMarker ( angle , color , label ?, type ?, len ?) {
269
+ private _addMarker ( angle , color , label ?, type ?, len ?, font ? ) {
270
270
271
271
var rad = angle * Math . PI / 180 ;
272
272
@@ -339,7 +339,7 @@ export class NgxGauge implements AfterViewInit, OnChanges, OnDestroy, OnInit {
339
339
this . _context . translate ( x2 , y2 ) ;
340
340
this . _context . rotate ( ( angle + 90 ) * ( Math . PI / 180 ) ) ;
341
341
this . _context . textAlign = "center" ;
342
- this . _context . font = '13px Arial' ;
342
+ this . _context . font = ( font ) ? font : '13px Arial' ;
343
343
this . _context . fillText ( label , 0 , - 3 ) ;
344
344
this . _context . restore ( ) ;
345
345
}
@@ -523,6 +523,7 @@ export class NgxGauge implements AfterViewInit, OnChanges, OnDestroy, OnInit {
523
523
color: '#555',
524
524
size: 5,
525
525
label: '10',
526
+ font: '11px verdana'
526
527
type: 'line',
527
528
},
528
529
'20': {
@@ -542,7 +543,7 @@ export class NgxGauge implements AfterViewInit, OnChanges, OnDestroy, OnInit {
542
543
var angle = bounds . start + ( n * perD ) ;
543
544
544
545
var m = this . markers [ mv ] ;
545
- this . _addMarker ( angle , m . color , m . label , m . type , m . size ) ;
546
+ this . _addMarker ( angle , m . color , m . label , m . type , m . size , m . font ) ;
546
547
}
547
548
}
548
549
0 commit comments