trend
The trend component displays an increase or decrease over a period. The increment or decrement number can be formatted as a percentage, currency, or plain value.
Trend is available in the following content widgets:
Configuration options
value
Positive or negative numeric value.
format
A selection of formats is available for the main value of the widget, for example, currency.
title
Display a title for the trend.
subtitle
Add a subtitle under the title text. Note: this text won't be displayed if isValueBottom is set to true
style
Properties used for component styling.
isValueBottom- By default, the value is on the right of the text. Set the property totrueto move it underneath the text.isValueHidden- hides the number and only shows an icon indicating an up or down trend.isAlignRight- aligns everything to the right.
Examples and code snippets
Trend on value widget

widgets:
trend-value:
type: widget.value
options:
value: '23850'
align: right
format:
numberStyle: currency
currency: USD
bottom:
type: component.trend
options:
title: 'Last week'
value: +1250
format:
numberStyle: currency
currency: USD
top:
type: component.titles
options:
icon: chart
iconColor: color6widgets:
trend-value-dd:
type: widget.value
options:
value: [email protected]
align: right
format:
numberStyle: currency
currency: USD
bottom:
type: component.trend
options:
title: [email protected]
value: [email protected]
format:
numberStyle: currency
currency: USD
top:
type: component.titles
options:
icon: chart
iconColor: color6# Grid-item for the static jig.
children:
- type: component.grid-item
options:
size: "2x2"
children:
type: component.jig-widget
options:
jigId: trend-in-value-widget
widgetId: trend-valueTrend on chart widget

widgets:
trendStatic-4x4:
type: widget.chart
options:
top:
type: component.trend
options:
title: "$ 39,559.36"
value: 0.21
format:
numberStyle: percent
style:
isAlignRight: true
isValueBottom: true
chart:
type: component.line-chart
options:
chart:
isAnimated: true
yAxis:
min: 0
labels:
format:
numberStyle: currency
compactDisplay: short
notation: compact
tickAmount: 4
isFirstTickHidden: true
isFirstLabelHidden: true
xAxis:
categories:
- Q1
- Q2
- Q3
- Q4
series:
- data: [email protected]
name: Year 2019
animation:
direction: left-to-right
layout: area-gradient
dataLabels:
- isEnabled: true
legend:
isHidden: falsewidgets:
trendDD-4x4:
type: widget.chart
options:
top:
type: component.trend
options:
title: "$ 39,559.36"
value: 0.21
format:
numberStyle: percent
style:
isAlignRight: true
isValueBottom: true
chart:
type: component.line-chart
options:
chart:
isAnimated: true
yAxis:
min: 0
labels:
format:
numberStyle: currency
compactDisplay: short
notation: compact
tickAmount: 4
isFirstTickHidden: true
isFirstLabelHidden: true
xAxis:
categories:
- Q1
- Q2
- Q3
- Q4
series:
- data: [email protected]
name: Year 2019
animation:
direction: left-to-right
layout: area-gradient
dataLabels:
- isEnabled: true
legend:
isHidden: false# Grid-item for the static jig.
children:
- type: component.grid-item
options:
size: "4x4"
children:
type: component.jig-widget
options:
jigId: trend-in-chart-widget
widgetId: trendStatic-4x4Trend on list widget

widgets:
trendList-2x2:
type: widget.list
options:
data: [email protected]
top:
type: component.trend
options:
title: "569 Patients"
subtitle: "Patients"
value: 12
style:
isAlignRight: false
isValueBottom: true
isValueHidden: false
item:
type: component.list-item
options:
title: [email protected]
leftElement:
element: avatar
text: NA
uri: [email protected]widgets:
trendListDD-2x2:
type: widget.list
options:
data: [email protected]
top:
type: component.trend
options:
title: "569 Patients"
subtitle: "Patients"
value: 12
style:
isAlignRight: false
isValueBottom: true
isValueHidden: false
item:
type: component.list-item
options:
title: [email protected] & ' ' & @ctx.current.item.lastname
leftElement:
element: avatar
text: =$substring(@ctx.current.item.firstname, 0, 1) & $substring(@ctx.current.item.lastname, 0, 1)
uri: [email protected]# Grid-item for the static jig.
children:
- type: component.grid-item
options:
size: "2x2"
children:
type: component.jig-widget
options:
jigId: trend-in-list-widget
widgetId: trendList-2x2Last updated
Was this helpful?