📄 cewolfcategorydatasetchart3.jsp
字号:
<!--
Fig. 8.4_02_03: CewolfCategoryDatasetChart3.jsp
功能: Cewolf 编程实例: 基于CategoryDataset的水平堆栈图及垂直立方图
-->
<%@ page contentType="text/html;charset=GB2312"%>
<%@ include file="CewolfDataset.jsp" %>
<%
// 定义绘制颜色
ChartPostProcessor dataColor = new ChartPostProcessor()
{
public void processChart(Object chart, Map params)
{
CategoryPlot plot = (CategoryPlot)((JFreeChart)chart).getPlot();
for (int i = 0; i < params.size(); i++)
{
String colorStr = (String)params.get(String.valueOf(i));
plot.getRenderer().setSeriesPaint(i, java.awt.Color.decode(colorStr));
}
}
};
pageContext.setAttribute("dataColor", dataColor);
%>
<HTML>
<HEAD>
<TITLE>Cewolf 编程实例: 基于CategoryDataset的水平堆栈图及垂直立方图</TITLE>
</HEAD>
<BODY>
<cewolf:chart
id="stackedHorizontalBar"
title="Cewolf 编程实例6: 水平堆栈图"
type="stackedHorizontalBar"
xaxislabel="<%= xaxislabel %>"
yaxislabel="<%= yaxislabel %>">
<cewolf:data>
<cewolf:producer id="categoryData" />
</cewolf:data>
</cewolf:chart>
<cewolf:img
chartid="stackedHorizontalBar"
renderer="/cewolf"
width="500"
height="375">
</cewolf:img>
<BR><BR>
<cewolf:chart
id="verticalBar3D"
title="Cewolf 编程实例7: 3D垂直直方图"
type="verticalBar3D"
xaxislabel="<%= xaxislabel %>"
yaxislabel="<%= yaxislabel %>">
<cewolf:data>
<cewolf:producer id="categoryData" />
</cewolf:data>
<cewolf:chartpostprocessor id="dataColor">
<cewolf:param name="0" value='<%= "#FFFFAA" %>'/>
<cewolf:param name="1" value='<%= "#AAFFAA" %>'/>
<cewolf:param name="2" value='<%= "#FFAAFF" %>'/>
<cewolf:param name="3" value='<%= "#FFAAAA" %>'/>
</cewolf:chartpostprocessor>
</cewolf:chart>
<cewolf:img
chartid="verticalBar3D"
renderer="/cewolf"
width="500"
height="375">
</cewolf:img>
</BODY>
</HTML>
<!--
/**************************************************************************
* (C) Copyright 2004-2005 by Jingkui Zhong(钟京馗) and Huan Tang(唐桓). *
* All Rights Reserved. *
* *
* DISCLAIMER: The authors of this code have used their *
* best efforts in preparing the code. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these codes. The authors *
* shall not be liable in any event for incidental or consequential *
* damages in connection with, or arising out of, the furnishing, *
* performance, or use of these programs. *
**************************************************************************/
-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -