diff --git a/package.json b/package.json index 77efa41..02c07b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/gauge-pod", - "version": "0.6.0", + "version": "0.6.1", "description": "Chartwerk gauge pod", "main": "dist/index.js", "scripts": { diff --git a/src/models/gauge_options.ts b/src/models/gauge_options.ts index dcbdaee..a0586e9 100644 --- a/src/models/gauge_options.ts +++ b/src/models/gauge_options.ts @@ -11,7 +11,6 @@ const DEFAULT_OUTER_RADIUS = 72; export const CORE_OPTIONS_DEFAULTS = { renderLegend: false, - // TODO: find a method in lodash (defaultsDeep?) grid: { x: { enabled: false @@ -82,11 +81,7 @@ const GAUGE_OPTIONS_DEFAULTS: GaugeConfig = { export class GaugeOptions extends CoreOptions { constructor(options: GaugeConfig) { - super(options); - } - - protected get defaults(): GaugeConfig { - return { ...this._coreDefaults, ...GAUGE_OPTIONS_DEFAULTS }; + super(options, { ...CORE_OPTIONS_DEFAULTS, ...GAUGE_OPTIONS_DEFAULTS }); } get icons(): IconConfig[] { diff --git a/src/models/gauge_series.ts b/src/models/gauge_series.ts index 7ce61ba..fd97fea 100644 --- a/src/models/gauge_series.ts +++ b/src/models/gauge_series.ts @@ -8,10 +8,6 @@ const GAUGE_DATA_DEFAULTS = { }; export class GaugeSeries extends CoreSeries { constructor(series: GaugeData[]) { - super(series); - } - - protected get defaults(): GaugeData { - return { ...this._coreDefaults, ...GAUGE_DATA_DEFAULTS }; + super(series, GAUGE_DATA_DEFAULTS); } } diff --git a/yarn.lock b/yarn.lock index 88bfda2..c751dd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,12 +6,12 @@ __metadata: cacheKey: 8 "@chartwerk/core@npm:latest": - version: 0.6.3 - resolution: "@chartwerk/core@npm:0.6.3" + version: 0.6.5 + resolution: "@chartwerk/core@npm:0.6.5" dependencies: d3: ^5.7.2 lodash: ^4.14.149 - checksum: bb804b1a2339fc19857e5caa07d16ed78fb1b0739878d3f7488e9f8661667ed78ada3a63afd15206bd4210746b50916b253e98f077451cc8d899728ecf08ba50 + checksum: 2757ae8be04b84c3624bd807a437d6bf3c67fef0808e3192f0a97ba819627f3b28821628cfefdfabe1951e8b7d0d45d1b9f6ade13cdc4a5bca5e539fc70850df languageName: node linkType: hard