zoukankan      html  css  js  c++  java
  • 用友华表Cell产生柱状图表

    function fn_DoResult(result)
    {
        if(result=="")
        {
            alert("操作失败");
            return;
        }
        var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
            xmlDom.loadXML(result);
        var rowNum = 0 ;
        var colNum = 0 ;
        rowNum = xmlDom.documentElement.childNodes.length;
        //如果查出资料
        if(rowNum>0)
        {   
            document.form1.Cellweb1.WorkbookReadonly = false;//取消只读 进行报表写入
            var firstRow = xmlDom.documentElement.childNodes[0];//第一行

            //
            document.form1.Cellweb1.SetCellDouble(3,26,0,firstRow.childNodes[0].text);
            document.form1.Cellweb1.SetCellDouble(4,26,0,firstRow.childNodes[1].text);
            document.form1.Cellweb1.SetCellDouble(5,26,0,firstRow.childNodes[2].text);
            document.form1.Cellweb1.SetCellDouble(6,26,0,firstRow.childNodes[3].text);
            document.form1.Cellweb1.SetCellDouble(7,26,0,firstRow.childNodes[4].text);
            document.form1.Cellweb1.SetCellDouble(8,26,0,firstRow.childNodes[5].text); 
            //
            document.form1.Cellweb1.CreateChart(3,26,8,26,0);//建立统计图///通过指定区域的数据建立图表

            document.form1.Cellweb1.SetChartType(0,0,0);//设定图表的类型 柱状图
           
            document.form1.Cellweb1.SetYAxisTittle("人数", 0, 0);//y坐标轴标题

            document.form1.Cellweb1.MoveChartOnArea(3,4,7,21,0,0);//将图表移动到指定表页的指定位置上
            document.form1.Cellweb1.SetXLabelArea(3,25,8,25,0,0);
            document.form1.Cellweb1.ShowLegend(false,0,0);
            document.form1.Cellweb1.ShowChartTittle(false,0,0);//是否显示图例 ShowChartTittle
            document.form1.Cellweb1.ShowYAxisTittle(true,0,0);
            document.form1.Cellweb1.ShowXAxisTittle(false,0,0);
            document.form1.Cellweb1.AllowDragChart  = false;//禁止用户拖拽,修改图表
            document.form1.Cellweb1.ShowDataSign(true, 0, 0);//显示数值

            document.form1.Cellweb1.SetChartFont("宋体", 14, 0, 0);
            //设置单位信息
            var strvalue=document.all.UnitCtl1_txtUnitText.value;
            document.form1.Cellweb1.SetCellString(2,23,0,strvalue);
        }   
        else
        {
            alert("操作失败");
        }
       
        //统计完毕 报表显示
        tab_PageData.style.display="block";
        tab_WaitMsg.style.display="none";
    }

  • 相关阅读:
    在64位Win7下安装Oracle 10g客户端,以及PL/SQL Developer的经验
    Windows 8/Windows 8.1激活CMD命令大全
    安装交叉编译工具出错,arm-linux-gcc: 没有那个文件或目录
    驱动设备号创建
    内核驱动调试
    stm32定时器接力
    linux常用命令
    stm32定时器外部计数
    stm32 flash 选择
    pymysql 使用twisted异步插入数据库:基于crawlspider爬取内容保存到本地mysql数据库
  • 原文地址:https://www.cnblogs.com/freeliver54/p/1083720.html
Copyright © 2011-2022 走看看