Browse Source

minor fixes

merge-requests/1/merge
rozetko 4 years ago
parent
commit
8e19afa84a
  1. 4
      src/index.ts
  2. 1
      src/types.ts

4
src/index.ts

@ -18,7 +18,7 @@ const DEFAULT_GAUGE_OPTIONS: GaugeOptions = {
}, },
colors: ['green', 'yellow', 'red'], colors: ['green', 'yellow', 'red'],
stops: [10, 30, 50], stops: [10, 30],
stat: Stat.CURRENT, stat: Stat.CURRENT,
innerRadius: 50, innerRadius: 50,
outerRadius: 80 outerRadius: 80
@ -54,7 +54,7 @@ export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions
} }
get stops(): number[] { get stops(): number[] {
return this.options.stops; return [...this.options.stops, this.options.maxValue || this.maxValue];
} }
get innerRadius(): number { get innerRadius(): number {

1
src/types.ts

@ -12,6 +12,7 @@ export type GaugeTimeSerie = TimeSerie;
export type GaugeOptionsParams = { export type GaugeOptionsParams = {
innerRadius: number; innerRadius: number;
outerRadius: number; outerRadius: number;
// TODO: minValue
maxValue: number; maxValue: number;
stops: number[]; stops: number[];
colors: string[]; colors: string[];

Loading…
Cancel
Save