zoukankan      html  css  js  c++  java
  • ASP中OWC的使用

    <%                   
                          
    dim ctype()
                          
    dim values()
                          
    redim ctype(ubound(show_arr,2))
                          
    redim values(ubound(show_arr,2))
                        
    '''中间步骤对数组ctype()和values()进行赋值
                        'set chart=createobject("owc.chart")
                        set chart = server.CreateObject("OWC11.Chartspace"'//office2003
                        chart.clear
                        
    set ochart=chart.charts.add               '添加一个chat类  
                        set oconst=chart.constants                '调用chat的命名常数
                        set oseries=ochart.seriescollection.add   '生成一个series序列

                        
    with oseries
                            .caption
    =FlowYear&"年Q"&FlowQuarter&"机型移动图"
                            .setdata oconst.chdimcategories,oconst.chdataliteral,ctype          
    '赋值横坐标值
                            .setdata oconst.chdimvalues,oconst.chdataliteral,values                '赋纵坐标值
                            .type=19
                            
    with .DataLabelsCollection.Add
                                .HasPercentage 
    = True
                                .hasvalue
    =false
                                .Font.Size 
    = 10
                            
    end with
                        
    end with

                        
    with ochart
                            .hastitle
    =true                                   '使图标有标题
                            .title.caption=FlowYear&"年Q"&FlowQuarter&"机型移动图"
                            .title.font.size
    =12
                            .title.font.bold
    =true
                            .title.font.color 
    = rgb(0,0,155)
                            .WidthRatio 
    = 50 
                            
    ''''if charttype="5" then
                            .haslegend=true                                  '使图表有图例
                            .legend.position=oconst.chlegendpositionright    '设定标注的图表位置(bottom)
                            .legend.font.size = 9
                           
    ''''end if
                        end with

                        sFname
    =server.mappath("../image/report_SaleTrend.gif")
                        vFname
    ="../image/report_SaleTrend.gif"'生成图表的iis虚拟路径名
                        width = 450
                        height 
    = 300
                        chart.exportPicture   sFname,
    "gif",width ,height'将图表到处导服务器的物理路径中
                        set chart=nothing
                        
    set ochart=nothing
                        
    set oconst=nothing
                        
    set oseries=nothing                   
                       
    %>
                        
    <img align="center" border="0" src=<%=vFname %> />     
  • 相关阅读:
    App提交Appstore审核流程【转】
    程序员必须软件
    Linux的cron和crontab
    Git操作基本命令
    Python编码问题整理【转】
    Python读取ini配置文件
    RF+Jenkins构建持续集成
    RF接口测试本地环境部署
    Python建立SSH连接与使用方法
    永久修改python默认的字符编码为utf-8
  • 原文地址:https://www.cnblogs.com/ding0910/p/483324.html
Copyright © 2011-2022 走看看