mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-23 12:57:25 +08:00
Font advanced config options added (for v2.0.6+)
This commit is contained in:
@@ -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);
|
||||
|
||||
14
canvas-gauges/canvas-gauges.d.ts
vendored
14
canvas-gauges/canvas-gauges.d.ts
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user