Browse Source

rversed options

merge-requests/4/head
vargburz 3 years ago
parent
commit
5135e3f47d
  1. 1
      src/models/options.ts
  2. 8
      src/module.ts
  3. 1
      src/types.ts

1
src/models/options.ts

@ -43,6 +43,7 @@ export class Options {
minValue: this.minValue,
valueFormatter: (val: any) => val.toFixed(2),
defaultColor: 'green',
reversed: this.grafanaOptions.gauge.reversed,
stops: [
{
color: 'green',

8
src/module.ts

@ -79,7 +79,13 @@ export const plugin = new PanelPlugin<PanelOptions>(Panel).setPanelOptions((buil
category: ['Extremum'],
showIf: (config) => config.visualizationType === Pod.GAUGE,
})
.addBooleanSwitch({
path: 'gauge.reversed',
name: 'Reversed',
defaultValue: false,
category: ['Direction'],
showIf: (config) => config.visualizationType === Pod.GAUGE,
})
.addCustomEditor({
id: 'icons',
path: 'gauge.icons',

1
src/types.ts

@ -4,6 +4,7 @@ export interface PanelOptions {
min: ExtremumOptions;
max: ExtremumOptions;
value: ExtremumOptions;
reversed: boolean;
};
}

Loading…
Cancel
Save