owc生成图设置背景为渐变问题

xy19830419 2008-01-28 03:50:02
谁能帮我把下边这个生成图的背景设成两种色渐变一下啊,谢谢各位大哥了。


<%
Class user_map


Public Sub Class_Initialize()



End Sub


public Sub ose(arrp,mon,value)

set chart = server.CreateObject("OWC11.Chartspace") '//office2003

chart.clear
chart.border.color="#FF0000"
'chart.PlotArea.Interior.SetTwoColorGradient Microsoft.Office.Interop.OWC.ChartGradientStyleEnum.chGradientDiagonalDown,Microsoft.Office.Interop.OWC.ChartGradientVariantEnum.chGradientVariantEnd,"LightSkyBlue", "white"
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,mon '赋值横坐标值
.setdata oconst.chdimvalues,oconst.chdataliteral,arrp '赋纵坐标值
.type=value '控制图的类型

end with

''''''''''''''''''''''''''''''
with ochart
.hastitle=true '使图标有标题
.title.caption=FlowYear&"年Q"&FlowQuarter&"机型s移动图"
.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/" & value & "report_SaleTrend1.gif")
' vFname="../image/" & value & "report_SaleTrend1.gif" '生成图表的iis虚拟路径名
sFname=server.mappath("image/" & value & "report_SaleTrend1.gif")
vFname="image/" & value & "report_SaleTrend1.gif"
width = 450
height = 300
chart.exportPicture sFname,"gif",width ,height '将图表到处导服务器的物理路径中

response.write " <img align='center' border='0' src='"&vFname&"'/> "

End Sub
Private Sub class_terminate()
set chart=nothing
set ochart=nothing
set oconst=nothing
set oseries=nothing
End Sub
End Class

arrp=Array(11,12,13,14,2)
mon=Array(1,1,3,4,5)

arrp2=Array(32,12,43,21,7)

value=7

Set xy=new user_map
xy.ose arrp,mon,value
%>
...全文
78 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovehongyun 2008-01-29
  • 打赏
  • 举报
回复
帮顶.

62,243

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧