首页 新闻 会员 周边

急救!!!!!!!!!!EXT3.3.0的统计图怎么打印

0
悬赏园豆:30 [已关闭问题] 关闭于 2016-10-09 15:56

JS代码

var buttonOnclick1=new Ext.Button({
        text:"饼图打印",
        listeners:{
            "click":function(){
                var printArea = document.getElementById("div1").innerHTML;
                var iframe = document.getElementById("printIframe");
                iframe.contentWindow.document.body.innerHTML=printArea;
                iframe.contentWindow.focus();
                iframe.contentWindow.print();
            }            
        }
    });
new Ext.Panel({
    iconCls: 'chart',
    title:'<font color="red">按时间段统计处理情况车辆数-饼图</font>',
    renderTo:'div1', //定义panel渲染位置
    anchor: '95%',
    width:document.body.clientWidth/2-10,
    height: document.body.clientHeight-30,//定义高度
    layout: 'fit',
    items: {
            id:'printArea',
            xtype: 'piechart',  
            store: store,  
            categoryField: 'columnName',  
            dataField: 'columnValue',
            extraStyle: {
                 legend: {  
                       display: 'right',  
                       padding: 50,  
                       font: {  
                          family : 'Tahoma',  
                          size: 13  
                       }
                 }   
            }, 
            listeners: {  
                 'beforerender': function(o) {  
                         store.load({
                             params : {
                                time1:time1,
                                time2:time2
                            }    
                         });
                 }  
            } 
        }
    });

 

 

jsp代码

<table>
        <tr>
            <td><div id='div1'></div></td>
            <td><div id='div2'></div></td>
        </tr>
    </table>
    <iframe id="printIframe" style="width:0px;height:0px;position:absolute;left:-500px;top:-500px;"></iframe>

各位大神们求解呀

无畏迎风的主页 无畏迎风 | 初学一级 | 园豆:193
提问于:2016-09-23 11:14
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册