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
whether to draw lines
whether to draw bars
optional label for the X axis
optional range for the X axis. If open-ended, the range will be set to the minimum and maximum values of the X values. Incompatible with xtags.
optional categorical tags for the X axis. Incompatible with xrange.
optional label for the Y axis
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 caption. If a caption is present, the diagram will be numbered as a figure.
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