<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="swfobject2.2.js"></script>
<script type="text/javascript" src="json2.js"></script>
<script type="text/javascript" src="chart.js"></script>
<script type="text/javascript">
var title = "各模块信息数量统计"; //标题
var y_text = "单位个";
var x_axis = ['供应','求购','产品','展会','资讯','知道','专题','图库','视频','下载','品牌','分类']; //x轴坐标
//var x_axis = x_axisstr.split(",");
var elements = [141, 32, 22, 13, 44, 34, 73, 42, 12, 14, 16, 46]; //y轴坐标
//var elements1 = elementsstr.split(",");
var max = 200; //y坐标最大值
var steps = 20; //每进步值
var ofc2_chart_id="my_ofc2_chart";
swfobject.embedSWF("open-flash-chart.swf", ofc2_chart_id,
"1100", "550", "9.0.0", "expressInstall.swf",
{"get-data": "getDemoInitData"},
{"wmode":"transparent"}
);
function findSWF(movieName) {
if (navigator.appName.indexOf("Microsoft")!= -1) {
return window[movieName];
} else {
return document[movieName];
}
}
function getDemoInitData(){
alert(111);
return JSON.stringify(chartbar(title,y_text,elements,x_axis,max,steps));
}
function load_data0(movieName) {
var tmp = findSWF(movieName);
alert(tmp);
tmp.load(JSON.stringify(chartbar(title,y_text,elements,x_axis,max,steps)));
}
function load_data1(movieName) {
var tmp = findSWF(movieName);
tmp.load(JSON.stringify(chartpie(title,y_text,elements,x_axis,max,steps)));
}
function load_data2(movieName) {
var tmp = findSWF(movieName);
tmp.load(JSON.stringify(charthbar(title,y_text,elements,x_axis,max,steps)));
}
function load_data3(movieName) {
var tmp = findSWF(movieName);
tmp.load(JSON.stringify(chartline_dot(title,y_text,elements,x_axis,max,steps)));
}
function load_data4(movieName) {
var tmp = findSWF(movieName);
tmp.load(JSON.stringify(chartbar_3d(title,y_text,elements,x_axis,max,steps)));
}
</script>
</head>
<body>
<div class="postion_index"></div>
<div class="rtdcont">
<div id="my_ofc2_chart" class="f_left"></div>
<div class="tjsel">
<ul>
<li class="zzli"><a href="javascript:load_data0('my_ofc2_chart')">柱状图</a></li>
<li class="btli"><a href="javascript:load_data1('my_ofc2_chart')">饼状图</a></li>
<li class="xtli"><a href="javascript:load_data3('my_ofc2_chart')">折线图</a></li>
<li><a href="javascript:load_data4('my_ofc2_chart')">3D柱状图</a></li>
</ul>
</div>
</div>
</body>
</html>