Flash图表(FusionChartsV3)的简单应用
2009-01-22 11:55:02 来源:WEB开发网jsp:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.eline.epicc.utils.ChartUtils"%>
<%@page import="com.eline.epicc.utils.Constants"%>
<HTML>
<HEAD>
<TITLE>FusionCharts - Simple Column 3D Chart</TITLE>
</HEAD>
<BODY>
<%
//文件源示例
ChartUtils.outChartSourceHTML("common/charts/Column3D.swf",
"data.xml", "myFirst", 600, 300, response);
String[][] arrData = new String[6][2];
//产品名字
arrData[0][0] = "Product A";
arrData[1][0] = "Product B";
arrData[2][0] = "Product C";
arrData[3][0] = "Product D";
arrData[4][0] = "Product E";
arrData[5][0] = "Product F";
arrData[0][1] = "567500";
arrData[1][1] = "815300";
arrData[2][1] = "556800";
arrData[3][1] = "734500";
arrData[4][1] = "676800";
arrData[5][1] = "648500";
//Now, we need to convert this data into XML. We convert using string concatenation.
String strXML;
int i = 0;
strXML = "<chart caption='Sales by Product' numberPrefix='$' formatNumberScale='0'>";
for (i = 0; i < arrData.length; i++)
{
strXML = strXML + "<set label='" + arrData[i][0]
+ "' value='" + arrData[i][1] + "' />";
}
strXML = strXML + "</chart>";
//String字符串流示例
ChartUtils.outChartHTML(Constants.COLUMN3D, strXML,
"myFirst", 600, 300, response);
%>
</BODY>
</HTML>
Tags:Flash 图表 FusionChartsV
编辑录入:爽爽 [复制链接] [打 印]- ››FLASH不等于运算符!=的使用实例
- ››FLASH不全等运算符!==
- ››FLASH字符串分隔符运算符
- ››FLASH% 模运算符
- ››Flash+、++、+= 加法运算符
- ››Flash, 逗号运算符
- ››flash中的-、--、-=减法运算符
- ››Flash的-Infinity 常数、.点运算符、/ 除法运算符...
- ››Flash两种注释方法/*..*/ 和// 注释行分隔符运算符...
- ››Flash的/=除法赋值运算符、=赋值运算符、== 等于运...
- ››Flash之?: 条件运算符、^ 按位 XOR 运算符、^= 按...
- ››Flash的_framesloaded代码示例
更多精彩
赞助商链接