The chart allows you to plot various data points on the same graphical
display. You can set up multiple data series and choose to display pie, bar,
and line charts. You bind the chart to a data object and define properties
to determine chart size, type, and divisions. For example, you may want to
display employee salaries. In this scenario, your page data object and client
data object return a list of employees.
Note: Data Tree <odc:tree> and Chart <odc:graphDraw> have
been enabled to use Server Data.
Use the following
steps to put a chart on a JSP page:
- In the Web perspective, open your Faces JSP page.
- Drag the Chart component from the Enhanced
Faces Components drawer of the Palette onto the Faces JSP page.
- From the Page Data view, select and drag a data object onto the
Chart component. This binds the data object to the Chart.
- Click the Chart component on the JSP page. Right-click and select Properties.
- On the odc:graphDraw tab, specify the display chart type (bar,
pie, or line), the chart title, and the chart size.
- On the Display Options tab, specify the X-axis and Y-axis titles.
- On the X-axis values tab, specify the X-axis data. You can also
select the data format (for example number, currency, string).
- On the Y-axis values tab, specify the data to plot on the chart.
You can also select the data format (for example number, currency, string).
- Click Add Series to add a plotted set
of related data. Each series will have a unique color or pattern that is represented
in the chart legend.
- Specify the Value, Series
Name, and Group Operation for each data
series. From the Group Operation list, you can select one of the
following:
- None - No group operation is calculated.
- SUM - Adds the data values in the series.
- AVG - The arithmetic mean of the data in the series.
- COUNT - The number of data references in the series.
- MIN - The smallest data value in the series.
- MAX - The largest data value in the series.
- FIRST - The value of the first data object in the
series.
- LAST - The value of the last data object in the
series.
- Save and run the JSP page on a test server when you have finished
Note: The chart is a Macromedia Flash based component. The user must
have the Flash plugin installed in the browser; otherwise, the chart will
not display.