| Manorrock.com / Products / Manorrock JSF Chart |
This is an example on how to use the PieChart component.
<chart:pieChart xmlns:chart="http://www.manorrock.com/jsf/chart"
alt="A pie chart demo" height="300" pieRadius="150" pieX="200" pieY="150"
value="#{chartBean.pieData}" width="400" />The example above will take the data from chartBean and display it in a canvas with a width of 400 and a height of 300, and the center of the pie at coordinate (200, 150).
The table below specifies which attributes this component supports.
| Name | Type | Default | Required | Description |
| height | javax.el.ValueExpression (must evaluate to int) | 300 | NO | The height of the drawing canvas |
| pieRadius | javax.el.ValueExpression (must evaluate to int) | 150 | NO | The radius of the pie |
| pieX | javax.el.ValueExpression (must evaluate to int) | 200 | NO | The X coordinate of the center of the pie |
| pieY | javax.el.ValueExpression (must evaluate to int) | 150 | NO | The Y coordinate of the center of the pie |
| value | javax.el.ValueExpression (must evaluate to java.lang.Object) | NONE | YES | The current value of this component |
| width | javax.el.ValueExpression (must evaluate to int) | 400 | NO | The width of the drawing canvas |
See it in action at our live demo