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.
Select the Matrix widget to display the settings in the sidebar. These settings include:
- General
- Instructions
- Data
- Rows
- Columns
- Values
- Row and column summaries
- Avatars
- Style
- Layout
- Interaction
- Advanced properties
- Data preview
- Trellis
General
Use the General properties of the sidebar to add descriptive information for your 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 Title 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 Width of the widget within the section where it appears.
- Choose the Background color and Border color for the widget.
Instructions
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.
Data
Use the properties from the Data tab to select a data source and set data filters for your widget. The Matrix widget allows you to display fields from a single data source as the columns, rows and values.
Rows
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.
Columns
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.
Values
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 Conditional 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.
Avatars
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.
Style
You can format the appearance of the widget using the Style properties. These allow you to adjust:
- The Table font size (px).
- The Cell padding (px). This is the space between the contents of a cell and the border of the cell.
- The border color of cells.
- The background color for the header row.
- The text color for the header row.
- The background color for odd-numbered rows. Note that the background color may be overridden if you are using conditional formatting.
- The background color for even-numbered rows. Note that the background color may be overridden if you are using conditional formatting.
- The text color for the contents of the widget. It’s important to choose the text color carefully to ensure it’s easy to read against the background colors in the table as well as any colors that are used in the ruleset you’ve created if you apply conditional formatting.
Layout
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.
Interaction
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.
Advanced properties
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).
Data preview
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 Teamworks AMS site. So the dashboard builder shows you simulated data in order for you to see how your matrix might appear.
Trellis
Use the Trellis properties to conditionally display the Categorical chart 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 to keep the category order consistent for all multiples.
- Choose whether to order the trellis by Values, Date of first occurrence, Date of last occurrence or a Custom order. You can then set the order Direction to be Ascending or Descending.
- 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, check out our article on Widget Trellising.