Sub topic 5
Choosing the right chart and display options
This chapter covers how to pick a chart type for a dashboard component and how to set its display options. It assumes you can already build a summary or matrix report and add a component to a dashboard in the dashboard editor. Component types (chart, gauge, metric, table) were covered in the previous chapter. Here the focus is on the chart component and the decisions around it.
Start from the question, then the grouping
A chart answers a question about a measure (a number such as a record count or a sum of Amount) split by one or two groupings. The source report decides what the chart can show. Before you open the component editor, write the question down.
- "How much open pipeline sits in each stage?" is one measure by one grouping.
- "How does pipeline by stage differ between regions?" is one measure by two groupings.
- "How many cases did we close each week?" is one measure over time.
The number of groupings in the source report limits your chart choices:
- A summary report with one grouping feeds any single-series chart: column, bar, line, pie, donut, funnel.
- A summary report with two groupings or a matrix report feeds charts that can show a second dimension: stacked column, stacked bar, grouped column, stacked line, and similar.
- A report with no groupings can feed only a metric, a gauge, or a table.
The first code example in the topic spine returns the same grouped totals that an open-pipeline summary report grouped by Stage would hand to a chart component:
SELECT StageName, SUM(Amount) total
FROM Opportunity
WHERE IsClosed = false
GROUP BY StageNameEach row becomes one bar, column, or slice. Reading the query this way helps when a chart looks wrong: if the query result would not make sense as a chart, the report will not either.
Chart types and when to use them
| Chart type | Best for | Watch out for |
|---|---|---|
| Vertical column | Comparing a few categories, or values over time | Long category labels get truncated or rotated |
| Horizontal bar | Ranking many categories, long labels such as account names | Order follows the report sort, so sort the report first |
| Line | Trends over a date grouping | Gaps in dates can mislead; groupings that are not ordered make no sense on a line |
| Pie or donut | Share of a whole across a small number of slices | More than about five slices become hard to read; negative values do not display as expected |
| Funnel | Stage progression where each stage is a subset of the previous one | Only meaningful when stages are ordered and shrink |
| Stacked column or bar | Total plus composition per category | Only the bottom segment compares easily across columns |
| Grouped column | Comparing the second grouping side by side | Gets crowded quickly with many groups |
| Scatter | Relating two measures across records | Requires a report that supports it, and few users need it |
A simple decision path:
Column versus bar
Use a column chart when there are few categories with short labels, or when the horizontal axis is time. Use a bar chart when labels are long or when you rank many items. A top-ten list of accounts by revenue reads better as a bar chart, because the names are horizontal.
Pie and donut
Pie and donut charts show proportions. They work when the slices sum to something meaningful and there are only a handful of them. Salesforce lets you cap the number of slices through the "Max Values Displayed" option, with the rest grouped as "Others" when you use it. If a viewer needs to compare two slices of similar size, switch to a bar chart.
Funnel
A funnel suits pipeline stages when you want to show drop-off. It depends on the order of the groupings. If the report is sorted alphabetically by stage, the funnel will not look like a funnel. Sort the groupings in the report in stage order, or use the stage's own picklist order if your report type sorts by it.
Stacked charts and matrix reports
A matrix report has groupings on both rows and columns. In a stacked chart, one grouping becomes the axis and the other becomes the segments. The chart editor lets you choose which grouping is used for which role in some cases, so test both. Stacked charts with more than four or five segments produce a rainbow that nobody can read. Reduce the series by filtering the report or by using "Max Values Displayed".
Display options in the component editor
Once the chart type is chosen, the display options decide how readable it is. These are the settings you will use most often.
Axes and values
- Y-Axis / X-Axis: choose which measure and which grouping appear. A report may contain several summary fields (record count, sum of Amount, average of Amount). The component uses one of them, or in a combo chart, two.
- Axis range: the axis can start at zero (the default for most charts) or at a custom minimum. A truncated axis exaggerates differences, so use it deliberately.
- Sort rows by: label ascending or descending, or value ascending or descending. This sorts the chart, independent of how the report is sorted, so a ranking chart should be sorted by value.
- Max values displayed: limits how many groups the chart shows. It is the main control against crowded charts. Ask yourself whether the viewer needs the 40th account or only the top ten.
Labels, legends and totals
- Show values: puts the number on each bar or slice. Helpful with few items, noisy with many.
- Legend position: needed for stacked, grouped and pie charts, where color alone identifies a series.
- Chart title, subtitle and footer: the title should state the question, such as "Open pipeline by stage (USD)". The footer is a good place for the data scope, for example "Excludes closed opportunities".
- Show total or "Include other" options: where offered, a total helps the viewer know what the whole represents.
Drill-down and click-through
Clicking a component in a dashboard opens the source report. This is why the source report matters: users who lack access to the report folder cannot follow the link. Chapter content on folder sharing covers that in detail. The "Display Units" and "Link to" settings in the component editor can also change what the click target is, for example pointing to a record or an external page, but the default report link is the most predictable choice.
Colors and themes
Salesforce offers color palettes and light or dark dashboard themes. Choose a palette that distinguishes series for color-blind viewers. Do not rely on color alone to mark good versus bad. Pair it with a label or a position in the layout.
Gauges, metrics and tables as companions
A chart gives shape. A metric gives one number. Many good dashboards put one or two metrics at the top and charts beneath. A gauge shows a value against a target through colored ranges (for example red, yellow, green). Set the breakpoints deliberately, because the thresholds are part of the message. A gauge with default breakpoints that nobody agreed on creates arguments.
A table component lists the top rows of a grouping, which is useful when the viewer needs exact figures next to the chart. Keep to a handful of columns.
Edge cases and common mistakes
- Chart is empty or shows "No data". The source report returned no rows for the running user, or the report has no groupings. Open the source report as the running user's view of the data and check.
- Wrong measure appears. The report has several summary fields and the component picked a different one. Open the component and set the measure explicitly.
- Labels look cryptic. Groupings on lookup fields show record names, and groupings on date fields show the date granularity chosen in the report (day, week, month, fiscal quarter). Change the granularity in the report, not in the chart.
- Funnel or line looks scrambled. The order comes from the sort of the groupings. Fix the sort.
- Too many groups. Charts display a limited number of groups, and viewers cannot read dozens of them anyway. Use filters in the report or "Max values displayed".
- Currency and units. A chart in a multicurrency org shows values in the corporate or user currency according to org settings, which can confuse comparisons between dashboards. State the currency in the title.
- Using a pie for time. A pie does not show order, so it hides trends. Use a column or line.
Practical workflow
- Write the question the component answers.
- Open or create the source report and confirm it has the right groupings and summary fields.
- Add the component and pick the simplest chart type that answers the question.
- Set sort order and max values displayed before touching colors.
- Write a title that states the question and a footer that states the scope.
- Preview the dashboard as another user if the running user differs from viewers. The next chapters cover how the running user changes what appears.
Exercise
A sales manager wants a component that ranks the top ten accounts by closed-won amount this year. The account names are long. Which chart type, sort order, and max values setting would you choose, and which report grouping does it need?
Show answer
Use a horizontal bar chart, because long labels read better horizontally. Sort by value descending and set Max Values Displayed to 10. The source report needs a summary grouping by Account Name with a Sum of Amount summary field, filtered to closed-won opportunities with a close date in the current fiscal year.
Exercise
A funnel chart for opportunity stages shows stages in alphabetical order rather than as a narrowing shape. Where do you fix this, and why does changing the chart type alone not help?
Show answer
Fix it in the source report by sorting the stage grouping in pipeline order. The chart takes its order from the report grouping, so another chart type would still show the stages in the wrong sequence.