ChartCard¶
ChartCard Properties¶
Property | Type | Required | Default |
---|---|---|---|
ChartType | enum |
No | "Line" |
DataSeries | object |
No | |
DataSubscriptions | DataSubscriptions | No | |
IsTrendUpward | boolean |
No | |
LeadingUnit | string |
No | |
Metric | string |
No | |
NoDataText | string |
No | |
SeriesColor | string[] |
No | |
SeriesTitle | string[] |
No | |
StatusText | string |
No | |
Styles | object |
No | |
Subtitle | string |
No | |
Target | LinkQueryFunctionTarget | No | |
Title | string |
No | |
TrailingUnit | string |
No | |
TrendImage | Image | No | |
TrendTitle | string |
No | |
_Name | string |
No | |
_Type | const |
Yes |
ChartType¶
Chart type of the chart card.
In Android, scrolling is not supported for bar type and only two data series can be displayed. In iOS, scrolling is supported for bar type.
- type:
enum
- default:
"Line"
The value of this property must be one of the known values listed below.
ChartType Known Values¶
Value | Description |
---|---|
Line |
|
Column |
|
Bar |
DataSeries¶
- type:
object
with following properties.
Property | Type | Required | Default |
---|---|---|---|
Data |
array | No | |
CategoryTitles |
array | No | |
CategoryLabelVisible |
boolean | No | |
NumericLabelVisible |
boolean | No |
Data¶
Array of arrays containing specific data elements
- type:
array[]
CategoryTitles¶
CategoryTitles
is compulsory, no fallback maintained; Android only renders even numbered array elements when specified; In iOS, CategoryTitles
only displays first and last elements of the array; Number of values in Data
and CategoryTitles
must be the same for the last value of CategoryTitles
to be displayed.
- type:
string[]
CategoryLabelVisible¶
iOS only. Whether to show the category label.
NumericLabelVisible¶
iOS only. Whether to show the numerical label.
DataSubscriptions¶
Array of data change events to subscribe to.
- type: DataSubscriptions
IsTrendUpward¶
Android only. Use TrendImage
for iOS. Set IsTrendUpward
to true
for positive trend and is styled with color
Green. Set IsTrendUpward
to false
for negative trend and is styled with color Red.
- type:
boolean
LeadingUnit¶
- type:
string
Metric¶
- type:
string
NoDataText¶
Placeholder text when chart data is not available. If this is absent, no text will be displayed when chart data is empty.
- type:
string
SeriesColor¶
Can be a hex string, e.g. #fcba03 or color string. e.g. blue. iOS only, it is not configurable in Android.
- type:
string[]
All items must be of the type: string
SeriesTitle¶
- type:
string[]
All items must be of the type: string
StatusText¶
- type:
string
Styles¶
- type:
object
with following properties.
Property | Type | Required | Default |
---|---|---|---|
Title | string | No | |
Subtitle | string | No | |
StatusText | string | No | |
SeriesTitle | string | No | |
TrendTitle | string | No | |
TrendImage | string | No | |
NoDataText | string | No |
Title¶
The string value is a style class name of Title
.
- Text style class
Subtitle¶
The string value is a style class name of Subtitle
. iOS only.
- Text style class
StatusText¶
The string value is a style class name of StatusText
.
- Text style class
SeriesTitle¶
The string value is a style class name of SeriesTitle
. Can only be styled in iOS.
- Text style class
TrendTitle¶
The string value is a style class name of TrendTitle
.
- Text style class
TrendImage¶
The string value is a style class name of TrendImage
. iOS only.
- Image style class
NoDataText¶
The string value is a style class name of NoDataText
. Android only. font-typeface
attribute not supported.
- Text style class
Subtitle¶
iOS only. If Subtitle
is set, then TrendTitle
will be ignored.
- type:
string
Target¶
Definition of the target binding to dynamically populate the collection. You can also set this to binding/rule to return an array of data items.
Note: If this is set to binding/rule, you must return an array of data items, you can't return Target definition.
- type: LinkQueryFunctionTarget
Title¶
- type:
string
TrailingUnit¶
- type:
string
TrendImage¶
iOS only. Use IsTrendUpward
for Android.
- type: Image
TrendTitle¶
In iOS, if Subtitle
is also set, then TrendTitle
will be ignored.
- type:
string
_Name¶
- type:
string
_Type¶
- type:
const
The value of this property must be:
"Card.Type.Chart"