Skip to content

Commit

Permalink
Add chart options to fsapi (watertap-org#1413)
Browse files Browse the repository at this point in the history
* add chart_type and chart_group to modelexport

* update test to include chart_type and chart_group

---------

Co-authored-by: Ludovico Bianchi <lbianchi@lbl.gov>
Co-authored-by: Adam Atia <aatia@keylogic.com>
  • Loading branch information
3 people authored Jun 6, 2024
1 parent 3d42a54 commit 6ef2765
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions watertap/ui/fsapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions watertap/ui/tests/test_fsapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)


Expand Down

0 comments on commit 6ef2765

Please sign in to comment.