Przeglądaj źródła

chart: do not show warning on no data bound when figure is declared (#1107)

* do not show warning on no data bound when figure is declared
resolves #1106

* check data for non chart control

---------

Co-authored-by: Fred Lefévère-Laoide <Fred.Lefevere-Laoide@Taipy.io>
Fred Lefévère-Laoide 1 rok temu
rodzic
commit
09ace5221a
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      taipy/gui/_renderers/builder.py

+ 2 - 2
taipy/gui/_renderers/builder.py

@@ -802,8 +802,8 @@ class _Builder:
                 else:
                     self.__set_default_value(var_name, var_type=var_type)
         else:
-            if var_type == PropertyType.data:
-                _warn(f"{self.__control_type}.data property should be bound.")
+            if var_type == PropertyType.data and (self.__control_type != "chart" or "figure" not in self.__attributes):
+                _warn(f"{self.__control_type}.{var_name} property should be bound.")
             value = self.__attributes.get(var_name)
             if value is not None:
                 if native_type: