Skip to content

scenario_dag class

Displays the DAG of a scenario.

Methods

__init__()

__init__(
    scenario=None,
    render=True,
    show_toolbar=True,
    height="50vh",
    width="100%",
    on_action=None,
    id=None,
    class_name=None,
) -> None

Create a new scenario_dag element.

Parameters:

Name Type Description Default
scenario dynamic(Union[Scenario, list[Scenario]])

The Scenario whose diagram is displayed.
If the value is a list, it must have a single element otherwise nothing is shown.

None
render dynamic(bool)

If False, this scenario's DAG is not displayed.

True
show_toolbar bool

If False, the DAG toolbar is not visible.

True
height str

The maximum height, in CSS units, of the control.

50vh
width str

The maximum width, in CSS units, of the control.

100%
on_action Union[str, Callable]

A function or the name of a function that is triggered when a a node is selected.

All the parameters of that function are optional:

  • state (State): the state instance.
  • entity (DataNode or Task): the entity that was selected.
None
id str

The identifier that will be assigned to the rendered HTML component.

None
class_name dynamic(str)

The list of CSS class names associated with the generated HTML Element.
These class names will be added to the default taipy_gui_core-[element_type].

None