The Line Chart Block adds a line chart (line graph) to a page or post. Line charts are typically used to display changes over time. You can compare changes between multiple subjects by adding multiple lines.
In the example below, we’re tracking enrollments from January to June and comparing enrollments by year.
Add and design a Line Chart Block
Here are the basic steps to add a Line Chart Block. We recommend preparing data in a .csv before you begin.
Tip: For detailed steps and screenshots, visit Chart Blocks overview.
- Open a page or post editor.
- Click an Insert Point or the +.
- Select Line Chart from the menu.
- For more detailed steps, visit Adding blocks.
- Add data. You can either paste it from a .csv opened in a plain text editor in the Import / Export tab or enter it manually in the Data tab of the block editor.
- Design your chart in the Design tab (add a title, legend, and color palette).
- Click Apply.
Follow these guidelines when preparing data for the Line Chart Block.
The X axis (created by rows) is typically for intervals. Each row in your data creates a new interval in the chart.
The Y axis (created by columns) is typically for the value you’re tracking over time (for example, sales, revenue, or population). Each column in your data creates a new line in the chart.
If you’re comparing multiple lines, add multiple columns.
- On your live site, tooltips appear on hover to show details of a data point.
- It isn’t possible to add uncertainties or forecasts (gray or dotted lines that anticipate trends).
- The title, caption, and legend can’t be moved around the block.