Generate line chart

Plot an ordered numeric series as connected line segments.

freeworks offlinenothing uploaded
ToolLine Chart Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Ordered observations are mapped to x positions and numeric y values, then connected with straight or smoothed segments; multiple series share the same coordinate scales. The x ordering carries meaning, so points should represent a sequence such as time or rank.

  • Connecting adjacent observations emphasizes change over an ordered domain.

Worked example

Temperature Trend
Generate a line chart of temperature over time
Input
											Title: Weekly Temperature
X axis: Day
Y axis: Temp (F)
Series: [{"name":"Temperature","data":[68,72,75,71,69,74,76]}]
Labels: ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]
										
Output
												xychart-beta
    title "Weekly Temperature"
    x-axis "Day" ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
    y-axis "Temp (F)"
    line [68, 72, 75, 71, 69, 74, 76]
											

When to use this

Revenue reports, latency monitors, and measured trends use line charts.

Edge cases

  • Unsorted timestamps draw segments in the wrong direction.
  • Missing observations need gaps or interpolation.
  • A dual-axis chart can imply a correlation that shares no scale.