xychart
.xychart lines:{Boolean = true}
bars:{Boolean = false}
x:{String? = null}
xrange:{Range? = null}
xtags:{Iterable<Any>? = null}
y:{String? = null}
yrange:{Range? = null}
caption:{String? = null}
values:{Iterable<Any>}
-> Node
Creates a chart diagram on the XY plane.
The following example plots 4 points at (1, 5), (2, 2), (3, 4), (4, 10), connected by a line:
.xychart
- 5
- 2
- 4
- 10
Multiple lines can be plotted by supplying a list of lists of points. Each list will be plotted as a separate line:
.xychart
- |
- 5
- 8
- 3
- |
- 3
- 5
- 10
- |
- 8
- 3
- 5
Return
the generated diagram node
Parameters
- Optional
- Likely named
whether to draw lines
- Optional
- Likely named
whether to draw bars
- Optional
- Likely named
optional label for the X axis
- Optional
- Likely named
optional label for the Y axis
- Optional
- Likely named
optional range for the Y axis. If open-ended, the range will be set to the minimum and maximum values of the Y values
- Optional
- Likely named
optional caption. If a caption is present, the diagram will be numbered as a figure.
- Likely a body argument
the Y values to plot. They can be a list of points, which will be plotted as a single line, or a list of lists of points, which will be plotted as multiple lines.
Throws
if both xrange and xtags are set