How to Create a Line Chart

What is a Line Chart

When a series of data points are connected using straight lines, we get a line chart. Line charts are used to display quantitative values over a continuous interval, often time. The x-axis is typically a time interval and y-axis has quantitative values.

This is what a typical line chart looks like:

Revenue Line Chart

When 2 or more such lines are included in a chart, they can be compared with one another. For example, we can compare sales v/s expenses for the same time period to get an overview of the company’s performance.

Capacity Performance Line Chart

When to use a Line Chart

A line chart is used to depict changes in data. The upward slope indicates an increase in the value and downward slope indicates a decrease. These slopes communicate the trend in a dataset.

Choose a line chart to visualize data when you want to:

  • See the distribution of data to find outliers, observe the trend
  • Analyze trends during a specific time period
  • Compare & establish a relationship between 2 or more variables


Comparisons with other trend-depicting charts

Line Chart Comparison


How to create a Line Chart

Chartio is a business intelligence software tool that simplifies your tasks of data visualization and hence makes data analysis more effective. We will now learn how to create a Line Chart using Chartio following simple steps:

  1. On the Explore page select Chartio Demo Source as your data source.
  2. Expand the Subscriptions table, drag & drop Plan Id from Subscriptions to Measures. Rename the label as Subscriptions.
  3. Drag & drop Created Date from the Users table to Dimensions and Title from Plans to Dimensions as well.
  4. From the Users again, drag & drop Created Date to Filters. Click on it & select last N weeks instead of earlier than from the dropdown list. Change the value (1) to 4, click Ok and select the Table format for visualization.
    The line chart requires the data to be in two or more columns, where second through last column must be numeric. To change the data to suit these requirements, we pivot data using Chartio’s Data Pipeline
  5. Click (+Add Transformation) under Layer 1 to select Pivot Data and click Apply & Close.
  6. We now have the data in the required format. Select Line from the chart options and you have a line chart!

Best practices of using a Line Chart

To ensure optimization of Line Chart,

  1. Use it when you have a continuous data set
  2. Often used for showing metric changes over time
  3. Select only solid lines to have more clarity (unless you are limited to a single color)
  4. Include only up to 4 lines for comparisons to avoid visual distractions. Use a panel of individual charts to display 4 or more data series to have more clarity.

The line chart is one of the most important tools to understand trends in a data set and combining it with other trend-depicting charts can ensure a complete utilization of line charts for data-driven decision making.  


About Gargi Shirish Joshi

Hello readers! I am from India, currently studying dual masters in international business and business analytics from Hult International Business School in San Francisco. I am passionate about numbers/data and hence working with Chartio as a content marketing intern for data analysis at Data School. Keep learning!