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
Content copied to clipboard
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
Content copied to clipboard
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
Content copied to clipboard
Return
the generated diagram node
Parameters
lines
- Optional
- Likely named
whether to draw lines
bars
- Optional
- Likely named
whether to draw bars
x
- Optional
- Likely named
optional label for the X axis
y
- Optional
- Likely named
optional label for the Y axis
yrange
- 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
caption
- Optional
- Likely named
optional caption. If a caption is present, the diagram will be numbered as a figure.
values
- 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.