| Manorrock.com / Products / Manorrock JSF Chart |
This is an example on how to use the LineChart component.
<chart:lineChart xmlns:chart="http://www.manorrock.com/jsf/chart"
alt="A line chart demo" value="#{chartBean.lineData}" width="400" height="300"/>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.
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 |
| 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 |
| xTitle | javax.el.ValueExpression (must evaluate to java.lang.String) | "" | NO | The x title |
| yTitle | javax.el.ValueExpression (must evaluate to java.lang.String) | "" | NO | The y title |
See it in action at our live demo