瀏覽代碼

fix linter

namnguyen 1 年之前
父節點
當前提交
58642348dc
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      frontend/taipy-gui/src/components/Taipy/Metric.tsx

+ 4 - 4
frontend/taipy-gui/src/components/Taipy/Metric.tsx

@@ -65,7 +65,7 @@ const Metric = (props: MetricProps) => {
                 return mode;
             })(),
             delta: {
-                reference: typeof threshold === 'number' && typeof delta === 'number' ? threshold - delta : undefined,
+                reference: typeof value === 'number' && typeof delta === 'number' ? value - delta : undefined,
             },
             gauge: {
                 axis: {range: [
@@ -81,12 +81,12 @@ const Metric = (props: MetricProps) => {
             },
         }
     ]), [
+        value,
+        delta,
+        threshold,
         props.min,
         props.max,
         props.type,
-        value,
-        threshold,
-        delta
     ]);
 
     const style = useMemo(