Chart design with xDM Dashboard
Charts in xDM Dashboard use the data returned by the queries as dimensions or aggregated metrics to render visualizations, such as bar, column, line or pie charts.
Chart components
A Chart is composed of:
-
Measures and Dimensions, defining a Pivot Query, that is the shape of the dataset rendered by the chart. Measures and dimensions are based on query attributes.
-
A Chart Type, defining the visualization used to display the dataset. For example, a line chart.
-
Configuration elements applies to the measures, the dimensions and to the chart itself. These elements depend on the chart type.
Understand the pivot query
The measures and dimensions of a chart define the pivot query. A good representation of a pivot query is in the form of a table:
-
The Rows (aka. Categories) and Columns (aka. Series) of the table are the Dimensions,
-
the Measures are the values in the cells at the intersection of the rows and columns.
In the context of charts:
These terms are equivalent in the rest of the documentation. |
The following example illustrates the various configurations of a pivot table.
A table shows Product as rows and Years as columns. The cell at the intersection of a given product and a given year show the Domestic Revenue (that is the sum of the Domestic Sales) for that product and that year.
The pivot table definition is:
-
Rows: Product
-
Columns: Year
-
Measures: Domestic Revenue: SUM(Domestic Sales)
It renders as:
2017 | 2018 | 2019 | |
---|---|---|---|
Product #1 |
10'000 |
15'000 |
16'000 |
Product #2 |
0 |
1000 |
8'000 |
Product #3 |
16'000 |
10'000 |
11'000 |
A pivot query may have multiple rows and columns as explained below.
From the same product revenue per year table, we add an additional a Quarter column to divide the revenue by quarters.
Pivot table definition:
-
Rows: Product
-
Columns: Year, Quarter
-
Measures: Domestic Revenue: SUM(Domestic Sales)
2017 | 2018 | ||||||
---|---|---|---|---|---|---|---|
Q1 |
Q2 |
Q3 |
Q4 |
Q1 |
Q2 |
… |
|
Product #1 |
2'000 |
2'000 |
3'000 |
3'000 |
4'000 |
4'000 |
… |
Product #2 |
0 |
0 |
0 |
0 |
500 |
0 |
… |
Product #3 |
3'000 |
4'000 |
4'000 |
5'000 |
5'000 |
100 |
… |
Similarly, if we add to the rows the Product Family before the Product, then the table becomes a tree table where the products appear under their parent family.
Pivot table definition:
-
Rows: Product Family, Product
-
Columns: Year, Quarter
-
Measures: Domestic Revenue: SUM(Domestic Sales)
2017 | 2018 | ||||||
---|---|---|---|---|---|---|---|
Q1 |
Q2 |
Q3 |
Q4 |
Q1 |
Q2 |
… |
|
Family #1 |
|||||||
- Product #1 |
2'000 |
2'000 |
3'000 |
3'000 |
4'000 |
4'000 |
… |
- Product #2 |
0 |
0 |
0 |
0 |
500 |
0 |
… |
Family #2 |
|||||||
- Product #3 |
3'000 |
4'000 |
4'000 |
5'000 |
5'000 |
100 |
… |
Similarly, the pivot table may have multiple measures.
If we want to define a second measure, for example, the International Revenue, on the original pivot query, we would have 2 measures on each cell.
Pivot table definition:
-
Rows: Product
-
Columns: Year
-
Measures: Domestic: SUM(Domestic Sales), International: SUM(International Sales)
2017 | 2018 | 2019 | |
---|---|---|---|
Product #1 |
Domestic: 10'000 |
Domestic: 15'000 |
Domestic: 16'000 |
… |
… |
… |
… |
For this situation, you must decide whether the labels of the multiple measures will be inserted as rows or columns. For example, if you use them after the Year column:
Pivot table definition:
-
Rows: Product
-
Columns: Year, (Measures)
-
Measures: Domestic: SUM(Domestic Sales), International: SUM(International Sales)
2017 | 2018 | 2019 | ||||
---|---|---|---|---|---|---|
Domestic |
International |
Domestic |
International |
Domestic |
International |
|
Product #1 |
10'000 |
50'000 |
15'000 |
0 |
16'000 |
78'000 |
… |
… |
… |
… |
… |
… |
… |
We could also put the (Measures) on the rows instead, and the result would be different.
Chart types
The following chart types are supported:
-
Simple Charts:
-
The Number chart (
NUMBER
) displays a single number value, possibly indicating a target goal and a variance. -
The Pivot Table (
PIVOT_TABLE
) displays the pivot query as a table with a hierarchy of rows and columns. -
The Donut or Pie (
DONUT
) charts show percentages of values between categories, by dividing a circle or a disk into proportional segments. -
The Gauge chart shows values as performance gauges for each category, with lower and upper ranges.
-
-
Axis Charts are used to compare values across many categories:
-
The Column (
COLUMN
) and Bar (BAR
) charts show values side by side as vertical or horizontal bars, across categories. These charts support clustering, supporting two or more data series plotted side-by-side and grouped together under categories. -
The Line (
LINE
) graph shows values over a continuous interval. This chart is most frequently used to show trends and data changes over time. It supports multiple data series to compare values and trends. -
The Area (
AREA
) graph is similar to the line graph with the area below the line filled. Area graphs support stacking. -
The Combined (
COMBINED
) chart use a secondary value axis to combine bar/columns and line charts on the same visualization.
-
-
Hierarchical charts
-
The Sunburst (
SUNBURST
) diagram shows a hierarchical distribution of the values in a series of rings. -
The Treemap shows a hierarchy of categories while also displaying quantities for each category via area size.
-
Each chart type is able to display certain shapes of pivot queries.
The table below details configuration examples (measures, rows, and columns) and the result for each chart type.
Chart Type | Measures | Rows/ Categories | Columns/ Series | Description |
---|---|---|---|---|
Column |
SUM(Sales) |
Year, Quarter |
Product_Family |
Shows the revenue for each quarter of each year, with groups of columns/bars representing the product families. Each group may be organized as:
If no Column/Series value is provided, this chart shows the summed revenue for all products as a single bar. |
Line |
SUM(Sales) |
Year, Quarter |
Product_Family |
Shows the trend of revenue over quarters and years as lines, each line representing a product family. Lines may be organized as:
If no Column is provided, this chart shows the summed revenue for all products as a single line. |
Combined |
SUM(Sales), COUNT(Products) |
Year, Quarter |
(Measures), Product_Family |
This chart combines a Column chart displaying the first measure (Sales by Quarter) and a Line chart displaying the second one (Number of Products by Family by Quarter). Each measure is configured a separate axis that supports stacking. |
Donut (Pie) |
SUM(Sales) |
Year |
Product_Family |
Show the distribution of the revenue by product family as a multi-ring donut, each ring representing one year. If no row is provided, a single pie or donut shows the product revenue distribution by family. |
Sunburst |
SUM(Sales) |
Product_Family, Sub_Family, Brand |
N/A |
Show as a series of concentric rings (sunburst) or nested rectangles (treemap) the distribution of the revenue for the product families, sub-family and then brand. |
Gauge |
SUM(Sales) |
Brand |
Year |
Show a series of gauges representing the revenue for each brand and for each year. Each gauge has colored ranges and goals indicators. |
Number |
SUM(Sales), Target |
N/A |
N/A |
Shows a single revenue numeric value, with an indicator giving the variance against a target value, which may be provided as a literal or as a second measure. |
Manage charts
Charts in the list support the following operations:
-
Open a chart by clicking it in the list.
-
Preview a selected chart. This opens the chart in a new browser tab.
-
Copy a selected chart. When copying a chart, you are prompted for the name of the new chart.
-
Rename a selected chart. Note that when renaming a chart, the incoming references to this chart are not automatically updated.
-
Delete selected chart. This operation cannot be undone.
Renaming or deleting a chart prevents a dashboard using that chart to display it. These two operations must be performed with care. |