打印

[NET精华教程] .net教程:office xp charting examples in asp.net

.net教程:office xp charting examples in asp.net

imports owc.stimgraph.helper

  

private sub page_load(byval sender as system.object, byval e as system.eventargs) handles mybase.load


             'create chartspace/chart

dim ochartspace as new owc10.chartspace()

dim ochart as owc10.chchart

dim oseries as owc10.chseries

  

'get a newly created chart from the chartspace

ochart = ochartspace.charts.add

  

'get a newly created series from the chart

oseries = ochart.seriescollection.add

  

'set the title

ochart.hastitle = true

ochart.title.caption = "dot net charting"

  

'demo hard coded

dim avalues() as double = {1, 2, 4, 8, 16}

dim acat() as string = {"a", "b", "c", "d", "e"}

  

'setup the text on the bottom axis

call ochart.setdata(owc10.chartdimensionsenum.chdimcategories, -1, getchartsafearray(acat))


  

'add the data to the series

call oseries.setdata(owc10.chartdimensionsenum.chdimvalues, -1, getchartsafearray(avalues))

  

'*******************************************************************************

'*** output the chart

'*******************************************************************************

'erase any garbage from response

response.buffer = true

response.clear()

  

'tell browser to expect a gif

response.contenttype = "image/gif"

  

'send the gif binary data

response.binarywrite(ochartspace.getpicture("gif", 300, 300))


  

'stop

response.end()

end sub





TOP

返回顶部
AYBlue

Processed in 0.045042 second(s), 7 queries.

当前时区 GMT+8, 现在时间是 2009-1-8 15:25 京ICP备06054220号

清除 Cookies - 联系我们 - 163K.com - Archiver - WAP