|
@@ -258,3 +258,20 @@ def test_chart_indexed_properties_with_arrays_builder(gui: Gui, helpers):
|
|
|
""lines": [null, {"dash": "dashdot"}, {"dash": "dash"}, null, {"dash": "dashdot"}, {"dash": "dash"}]", # noqa: E501
|
|
|
]
|
|
|
helpers.test_control_builder(gui, page, expected_list)
|
|
|
+
|
|
|
+
|
|
|
+def test_chart_none_data(gui: Gui, helpers):
|
|
|
+ data = None # noqa: F841
|
|
|
+ with tgb.Page(frame=None) as page:
|
|
|
+ tgb.chart( # type: ignore[attr-defined]
|
|
|
+ data="{data}",
|
|
|
+ )
|
|
|
+ expected_list = [
|
|
|
+ "<Chart",
|
|
|
+ "data={_TpD_tpec_TpExPr_data_TPMDL_0}",
|
|
|
+ 'defaultConfig="{"traces": []}"',
|
|
|
+ 'libClassName="taipy-chart"',
|
|
|
+ 'updateVarName="_TpD_tpec_TpExPr_data_TPMDL_0"',
|
|
|
+ ]
|
|
|
+ gui._set_frame(inspect.currentframe())
|
|
|
+ helpers.test_control_builder(gui, page, expected_list)
|