Chart types and data configuration
Learn the recommended data shape per chart type, when to use Simple mode vs. SQL mode, and compare periods with a full year of data.
You finished a widget end-to-end in the previous lesson. As you repeat that flow, the two decisions that most often trip analysts up are picking the chart type and configuring its data. This lesson lays both out on one page.
Chart type is decided by data shape
The widget library offers a wide range of charts, but each chart has a data shape it fits. The four below are the ones analysts run into most.
- Bar chart — One categorical column (string) × one numeric column. Goal: comparison.
- Line chart — Time (or ordinal) × one or two numeric columns. Goal: trend.
- Donut / Pie — Share by category. Recommended only when categories ≤ 7.
- Map — Two columns of latitude/longitude + a label. Goal: spatial distribution.
When a chart doesn't come out the way you intended, working backwards from "what shape does this chart expect?" is usually faster. The chart reference in the user docs lists the expected inputs per chart type in a table.
Simple mode vs. SQL mode
The widget configuration panel offers two data modes:
- Simple mode — Select dataset columns for fields such as the X-axis and Y-axis, then choose an aggregation. It is the fastest way to build a chart without writing code.
- SQL mode — Write SQL against the selected analytics source. Use it for conditions, calculations, or grouping that Simple mode cannot express.
The decision rule is simple:
| Situation | Mode |
|---|---|
| Mapping one or two columns is enough | Simple |
| Sum, average, or count is enough | Simple |
| You need a custom condition or calculation | SQL |
| You are not comfortable with SQL | Simple |
When you switch to SQL mode, the same chart types and the same widget options keep working. The only difference is how the data is fetched.
Date range selector — applying one period to multiple widgets
Use a date range selector when multiple widgets on a dashboard need to share the same period. This exercise uses the Regional daily foot traffic dataset created from regional_daily_people_count_2025.csv in Lesson 3. Its winter low, summer vacation increase, weekend effect, and year-end increase make changes between selected periods easy to recognize.
Add a daily trend widget
- Add a Line chart to the dashboard from the previous lesson.
- Select the
Regional daily foot trafficdataset as the Analytics source and keep Simple mode. - Select
datefor the X-axis,people_countfor the Y-axis, and Sum for aggregation. - Name the widget
Daily foot traffic trend.
Connect the date range selector
- Add a Date range selector from the widget library to the top of the dashboard.
- Set its start date to
2025-01-01and end date to2025-12-31. - Select the regional bar chart and choose
dateunder Analytics source → Date filter column. - Set the daily trend chart's date filter column to
dateas well. - Save the dashboard.
Compare equal-length ranges so the effect is easy to see:
- Select Custom range in the date range selector to open the start and end date fields.
- Select
2025-01-01through2025-01-31for the winter baseline. - Select
2025-07-01through2025-07-31. Total traffic rises substantially, with an especially visible vacation-period increase inbusanandulsan. - Narrow the range to
2025-12-20through2025-12-31to inspect the year-end increase. - Restore
2025-01-01through2025-12-31to see the full trend.
Across all regions, the provided data totals 534,333 people in January and 1,135,984 in July. If both widgets update together and July is clearly higher, the selector is connected correctly.
Simple mode injects the period into its generated query automatically. In SQL mode, Portal adds a condition for the selected date column or updates the dates in an existing condition.
Self-check
- Did you add a line chart using
dateandpeople_count? - Did you try both Simple mode and SQL mode against the same dataset?
- When you switch between January and July, do both widgets update together?
Next lesson
The next lesson is about showing results to other people. It covers the permission model and sharing, plus how the AI Assistant lets you call all of the above more quickly.