ICE Components
Tag outputChart


The outputChart component uses the JCharts open source charting utility (http://jcharts.sourceforge.net/) to create charts. All chart types are derived from the two main types:

  1. axis :
  2. pie :
Note: The "type" attribute can be changed using the value binding for one basic type only. For example you can change "area" to "bar", "bar" to "line" but not to "pie2d"




Tag Information
Tag Classcom.icesoft.faces.component.outputchart.OutputChartTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
actionfalsefalsejava.lang.StringMethodBinding representing the application action to invoke when this component is activated by the user. The expression must evaluate to a either a String or a public method that takes no parameters, and returns a String (the logical outcome) which is passed to the NavigationHandler for this application.
actionListenerfalsefalsejava.lang.StringMethodBinding representing an action listener method that will be notified when this component is activated by the user. The expression must evaluate to a public method that takes an ActionEvent parameter, with a return type of void.
bindingfalsefalsejava.lang.StringThe value binding expression linking this component to a property in a backing bean
chartTitlefalsefalsejava.lang.StringTitle 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.
colorsfalsefalsejava.lang.String

The value of this attribute can be defined on page or can be defined using the backing bean, the valid types for the bean is:

  • String array
  • List of java.awt.Color

datafalsefalsejava.lang.String

Data of the chart. The valud of this attribute can be defined on page or can be bound to the backing bean:
(e.g.) defining on page

 <ice:outputChart type="pie2d" labels="pass, fail" data="70, 30" colors="green, red"/> dataset can be defined using the colon ":" <ice:outputChart type="barstacked" labels="pass, fail" data="70, 30, 10 : 10, 50, 70" colors="green, red"/> 

This attribute's value has correlation with the labels and color attribute.
if the value bounded with backing bean:
  • double or 2d double array
  • List of double or 2d double array

heightfalsefalsejava.lang.StringHeight of the chart. The value of this attribute can be defined on the page or can be bound to the backing bean as String type.
horizontalfalsefalsejava.lang.String

This attribute is valid only for the following types of charts:

  • bar
  • barclustered
  • barstacked
Note: Negative values in Stacked Bar charts are not supported by the krysalis.jcharts.

idfalsefalsejava.lang.StringThe component identifier for this component. This value must be unique within the closest parent component that is a naming container.
immediatefalsefalsejava.lang.StringFlag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.
labelsfalsefalsejava.lang.String

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

 <ice:outputChart type="pie2d" labels="pass, fail" data="70, 30" colors="green, red"/> 
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.)
 <ice:outputChart type="barstacked" labels="pass, fail" data="70, 30, 10: 10, 50, 70" colors="green, red"/> 
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

legendColumnsfalsefalsejava.lang.String

The number of columns for legend label.

 (e.g.) To show legend columns vertically <ice:outputChart type="barstacked" labels="pass, fail" data="70, 30, 10: 10, 50, 70" colors="green, red" legendPlacement="right" legendColumns="1"/> 

legendPlacementfalsefalsejava.lang.String

The placement of legend label can be set to one of the following:

  • top
  • bottom (default)
  • left
  • right
  • none
 (e.g.) <ice:outputChart type="barstacked" labels="pass, fail" data="70, 30, 10: 10, 50, 70" colors="green, red" legendPlacement="right"/> 
Note: This attribute does not apply to pie3D charts. When the chart type is "custom", remember to read this attribute in your custom charting code and set the chart legend placement accordingly.

renderOnSubmitfalsefalsejava.lang.String

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.

 <ice:outputChart renderOnSubmit="true"/> or <ice:outputChart renderOnSubmit="#{bean.render}"/> method's signature: public boolean render(OutputChart component) 

renderedfalsefalsejava.lang.StringFlag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
shapesfalsefalsejava.lang.String

This attribute can be used with the line and point chart.
The following are the valid values:

  • circle
  • diamond
  • square
  • triangle
The value of this attribute can be defined on page or can be defined using the backing bean, the valid types for the bean is:
  • String array containging above strings
  • List of java.awt.Shape

stylefalsefalsejava.lang.StringCSS style(s) to be applied when this component is rendered.
styleClassfalsefalsejava.lang.StringSpace-separated list of CSS style class(es) to be applied when this element is rendered. This value is passed through as the "class" attribute on generated markup. The base name for all style classes. Default value is iceOutChrt if enabled and iceOutChrt-dis if disabled.
typefalsefalsejava.lang.String

Type of the chart. The valid values are as follows:

  • area
  • areastacked
  • bar
  • barclustered
  • barstacked
  • line
  • pie2D
  • pie3D
  • point
  • stock
  • custom
Only one type can be set at a time. The value of this attribute can be defined on the page or can be bound to the backing bean as String type.

valuefalsefalsejava.lang.StringThe current value of this component.
widthfalsefalsejava.lang.StringWidth of the chart. The value of this attribute can be defined on the page or can be bound to the backing bean as String type.
xaxisLabelsfalsefalsejava.lang.String

This attribute can be used with all types of charts except pie2D and pie3D. Each value of xaxisLabels is connected with a dataset. It can be defined on page or bound to the backing bean. (e.g.)

 <ice:outputChart type="barstacked" labels="pass, fail" data="70, 30, 10 : 10, 50, 70" colors="green, red" xaxisLabels="2001, 2002, 2003" /> 

xaxisTitlefalsefalsejava.lang.StringTitle for x axis of the chart. Valid for all types of charts except pie2D and pie3D. The value of this attribute can be defined on the page or can be bound to the backing bean as String type.
yaxisTitlefalsefalsejava.lang.StringTitle for y axis of the chart. Valid for all types of charts except pie2D and pie3D. The value of this attribute can be defined on the page or can be bound to the backing bean as String type.

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.