Widgets
Content widget components

trend

4min

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

Core structure



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 to true to 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

Upward trend
Upward trend


This example shows an increase in company turnover. The company has a turnover of over 24K USD, and the trend component shows that the increase for the last week is 1250 USD.

Examples: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

trend-value (static)
trend-value (dynamic)


Trend on chart widget

Percentage trend
Percentage trend


This example shows finance statistics. The trend component, indicates an increase in percent. Exactly 21% in the last period.

Examples: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.



trend-chart (static)
trend-chart (dynamic)


Trend on list widget

Patient trend over a period
Patient trend over a period


In this example, the widget-list shows a list of patients. There are a total of 569 patients and the trend component shows that 12 more patients were added in the last period.

Examples: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

trend-list (static)
trend-list (dynamic)




Updated 08 Aug 2024
Doc contributor
Did this page help you?