![]() Zooming in and drilling through a line chart to view individual records. And, of course, we can always select a section of the line to filter the results for that time period, and drill through to see those individual, unaggregated records. You can select other time intervals (day, week, year) by clicking on by month.Īs soon as you add the grouping, Metabase updates the chart: Fig. Hover over Created At and click on the plus button to add a grouping by month. In the Group by section, under Order, mouse over the Created At field click on the + button to add the grouping.r Fig. Next, we’ll want to group our order totals by month. Metabase defaults to counting the records, but we’re not interested in the number of orders, so we’ll click on Count and change it to Sum of and select the Total column from Order. Click on the green Summarize button to pull up the Summarize sidebar. (It’s much more common to plot unaggregated rows in visualizations like pin maps, or a scatterplot, e.g., to show each product plotted by price and rating.)Īs an example of an aggregated metric, let’s plot the sum of order totals for each month. To make the chart more legible, we can summarize the data, so each point on the line chart is an aggregate of rows-“buckets” of records. (If you hover over the gray warning triangle in the upper right, you’ll see that Metabase has only plotted 2,000 rows.) That’s technically a line chart, but it looks more like the cardiograph of a startled hummingbird, and that’s even after Metabase has truncated the results shown. A noisy line chart after setting the x and y axes, without first summarizing the data. Metabase will automatically plot the line chart: Fig. For example, you could show order totals over time by setting the x axis to created_at and the y axis to total. ![]() To create a line chart, you’ll need to pick a metric for Metabase to plot over time. Metabase can’t read minds (yet), so it doesn’t know which columns from the Orders table to use for the x and y axes. An empty line chart, before setting the x and y axes. If you select line chart, Metabase will present you with an empty line chart. Let’s start with how not to create a line chart. The left sidebar shows available visualization types for the results. The orders table's records displayed using the default table visualization. Click on the Visualization button in the bottom right to bring up the Visualization sidebar. Click Visualize, and you should get a table that looks like figure 1. Choose Raw Data > Sample Database, then pick the Orders table. From the main navigation bar, click on + New > Question, which will take you to Metabase’s notebook editor. Let’s take a look at the Orders table in the Sample Database that ships with Metabase. These charts are typically used to plot a time series (also known as a run chart): a set of markers connected by lines, with the x axis showing the passage of time and the y axis plotting the value of a metric at each moment. Line charts are good for plotting data captured in a sequence, whether that sequence is the passage of time, or steps in a process or flow. ![]()
0 Comments
Leave a Reply. |