|
|
@ -11,7 +11,6 @@ const DEFAULT_OUTER_RADIUS = 72; |
|
|
|
|
|
|
|
|
|
|
|
export const CORE_OPTIONS_DEFAULTS = { |
|
|
|
export const CORE_OPTIONS_DEFAULTS = { |
|
|
|
renderLegend: false, |
|
|
|
renderLegend: false, |
|
|
|
// TODO: find a method in lodash (defaultsDeep?)
|
|
|
|
|
|
|
|
grid: { |
|
|
|
grid: { |
|
|
|
x: { |
|
|
|
x: { |
|
|
|
enabled: false |
|
|
|
enabled: false |
|
|
@ -82,11 +81,7 @@ const GAUGE_OPTIONS_DEFAULTS: GaugeConfig = { |
|
|
|
export class GaugeOptions extends CoreOptions<GaugeConfig> { |
|
|
|
export class GaugeOptions extends CoreOptions<GaugeConfig> { |
|
|
|
|
|
|
|
|
|
|
|
constructor(options: GaugeConfig) { |
|
|
|
constructor(options: GaugeConfig) { |
|
|
|
super(options); |
|
|
|
super(options, { ...CORE_OPTIONS_DEFAULTS, ...GAUGE_OPTIONS_DEFAULTS }); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected get defaults(): GaugeConfig { |
|
|
|
|
|
|
|
return { ...this._coreDefaults, ...GAUGE_OPTIONS_DEFAULTS }; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
get icons(): IconConfig[] { |
|
|
|
get icons(): IconConfig[] { |
|
|
|