How-To Guides
...
Reporting Guides
Create Your Own Report with Re...

Creating a Line Chart

2min

This is the eighth step of creating your own report with the Reporting module.

In this section, we are going to create a line chart to understand the average price of a ticket by month across the entire dataset.

  1. Create a new visualization, as before:
    • Select New > Chart and then tutorial_flights as the data source and Line Chart as the visualization type.
  2. Set the time filters:
    • In the Time section, as before, keep the Time Column as Travel Date and Time Grain as month, but this time for the Time Range, select No filter, as we want to look at the entire dataset.
  3. Define your query:
    • Within Metrics, remove the default COUNT(*) and add Cost. This time, we want to change how this column is aggregated to show the mean value: we can do this by selecting AVG in the aggregate dropdown.
    • Next, select Run Query to show the data on the chart.
Document image


How does this look? Well, we can see that the average cost goes up in December. However, perhaps it doesn’t make sense to combine both single and return tickets, but rather show two separate lines for each ticket type.

Let’s do this by selecting Ticket Single or Return in the Group by box and then selecting Run Query again. Nice! We can see that, on average single tickets are cheaper than returns and that the big spike in December is caused by return tickets.

Customize your Visualization Further

Our chart is looking pretty good already, but let’s customize some more by going to the Customize tab on the left-hand pane. Within this pane, try changing the Color Scheme, removing the range filter by selecting No in the Show Range Filter dropdown, and adding some labels using X-Axis Label and Y-Axis Label.

Document image


Once you’re done, Save as Tutorial Line Chart, use Add chart to existing dashboard to add this chart to the previous ones on the Tutorial Dashboard, and then Save & go to dashboard.