10. ICEfaces Tag Reference
Contents > ICEfaces Tag Reference > ice:outputChart
ice:outputChart |
|
The ice:outputChart tag uses the JCharts open source charting utility (http://jcharts.sourceforge.net/) to create charts. The two main types of charts that can be created with this component are pie charts and axis charts.
Example
<ice:outputChart style="font-size:20px;" value="chart" type="pie2D"></ice:outputChart>
Rendered Output
|
Tag Attributes
| action |
Text |
| |
| The action attribute accepts a method-binding expression for a backing bean action method to invoke when this component is activated by the user. An action method must be a public method with no parameters that returns a String. The returned string represents the logical outcome of the action (eg. "success", "failure", etc.) and is used by the JavaServer Faces MVC framework to determine which view to display next. |
| actionListener |
Text |
| |
| The actionListener attribute accepts a method-binding expression for a backing bean action listener method that will be notified when this component is activated by the user. An action listener method must be a public method with an javax.faces.event.ActionEvent parameter and a void return type. |
| binding |
Expression |
| |
| The value-binding expression linking this component tag to a backing bean property. |
| chartTitle |
Text |
| |
| The chartTitle attribute sets the title for the component. The value of this attribute can be defined on the page or can be bound to the backing bean as String type. |
| colors |
Text |
| |
| The colors attribute sets the color as a string array or a list of java.awt.Color. |
| data |
Text |
| |
| The data attribute sets the data for the chart. The value of this attribute can be defined on page or can be bound to the backing bean.
Defining on page:
dataset can be defined using the colon ":"
This attribute's value has correlation with the labels and color attribute.
If the value is bound with backing bean:
* double or 2d double array
* List of double or 2d double array
|
| height |
Text |
| |
| The height attribute sets the height of the image. |
| horizontal |
Boolean |
| |
| The horizontal attribute sets the layout for bar and barclustered charts. |
| id |
Text |
| |
| The unique identifier value for this component. The value must be unique within the closest naming container. |
| labels |
Text |
| |
| The labels attribute sets the legend label of the chart. This attribute can be used for any type of chart. The value of the labels attribute has correlation with the data and colors attribute.
When used with pie2D and pie3D the number of values should be same for the labels, data and color attributes. (e.g.)
When used with other charts except pie, then each labels' value should be mapped with a dataset. A dataset can be indicated by the colon ":" (e.g.)
The value of labels attribute can be defined on the page:
* a single word
* comma separated values
The value of labels attribute can be defined using the backing bean:
* as String array
* as List of strings
|
| legendColumns |
Text |
| |
| The legendColumns attribute sets the number of columns for legend label.
(e.g.) To show legend columns vertically
|
| legendPlacement |
Enumerated |
| |
| The legendPlacement attribute sets the position of the legend. |
| renderOnSubmit |
Text |
| |
| The renderOnSubmit attribute lets the developer decide when to render the chart. However the chart component ensures that the chart image would be generated for first rendering phase but subsequent rendering of the chart would be based on this attribute's value.
The value of this attribute can be defined on the page or can be bound to the backing bean as method binding.
or
method's signature:
public boolean render(OutputChart component)
|
| rendered |
Boolean |
| |
| A value-binding expression that evaluates to a Boolean condition indicating if this component should be rendered. |
| shapes |
Enumerated |
| |
| The shapes attribute sets the shape of the chart for line and point charts. |
| style |
CSS Style |
| |
| The style attribute sets the CSS style definition to be applied to this component when it is rendered. |
| styleClass |
CSS Class |
| |
| The styleClass attribute sets the CSS class to apply to this component when it is rendered. |
| type |
Enumerated |
| |
| The type attribute sets the type of chart. |
| value |
Text |
| |
| The value attribute sets the current value for this component. |
| width |
Text |
| |
| The width attribute sets the width of the component. |
| xaxisLabels |
Text |
| |
| The xaxisLabels attribute sets the text that labels the x axis on the chart. This attribute is not used on pie2D and pie3D charts. |
| xaxisTitle |
Text |
| |
| The xaxisTitle attribute sets the text for the title on the x axis of the chart. Not valid for pie2D and pie3D charts. |
| yaxisTitle |
Text |
| |
| The yaxisTitle attribute sets the text for the title on the y axis of the chart. This attribute is not valid for pie2D and pie3D charts. |
|