You can use the matrix widget to display large datasets in a flexible way. You can choose which fields should be displayed in the rows and columns of your matrix, then use the summary features to show useful information about each row or column.
This means, for example, you can show each event date as a column in a matrix or you could set the event dates as the row values in the first column. Alternatively, you could set positional groups (for example, forwards, midfielders and backs) as the columns and display aggregated training load data for athletes in each position as the values in each cell.
Like table widgets, you can filter the data shown in your matrix to include information about a single athlete, a selection of athletes, a specific date range or data from specific situations. Our example below shows recent workout program details for a selected athlete.
Use the sidebar to configure the matrix widget
Select the matrix widget to display the settings in the sidebar. These settings include:
- Row summary
- Advanced properties
- Data preview
Use the General properties of the sidebar to add descriptive information for your matrix widget. You can also:
- Choose whether the title of the widget should be displayed. If you enable this, then you can provide a title and icon for the widget and specify the font size, font color and text alignment.
- Choose whether a subtitle for the widget should be displayed. If you enable this, then you can add a subtitle for the widget and specify the font size, font color and text alignment.
- Specify the widget width within the section where it appears.
- Choose the background and border color for the widget.
Here you can add static informational content which will appear below the title of the widget. This can include text, images, tables, links and other common content tools.
Use the properties from the Data tab to select a data source and set data filters for your matrix widget. The matrix widget allows you to display fields from a single data source as the columns, rows and values.
You can set which field should display data in each row of the first column using the Rows properties. You can also set the data type, ordering requirements, and add prefixes or suffixes to your row field.
Use the Columns properties to choose which field from your data source should populate the columns of your matrix. Like rows, you can set the data type and ordering, and add prefixes or suffixes to column field.
In the Values properties, select the field you want to display in the cells of your matrix. You will need to decide how you want the values to be aggregated and whether you want to apply conditional formatting using a ruleset. If conditional formatting is enabled, the relevant ruleset color and icon will be applied to the cell background. Cells can be conditionally formatted based on any field within the data source by changing the condition field setting in the sidebar. If your ruleset includes a range of different colors, you may wish to enable legible foreground color. With this enabled, the dashboard will automatically choose a legible text and icon color, depending on the background color of the cell.
Row Summary and Column Summary
If you want to summarize the contents of your matrix, you can use the Row summary or Column summary properties to show this information as additional rows and columns. When you add a summary row or column, you can choose how you want the aggregate the data from the data source you’re using. For example, you could have a summary row with daily total weight lifted by each athlete shown in the matrix.
When you use a summary row or column, you can also choose whether you want to aggregate the raw values or not. Aggregating the raw values means that your aggregate (minimum, maximum, average, for example) is applied to all values in the matrix dataset.
If you choose not to aggregate the raw values, your aggregate will be based on the values that are displayed in the matrix. In this case, the summary value will be an aggregate of an aggregate, which may not have the same result as aggregating the entire dataset for the field you’ve selected in the value properties.
You can use the Avatars properties to include an image for each athlete next to their data in the matrix. If any athletes shown don’t have a profile picture, the avatar will display their initials instead.
You can format the appearance of the matrix widget using the Style properties. These allow you to adjust:
- The table font size, which is measured in pixels.
- The cell padding (also measured in pixels). This is the space between the contents of a cell in the matrix and the border of the cell.
- The border color of cells in the matrix.
- The background color for the header row.
- The text color for the header row.
- The background color for odd-numbered rows in the matrix. Note that the background color may be overridden if you are using conditional formatting within the matrix.
- The background color for even-numbered rows in the matrix. Note that the background color may be overridden if you are using conditional formatting within the matrix.
- The text color for the contents of the matrix. It’s important to choose the text color carefully to ensure it’s easy to read against the background colors in the matrix as well as any colors that are used in the ruleset you’ve created if you apply conditional formatting.
You can use the Layout properties to choose whether the header row or first column should freeze in position when someone scrolls through the matrix. You can also use the layout properties to:
- Specify the maximum height of the matrix widget. This is measured in pixels.
- Choose the text alignment of the first column and of the values and summaries of the matrix.
If you want to provide users with more information about the data displayed in a matrix, you can set up different interactions using the Interaction properties.
There are two interactions you can enable for a matrix widget – record cards and record click-through.
- Record cards: when record cards are enabled, then the card fields that are set will be shown in a pop-up screen when a value within the matrix is selected.
- Record click-through: this property can only be enabled when the record card property is also enabled. Turning on record click-through means that people can navigate from the record card to the event form record that the relevant data is sourced from. If multiple records are shown in the record card (for example, when data from a group of athletes is shown in the matrix), then the user will need to select a specific record from the record card before clicking through to that particular record.
The Advanced properties can be used to set whether the first column should be hidden and whether to hide the widget if no data is available (based on data source and filter settings).
The matrix widget has properties that allow you to choose how you want to preview your matrix. When using the dashboard builder, you’re not able to view real data entered by athletes, coaches or other users of your Smartabase site. So the dashboard builder shows you simulated data in order for you to see how your matrix might appear.
Use the Trellis properties to conditionally display the matrix multiple times based on a field within a data source. To customize your trellis, you can:
- Set filters for the data you use to create the trellis.
- Set a limit of how many multiples of the trellis should be displayed.
- Choose whether to display the title of each multiple (this is based on the trellis field selected). If you enable this, then you can specify the font size, font color and text alignment.
To learn more about widget trellising, check out this article.