当前位置:编程学习 > JAVA >>

extjs+fusioncharts真心求教~~ 怎么把fusioncharts返回的图表放入到panel中,没有用jsp页面



NewPersonDateView.prototype.initGridPanel = function() {
    // 数据展示界面

    return this.DateShowPanel = new Ext.Panel({
        id:'perDataShowPanel',
        region : 'center',
        layout : 'accordion',
        title : '数据查询',
        layoutConfig: {
            animate: true
        },
        tbar : this.topbar(),
//       items : [feeStatisticPanel]
//        html : "<div id='feeStatisticGraphDiv'></div>"
//        tpl : "<tpl for='.'><div style='height:200px;'><div id='feeStatisticGraphDiv'></div></div></tpl>"
//       items : [new Ext.Panel({
//                    autoScroll : true,
//                    border : false,
//                    autoLoad : {
//                        url : __ctxPath
//                                + '/pages/reinduction/PersonDate.jsp'
//                    }
//                })]
        items:[panel]
    });
};

 var panel = new Ext.Panel({
        contentEl:'my2DcChart_div',
        html:"<div id='my2DcChart_div'></div>"
        });
var chart= new FusionCharts("/js/core/ux/Column2D.swf",  'my2DcChart', '600', '500');

chart.setDataXML("<?xml version='1.0' encoding='GB2312'?><graph xAxisName='月度' baseFontSize='12' baseFont='宋体' caption='Google软件2010年月度销售业绩图表 111111(产品一)' numberPrefix='$' canvasBorderThickness='1'><set color='AFD8F8' name='一月' value='1098'/><set color='F6BD0F' name='二月' value='40000'/><set color='8BBA00' name='三月' value='99999'/><set color='008E8E' name='四月' value='109000'/><set color='D64646' name='五月' value='35000'/><set color='8E468E' name='六月' value='90000'/><set color='588526' name='七月' value='50000'/><set color='B3AA00' name='八月' value='63000'/><set color='008ED6' name='九月' value='152000'/><set color='9D080D' name='十月' value='122000'/><set color='A186BE' name='十一月' value='30000'/><set color='1EBE38' name='十二月' value='50000'/></graph>");
chart.addParam("wmode","Opaque");

chart.render("my2DcChart_div");

render方法报错,fusioncharts里的document.getElementById(my2DcChart_div) 一直报找不到页面对象.... FusionCharts Ext JS --------------------编程问答-------------------- fusioncharts貌似是靠js渲染的  不懂 --------------------编程问答-------------------- 楼主是不是该考虑页面加载完之后再去绘制fusionchart
补充:Java ,  Web 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,