PieGraph
Extends:
react~Component → PieGraph
PieGraph is a component to present data in form of pie chart
Data is array in the following format:
[
{
name: <string name of pie section 1, eg. 'Apples'>,
color: <HTML color value 1, eg. '#45dd22'>,
value: <numeric value of section 1, eg. 5>
},
{
name: <string name of pie section 2, eg. 'Oranges'>,
color: <HTML color value 2, eg. '#45dd22'>,
value: <numeric value of section 2, eg. 10>
},
...
]
Access
Stage.Basic.Graphs.PieGraph
Usage
let formattedData = [
{name: 'Started', color: '#21ba45', value: 2},
{name: 'In progress', color: '#fbbd08', value: 5},
{name: 'Warning', color: '#f2711c', value: 3},
{name: 'Error', color: '#db2828', value: 8}
];
return (<PieGraph widget={widget} data={formattedData} toolbox={toolbox} />);
Static Member Summary
Static Public Members | ||
public static |
propTypes: * propTypes |