How to Make Charts to Visualize Your Data

After you run a query, look for the Chart button to create a chart.

Line chart

Let's look at how many questions are asked per day on StackOverflow:

select *
from `bigquery-public-data.stackoverflow.posts_questions`
where creation_date between '2020-01-01' and '2020-01-31'

line chart

If we wanted to see two series, one for answered questions, and another for unanswered questions, we need an answered boolean column:

  answer_count > 0 as answered
from `bigquery-public-data.stackoverflow.posts_questions`
where creation_date between '2020-01-01' and '2020-01-31'

line chart two series

Here's a video tutorial showing how to create a line chart:

Bar chart

Let's look at the top 10 most popular tags on StackOverflow and make a bar chart.

select *
from `bigquery-public-data.stackoverflow.tags`
order by count desc
limit 10

bar chart

Pie chart

Using the results from the previous pie chart example, here's what it would look like if we changed the chart type to a pie chart:

Combo Chart

Given a chart with two distinct sets of data with the same x-axis, like the data set below:


You can now create charts that have two y-axes. For example, this chart has a bars representing the number of orders on the left y-axis, and a line representing the number of ratings on the right y-axis.

combination chart showing two datasets

Big Number Chart

If you just want to show a number in your chart, generally to make a dashboard more clear, you can use the big number chart: combination chart showing two datasets

Ready for a modern SQL editor?