Просмотр исходного кода

gauge working without thresholds

Peter Holmberg 7 лет назад
Родитель
Сommit
f8c8f2ec2c
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      public/app/viz/Gauge.tsx

+ 2 - 3
public/app/viz/Gauge.tsx

@@ -108,6 +108,7 @@ export class Gauge extends PureComponent<Props> {
 
   draw() {
     const {
+      baseColor,
       maxValue,
       minValue,
       timeSeries,
@@ -147,12 +148,10 @@ export class Gauge extends PureComponent<Props> {
       }),
       {
         value: maxValue,
-        color: BasicGaugeColor.Red,
+        color: thresholds.length > 0 ? BasicGaugeColor.Red : baseColor,
       },
     ];
 
-    console.log(formattedThresholds);
-
     const options = {
       series: {
         gauges: {