The Metric Card widget displays Workshop variable values in a configurable card-like interface. Typically, metric cards are used to highlight key figures in a Workshop module. Module builders configuring a Metric Card widget can:
The screenshot below shows how the Metric Card widget can be used in a Workshop module to display statistics on the COVID-19 vaccine rollout for different countries. The examples that follow will also use this example context.
The image below shows the initial state of an unconfigured Metric Card widget, followed by the state of a widget that has been configured to display COVID-19 vaccine rollout metrics.
First, we will walk through the configuration options for the widget, which comprises a group of metrics, as depicted in the first screen to the right of the arrow. Then we will describe the configuration options available for each individual metric, as depicted in the second screen to the right of the arrow.
For the Metric Card widget, the core configuration options are the following:
Each individual metric can be configured using the following options:
Yes
opens a value type configuration for the secondary metric, which mimics the configuration for the primary metric.Yes
opens a configuration screen with the following options:
Position: Specifies whether the sparkline should be displayed Side-by-side
(alongside) or Stacked
(under) with the metric value.
Time series set: The time series that is to be visualized. This is specified using a Time series set
variable, as shown in the screenshot below. See Variables for more information on Workshop variables, including time series set variables.
Time range: Specifies the time range for which data should be displayed. Preset options include All time
, Last hour
, Last day
, and Last week
, but selecting Custom range
opens a detailed range selector, where you can specify an Exact
or a Relative
range. See Time series properties in Workshop for more information on specifying time ranges.
Baseline: When this parameter is toggled on, a baseline is rendered along with the sparkline to aid with visual interpretation of the trend. See Time series properties in Workshop for more information on specifying baselines.