原創(chuàng)|其它|編輯:郝浩|2012-10-25 14:22:16.000|閱讀 3442 次
概述:本文介紹了FusionChart中點(diǎn)擊事件的創(chuàng)建等,提供源碼。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
在頁(yè)面中添加點(diǎn)擊chart后需要觸發(fā)的js事件:
<script> function myJS(myVar){ window.alert(myVar); } </script>
在拼寫加載chart時(shí)使用的xml文件時(shí),在<set value="1">中添加link='j-myJS-1,2';
其中,j代表調(diào)用的是js,myJS代表你前臺(tái)頁(yè)面上要調(diào)用的js方法名,1代表前臺(tái)js方法myJS需要的參數(shù)。
在這里,我點(diǎn)擊chart時(shí)需要獲得category 的值:
for(int j=0;j<commentChartList.size();j++){
Project project = commentChartList.get(j);
chartTitle.append(" <category label='"+ project.getShip_no() + "' /> ");
chartDataSet.append(" <set value='"+project.getProgress_cnt()+"' /> ");
chartOver.append(" <set value='"+StringUtil.checkNull(project.getClosed_cnt(),"0")+"' link='j-myJS-"+project.getShip_no()+"' /> ");
}
效果如下:
在拼寫加載chart時(shí)使用的xml文件時(shí),在<set value="1">中添加link='test/index.html';
其中,"test/index.htm"為你需要跳轉(zhuǎn)的頁(yè)面目錄
效果如下:
在拼寫加載chart時(shí)使用的xml文件時(shí),在<set value="1">中添加link='n-test/index.html';
其中,n代表在原頁(yè)面上打開(kāi)新頁(yè)面,"test/index.htm"為你需要跳轉(zhuǎn)的頁(yè)面目錄
效果如下:
頁(yè)面中Frame設(shè)置如下:
Html代碼:
<frameset rows="350,*" cols="*" frameborder="YES" border="1" framespacing="0"> <frame src="FramePages/FrameChart.html" name="chartFrame" scrolling="NO" noresize > <frame src="FramePages/LowerFrame.html" name="detailsFrame" scrolling="Auto" noresize> </frameset>
在拼寫加載chart時(shí)使用的xml文件時(shí),在<set value="1">中添加link='F-detailsFrame-test/index.htm';
其中,F(xiàn)代表打開(kāi)的是Frame,detailsFrame是需要加載的Frame名稱,"test/index.htm"為你需要跳轉(zhuǎn)的頁(yè)面目錄
效果如下:
將整個(gè)chart作為一個(gè)熱點(diǎn),點(diǎn)擊chart時(shí)打開(kāi)新頁(yè)面:
Xml代碼
<chart caption='Monthly Sales Summary' subcaption='For the year 2006' xAxisName='Month' yAxisName='Sales' numberPrefix='$' clickURL='n-//www.infosoftglobal.com'> <set label='Jan' value='17400' /> <set label='Feb' value='19800' /> <set label='Mar' value='21800' /> <set label='Apr' value='23800' /> <set label='May' value='29600' /> <set label='Jun' value='27600' /> </chart>
其中clickURL='n-//www.infosoftglobal.com'
在拼寫加載chart時(shí)使用的xml文件時(shí),在<set value="1">中添加
link='P-detailsPopUp,width=400,height=300,toolbar=no, scrollbars=no,resizable=no-_template/common/pop_search03.html'
其中P代表打開(kāi)的是一個(gè)pop-up畫面,detailsPopUp為打開(kāi)畫面的名稱,“template/common/pop_search03.html”為要pop的畫面,其他各項(xiàng)為畫面打開(kāi)時(shí)的參數(shù)。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:iteye博客