クラス名: ChartRender
パッケージ: oracle.jbo.html.databeans
ソース: [<jdev_install> \BC4J\src\bc4jhtmlsrc.zip]\oracle\jbo\html\databeans\ChartRenderer.java
拡張対象: oracle.jbo.html.DataWebBeanImpl
実装対象: HttpSessionBindingListener
グラフの.gif
イメージを動的に生成し、そのイメージをJavaServer Pagesレスポンスの出力ストリームにレンダリングするメソッドを提供します。Chart Web BeanはChartRender Web Beanに依存し、ChartRender APIを使用して設定したビジュアル・プロパティに基づいてグラフをインスタンス化します。
JDeveloper設計時ツールでは、グラフ・データのWeb Beanの作成はサポートされません。 JSPページでグラフを使用するには、JDeveloperで提供されているBI Graph Beanパッケージから、<jbo:DataWebBean>
JSPタグ(コンポーネント・パレットの「Business Components Web Beans」ページで使用可能)とメソッドを挿入する必要があります。
たとえば、データ・バインドされたビジネス・コンポーネントJSPページに、グラフのタイプおよび属性を設定するデータ・タグとスクリプトレットは、次のようになります。
<jbo:DataWebBean id="wb" datasource="myds"
wbclass="oracle.jbo.html.databeans.ChartRenderer />
<%
wb.setCommonScriptName("chart_common.jsp");
wb.setGraphType(d2e.BUBBLE_CHART);
//....
wb.setSeriesLabelColumnName("Job");
wb.setDisplayAttributes("Empno,Sal,Comm");
//....
wb.getChart().setY1AxisSide(1);
//....
wb.getChart().setTitleString("Dept to Emp");
wb.getChart().setSubtitleString("Employee");
wb.getChart().setFootnoteString("");
wb.setImageWidth(500);
wb.setImageHeight(350);
:
wb.render();
%>
注意: BI Graph Bean自体は、Three D Graphics社のPerspective for JavaのBeanに基づいています。
JDeveloperにBI Beansコンポーネントをインストールした場合、グラフのタイプと属性のJavaDocはヘルプ・システムで使用できます。また、Perspective for Javaのドキュメントを、次のサイトからダウンロードすることもできます。
http://www.threedgraphics.com/tdg/products/tools/perspectivejava/documentation.asp
Copyright © 1997, 2004, Oracle. All rights reserved.