فهرست منبع

HUE-3683 [editor] Hive pie chart graphing js error

Enrico Berti 9 سال پیش
والد
کامیت
bc7e1fe
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      desktop/libs/notebook/src/notebook/templates/editor_components.mako

+ 5 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -2245,9 +2245,13 @@ ${ hueIcons.symbols() }
         }
       });
       $(rawDatum.counts()).each(function (cnt, item) {
+        var val = item[_idxValue] * 1;
+        if (isNaN(val)) {
+          val = 0;
+        }
         _data.push({
           label: hueUtils.html2text(item[_idxLabel]),
-          value: item[_idxValue],
+          value: val,
           obj: item
         });
       });