Browse Source

use latest core

master
vargburz 2 years ago
parent
commit
47df352d32
  1. 2
      package.json
  2. 7
      src/models/gauge_options.ts
  3. 6
      src/models/gauge_series.ts
  4. 6
      yarn.lock

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "@chartwerk/gauge-pod", "name": "@chartwerk/gauge-pod",
"version": "0.6.0", "version": "0.6.1",
"description": "Chartwerk gauge pod", "description": "Chartwerk gauge pod",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {

7
src/models/gauge_options.ts

@ -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[] {

6
src/models/gauge_series.ts

@ -8,10 +8,6 @@ const GAUGE_DATA_DEFAULTS = { };
export class GaugeSeries extends CoreSeries<GaugeData> { export class GaugeSeries extends CoreSeries<GaugeData> {
constructor(series: GaugeData[]) { constructor(series: GaugeData[]) {
super(series); super(series, GAUGE_DATA_DEFAULTS);
}
protected get defaults(): GaugeData {
return { ...this._coreDefaults, ...GAUGE_DATA_DEFAULTS };
} }
} }

6
yarn.lock

@ -6,12 +6,12 @@ __metadata:
cacheKey: 8 cacheKey: 8
"@chartwerk/core@npm:latest": "@chartwerk/core@npm:latest":
version: 0.6.3 version: 0.6.5
resolution: "@chartwerk/core@npm:0.6.3" resolution: "@chartwerk/core@npm:0.6.5"
dependencies: dependencies:
d3: ^5.7.2 d3: ^5.7.2
lodash: ^4.14.149 lodash: ^4.14.149
checksum: bb804b1a2339fc19857e5caa07d16ed78fb1b0739878d3f7488e9f8661667ed78ada3a63afd15206bd4210746b50916b253e98f077451cc8d899728ecf08ba50 checksum: 2757ae8be04b84c3624bd807a437d6bf3c67fef0808e3192f0a97ba819627f3b28821628cfefdfabe1951e8b7d0d45d1b9f6ade13cdc4a5bca5e539fc70850df
languageName: node languageName: node
linkType: hard linkType: hard

Loading…
Cancel
Save