QuadrantChart Class¶
- class QuadrantChart¶
Represents a Quadrant Chart
- addPoint(Point ...$point)¶
Add point(s) to the Quadrant Chart
- Parameters:
...$point (
Point) – The point(s)
- Returns:
A new
QuadrantChartinstance with the point(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
- withAxes(array|string $x, array|string $y)¶
Set the labels for the X and Y axes
- Parameters:
$x (
list<string>|string) – X-axis label. Either (string) left axis label, or (array) left/right labels$y (
list<string>|string) – Y-axis label. Either (string) bottom axis label, or (array) bottom/top labels
- Returns:
A new
QuadrantChartinstance with axes labels- Return type:
- withComment(string $comment)¶
Set a comment for the Point
- Parameters:
$comment (
string) – The comment
- Returns:
A new
QuadrantChartinstance with the comment- Return type:
- withPoint(Point ...$point)¶
Set point(s) on the Quadrant Chart
- Parameters:
...$point (
Point) – The point(s)
- Returns:
A new
QuadrantChartinstance with the point(s)- Return type:
- withQuadrants(string $tr, string $tl, string $bl, string $br)¶
Set the quadrant labels
- Parameters:
$tr (
string) – Label for the Top Right quadrant$tl (
string) – Label for the Top Left quadrant$bl (
string) – Label for the Bottom Left quadrant$br (
string) – Label for the Bottom Right quadrant
- Returns:
A new
QuadrantChartinstance with the quadrant labels- Return type:
- withTitle(string $title)¶
Set a title for the Quadrant Chart
- Parameters:
$title (
string) – The title
- Returns:
A new
QuadrantChartinstance with the title- Return type: