Commit 142c7eb0 by Torkel Ödegaard Committed by Leonard Gram

Gauges: Fixes error when mappings array was undefined (#18353)

parent bc291f94
...@@ -9,10 +9,6 @@ export interface GaugeOptions extends SingleStatBaseOptions { ...@@ -9,10 +9,6 @@ export interface GaugeOptions extends SingleStatBaseOptions {
export const standardGaugeFieldOptions: FieldDisplayOptions = { export const standardGaugeFieldOptions: FieldDisplayOptions = {
...standardFieldDisplayOptions, ...standardFieldDisplayOptions,
defaults: {
min: 0,
max: 100,
},
}; };
export const defaults: GaugeOptions = { export const defaults: GaugeOptions = {
......
...@@ -13,12 +13,10 @@ export interface SingleStatOptions extends SingleStatBaseOptions { ...@@ -13,12 +13,10 @@ export interface SingleStatOptions extends SingleStatBaseOptions {
prefixFontSize?: string; prefixFontSize?: string;
valueFontSize?: string; valueFontSize?: string;
postfixFontSize?: string; postfixFontSize?: string;
colorBackground?: boolean; colorBackground?: boolean;
colorValue?: boolean; colorValue?: boolean;
colorPrefix?: boolean; colorPrefix?: boolean;
colorPostfix?: boolean; colorPostfix?: boolean;
sparkline: SparklineOptions; sparkline: SparklineOptions;
} }
...@@ -32,6 +30,7 @@ export const standardFieldDisplayOptions: FieldDisplayOptions = { ...@@ -32,6 +30,7 @@ export const standardFieldDisplayOptions: FieldDisplayOptions = {
{ value: -Infinity, color: 'green' }, { value: -Infinity, color: 'green' },
{ value: 80, color: 'red' }, // 80% { value: 80, color: 'red' }, // 80%
], ],
mappings: [],
}, },
override: {}, override: {},
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment