diff --git a/canvas-gauges/canvas-gauges-tests.ts b/canvas-gauges/canvas-gauges-tests.ts index d0f04e1082..015bdfd7e2 100644 --- a/canvas-gauges/canvas-gauges-tests.ts +++ b/canvas-gauges/canvas-gauges-tests.ts @@ -8,10 +8,12 @@ import { } from 'canvas-gauges'; let linearOptions: LinearGaugeOptions = { - renderTo: document.createElement('canvas') + renderTo: document.createElement('canvas'), + fontNumbersStyle: 'italic' }; let radialOptions: RadialGaugeOptions = { - renderTo: 'gauge-id' + renderTo: 'gauge-id', + fontNumbersWeight: 'bold' }; new LinearGauge(linearOptions); diff --git a/canvas-gauges/canvas-gauges.d.ts b/canvas-gauges/canvas-gauges.d.ts index 2b67c7f76f..b330726f55 100644 --- a/canvas-gauges/canvas-gauges.d.ts +++ b/canvas-gauges/canvas-gauges.d.ts @@ -4,6 +4,10 @@ // Definitions: https://github.com/Mikhus/DefinitelyTyped declare namespace CanvasGauges { + export type FontStyle = 'normal' | 'italic' | 'oblique'; + export type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | + '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; + export type RenderTarget = string|HTMLElement; export interface AnimationRule { @@ -86,7 +90,15 @@ declare namespace CanvasGauges { fontTitleSize?: number, fontValueSize?: number, fontUnitsSize?: number, - fontNumbersSize?: number + fontNumbersSize?: number, + fontTitleStyle?: FontStyle, + fontValueStyle?: FontStyle, + fontUnitsStyle?: FontStyle, + fontNumbersStyle?: FontStyle, + fontTitleWeight?: FontWeight, + fontValueWeight?: FontWeight, + fontUnitsWeight?: FontWeight, + fontNumbersWeight?: FontWeight } export interface RadialGaugeOptions extends GenericOptions {