Datapoint
Datapoint displays at-a-glance data for a user to quickly view key metrics.
Props
Usage guidelines
- To display a single numerical metric.
- When the information to convey is qualitative (e.g., “In Progress” or “Healthy”). Use Status instead.
- When the Datapoint’s metric/value is not clear or understandable in isolation.
Best practices
Whenever possible, use the full number with locale-specific separators to ensure clarity across all languages.
Use long decimal values for trend
. Limit the trend to one decimal point.
Make sure to localize numeric values.
Use subjective values for Datapoint's value.
Be certain to use a positive trendSentiment
only when the trend is overtly positive for the end user. Use a neutral trendSentiment
in cases of ambiguity.
Be cautious of using Datapoint for large volumes of data. In cases where the content is tabular, use Table.
Accessibility
Datapoint's trend prop requires an accessibilityLabel
to describe the trend icon (e.g., Trending up).
Localization
Be sure to localize the title
, tooltipText
and trend accessibilityLabel
props. Note that localization can lengthen text by 20 to 30 percent.
Of particular importance is the need to localize the value
prop. Similar to text, numerical data needs to be localized with regard to characters displayed, separators used, currency, percentages, and other considerations.
Variants
Size
Trend
Use trend
to display the change in the value of a Datapoint over time. Make sure to provide an accessibilityLabel
when the trend is above or below zero.
Trend sentiment
By default, a positive trend will be considered "good" (displayed as a green trend), a negative trend "bad" (displayed as a red trend) and a trend of 0 "neutral" (displayed as a dark gray trend). However, the trendSentiment
property can be used to explicitly set whether the trend
is considered "good", "bad" or "neutral", as demonstrated below.
Tooltip text
The tooltipText
prop is intended to provide the user context, detail and/or framing for a Datapoint through a Tooltip.
With a badge
The badge
prop is available to add a Badge to the title. This feature is in beta, so please use cautiously.
Component quality checklist
Quality item | Status | Status description |
---|---|---|
Figma Library | Partially ready | Component is live in Figma, however may not be available for all platforms. |
Responsive Web | Ready | Component is available in code for web and mobile web. |
iOS | Component is not currently available in code for iOS. | |
Android | Component is not currently available in code for Android. |