Skip to content

scenario_dag

Displays the DAG of a scenario.

Properties

Name Type Default Description
scenario(★) Scenario|list[Scenario]
dynamic

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

render bool
dynamic
True

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

show_toolbar bool True

If False, the DAG toolbar is not visible.

height str "50vh"

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

width str "100%"

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

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 | Task): the entity (DataNode or Task) that was selected.

id str

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

class_name str
dynamic

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>.

(★)scenario is the default property for this visual element.

Details

When the scenario property is set to an instance of Scenario, the control displays a graphical representation of its DAG.

Here is what the control looks like when connected to a scenario instance:

The DAG of a scenario

The visual representation of the Data Nodes and Tasks is the same as the one used in the Taipy Studio extension.

The toolbar, which can be removed by setting the show_toolbar property to False, contains a button that adapts the rendering area zoom factor to the graph representation.