Line Chart
  • 02 Aug 2022
  • 3 Minutes to read
  • Contributors
  • Dark

Line Chart

  • Dark


Line charts offer a straightforward way to convey changes over time.

In this walkthrough, we will create a line chart that displays the popularity of the top 10 children names in California from 1965 to the present.

Reference Content

The following articles may be useful resources as you build your chart:

  • Creating a Chart: A walkthrough of the overall process of chart selection and creation.
  • Using Preset Explore: How to work with the Explore page, the primary interface used when creating a chart.

Step 1: Create New Chart

To create a line chart, in the Toolbar, select + Chart.

The Create a new chart screen appears.

In the Choose a Dataset field, select a dataset to build your query from. In this case, we are selecting a dataset that includes California birth name data.

In the Search field, enter: line chart

Select the Line Chart card in the chart gallery and then select Create New Chart.


Step 2: Configure the Chart

Time Panel

Reference: How to Configure the Time

The first step is to define the Time Column field. This field contains a time-related column from the dataset. More than likely, this field is pre-populated for you.

You can recognize time columns by looking in the Columns listing in the Metrics & Columns panel and finding those with a small clock icon.

In this example, there is only one time column available, so there is no need to make any changes to the Time Column field.

The Time Grain field is used to specify the granularity in terms of how frequently data is presented in the visualization. Preset supports a range of granularities from a second up to a year, and everything in-between.

For this example, we will select Day.

Next, let's configure the Time Range field.

This field is used to specify a date & time range from which data will be extracted for the query. Generally-speaking, if you're working with a small dataset size, then it is best to use the No filter option (i.e., use all available data). If the dataset size is larger, though, then a date & time range is more appropriate.

In this case, we will use data from 01-01-1965 to the present. Use the Custom range type to create this and, when done, select Apply.

It looks as follows:


Our completed Time panel looks as follows:


Query Panel

For the configuration we will use birth data from California and group it by name.

Let''s start by dragging the California birth data column (num_california) to the Metrics column. We'll Aggregate by SUM and assign a metric label of "California Data."

In the Group By field, we will drag & drop the name column.

Also, in the Series Limit field, let's select 10 since the chart will display the top 10 names.

Here is how it's done:


The completed Query panel looks as follows:


Step 3: Run the Query

Reference: The Content Panel

Select Run or, in the Content panel, Run Query.


The line chart appears in the Content panel.


Most Preset charts are interactive, so feel free to hover your cursor over different elements of the visualization to get more data.

Additionally, you can expand the Data section to view data results and samples from the query.

Step 4: Finalizing the Chart

If you're happy with the visualization, be sure to give it a name:


If you'd like to customize your visualization, select the Customize tab.

Lastly, be sure to save your chart. Remember that you can also save your chart to a dashboard—or create a brand new dashboard—directly from the Save menu!

Final Chart


Was this article helpful?

What's Next