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'],
stops: [10, 30, 50],
stops: [10, 30],
stat: Stat.CURRENT,
innerRadius: 50,
outerRadius: 80
@ -54,7 +54,7 @@ export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions
}
get stops(): number[] {
return this.options.stops;
return [...this.options.stops, this.options.maxValue || this.maxValue];
}
get innerRadius(): number {

1
src/types.ts

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

Loading…
Cancel
Save