The x-axis lists the positions, and the data is one number per position.
xychart
x-axis [jan, feb, mar, apr]
y-axis "Revenue" 0 --> 100
line [10, 40, 60, 90]bar draws the same data as bars instead of a line.
xychart
x-axis [jan, feb, mar, apr]
y-axis "Revenue" 0 --> 100
bar [10, 40, 60, 90]A line and a bar can share a chart, and the title goes on its own line.
xychart
title "Sales revenue"
x-axis [jan, feb, mar, apr]
y-axis "Revenue (in $)" 4000 --> 11000
line [5000, 6000, 7500, 8200]
bar [4000, 5500, 7000, 8100]A label before the list names the axis.
xychart
x-axis "Month" [jan, feb, mar, apr]
y-axis "Revenue" 0 --> 100
line [10, 40, 60, 90]