Manorrock.com / Products / Manorrock JSF Chart

Line Chart

This is an example on how to use the LineChart component.

Simple example

    <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.

Component attributes

The table below specifies which attributes this component supports.

NameTypeDefaultRequiredDescription
heightjavax.el.ValueExpression (must evaluate to int)300NOThe height of the drawing canvas
valuejavax.el.ValueExpression (must evaluate to java.lang.Object)NONEYESThe current value of this component
widthjavax.el.ValueExpression (must evaluate to int)400NOThe width of the drawing canvas
xTitlejavax.el.ValueExpression (must evaluate to java.lang.String)""NOThe x title
yTitlejavax.el.ValueExpression (must evaluate to java.lang.String)""NOThe y title

Demo

See it in action at our live demo