SankeyDiagram Class¶
- class SankeyDiagram¶
- addDataset(array ...$Dataset)¶
Add Dataset(s)
Each dataset is a three element array of the form array{string, string, float}. The elements are: source, target, value.
- Parameters:
...$Dataset (
Dataset) – The Dataset(s)
- Returns:
A new instance of
SankeyDiagramwith the Dataset(s) added- Return type:
- render(array $attributes = [])¶
Renders the diagram
- Parameters:
$attributes (
array) –HTML attributes for the <pre> tag as name=>value pairs
Note
The mermaid class is added
- Returns:
Mermaid diagram code in a <pre> tag
- Return type:
string
- withComment(string $comment)¶
Add a comment
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
SankeyDiagramwith the comment- Return type:
- withDataset(array ...$Dataset)¶
Set Dataset(s)
Each dataset is a three element array of the form array{string, string, float}. The elements are: source, target, value.
- Parameters:
...$Dataset (
Dataset) – The Dataset(s)
- Returns:
A new instance of
SankeyDiagramwith the Dataset(s)- Return type: