Diagrams#
Mermaid diagrams#
- marimo.mermaid(diagram: str) Html #
Render a diagram with Mermaid.
Examples.
diagram = ''' graph LR A[Square Rect] -- Link text --> B((Circle)) A --> C(Round Rect) B --> D{Rhombus} C --> D ''' mo.mermaid(diagram)
Mermaid is a tool for making diagrams such as flow charts and graphs. See the Mermaid documentation for details.
Args.
diagram
: a string containing a Mermaid diagram
Returns.
An
Html
object.
Statistic cards#
- marimo.stat(value: str | int | float, label: str | None = None, caption: str | None = None, direction: Literal['increase', 'decrease'] | None = None, bordered: bool = False) Html #
Display a statistic.
Optionally include a label, caption, and direction.
Args.
value
: the value to displaylabel
: the label to displaycaption
: the caption to displaydirection
: the direction of the statistic, eitherincrease
ordecrease
bordered
: whether to display a border around the statistic
Returns.
An
Html
object representing the statistic.