From 6ef2765a803b4441e66fa7f8e7d17ac8fddb25d2 Mon Sep 17 00:00:00 2001 From: MichaelPesce <35114629+MichaelPesce@users.noreply.github.com> Date: Thu, 6 Jun 2024 15:35:31 -0500 Subject: [PATCH] Add chart options to fsapi (#1413) * add chart_type and chart_group to modelexport * update test to include chart_type and chart_group --------- Co-authored-by: Ludovico Bianchi Co-authored-by: Adam Atia --- watertap/ui/fsapi.py | 2 ++ watertap/ui/tests/test_fsapi.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/watertap/ui/fsapi.py b/watertap/ui/fsapi.py index 4523cfc82e..678f648fec 100644 --- a/watertap/ui/fsapi.py +++ b/watertap/ui/fsapi.py @@ -92,6 +92,8 @@ class ModelExport(BaseModel): is_readonly: Union[None, bool] = Field(default=None, validate_default=True) input_category: Optional[str] = None output_category: Optional[str] = None + chart_type: Optional[str] = None + chart_group: Optional[str] = None # computed obj_key: Union[None, str] = Field(default=None, validate_default=True) fixed: bool = True diff --git a/watertap/ui/tests/test_fsapi.py b/watertap/ui/tests/test_fsapi.py index 8609717906..b2ac55b3ca 100644 --- a/watertap/ui/tests/test_fsapi.py +++ b/watertap/ui/tests/test_fsapi.py @@ -97,6 +97,8 @@ def export_to_ui(flowsheet=None, exports=None, build_options=None, **kwargs): read_only=False, is_output=True, output_category=OutputCategory.feed, + chart_type="stacked_bar", + chart_group="test", )