📄 cewolfcategorydatasetchart2.jsp
字号:
<!--
Fig. 8.4_02_02: CewolfCategoryDatasetChart2.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="stackedVerticalBar"
title="ewolf 编程实例4: 普通垂直堆栈图"
type="stackedVerticalBar"
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="stackedVerticalBar"
renderer="/cewolf"
width="500"
height="375">
</cewolf:img>
<BR><BR>
<cewolf:chart
id="stackedVerticalBar3D"
title="ewolf 编程实例5: 3D垂直堆栈图"
type="stackedVerticalBar3D"
xaxislabel="<%= xaxislabel %>"
yaxislabel="<%= yaxislabel %>">
<cewolf:data>
<cewolf:producer id="categoryData" />
</cewolf:data>
</cewolf:chart>
<cewolf:img
chartid="stackedVerticalBar3D"
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 + -