pie-chart
The component can be used to display statistics related to data records. Mostly used in jig.default or jig.list.

We are currently experiencing issues with the legend of the Pie Chart component. We are working hard to fix this issue.
Configuration options
Some properties are common to all components, see Common component properties for a list and their configuration options.
chart
title- Its text and verticalAlign.
series
data- values to be used in the chart.layout-PieorArch- the availabe types of chart.
chart
titleandsubtitle- Name and a short description of your chart.heightandwidth- The parameters of the chart displayed (in pixels).
legend
isHidden - The setting of a boolean value if the legend (naming of the series) should be displayed under the chart.
series
name- The naming of the actual series.color- select a color from the color palette.
onPress
The ability to add any of the actions (please refer to the list of Actions). This action(s) will be triggered as a reaction to the press event.
Examples and code snippets
Pie chart

This jig displays a complete pie chart. In this example, these are issues where green shows resolved issues, yellow issues in progress, and red unresolved issues.
Examples: See the full code sample using static data in GitHub. See the full code sample using dynamic data in GitHub.
Datasources: See the full datasource code sample for dynamic data in GitHub.
children:
- type: component.pie-chart
options:
chart:
title:
text: Issues
verticalAlign: center
width: 180
height: 180
legend:
isHidden: true
series:
- data: =[{"y":1, "color":"color4"}, {"y":2, "color":"color2"}, {"y":3, "color":"color3"}]
dataLabels:
- isEnabled: true
layout: piechildren:
- type: component.pie-chart
options:
chart:
title:
text: Issues
verticalAlign: center
width: 180
height: 180
legend:
isHidden: true
series:
- data: [email protected]
dataLabels:
- isEnabled: true
layout: piedatasources:
pie-chart-dynamic:
type: datasource.sqlite
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- entity: default/charts
query: |
SELECT
id,
json_extract(data, '$.seriesy') as y,
'$.color',
'$.category',
json_extract(data, '$.seriesx') as x,
'$.subtitle',
'$.title'
FROM [default/charts] WHERE '$.category' = "pie-chart"Pie chart type arch

This jig displays an arc pie chart. This example shows the occupancy in a warehouse; the green color shows available space and the red color indicates occupied space.
Examples: See the full code sample using static data in GitHub. See the full code sample using dynamic data in GitHub.
Datasources: See the full datasource code sample for dynamic data in GitHub.
children:
- type: component.pie-chart
options:
chart:
title:
text: Stock
verticalAlign: center
width: 180
height: 180
legend:
isHidden: true
series:
- data: =[{"y":1, "color":"color4"}, {"y":2, "color":"color2"}]
dataLabels:
- isEnabled: true
layout: archtitle: Arch pie chart
type: jig.default
children:
- type: component.pie-chart
options:
chart:
title:
text: Stock
verticalAlign: center
width: 180
height: 180
legend:
isHidden: true
series:
- data: [email protected]
dataLabels:
- isEnabled: true
layout: archdatasources:
pie-arch-chart-dynamic:
type: datasource.sqlite
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- entity: default/charts
query: |
SELECT
id,
json_extract(data, '$.seriesy') as y,
'$.color',
'$.category',
json_extract(data, '$.seriesx') as x,
'$.subtitle',
'$.title'
FROM [default/charts] WHERE '$.category' = "arch-chart"Last updated
Was this helpful?