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 %> />     
  • 相关阅读:
    ButterKnife不同版本配置
    【转载】RecyclerView源码解析
    【转载】RecyclerView使用全解析
    RecyclerView 和 ListView 使用对比分析
    apk瘦身
    【转载】图片压缩最优方案
    file.listFiles()按文件大小、名称、日期排序方法
    git命令
    Android中由Handler和内部类引起的内存泄漏
    查看Android手机数据库
  • 原文地址:https://www.cnblogs.com/ding0910/p/483324.html
Copyright © 2011-2022 走看看