html5中文学习网

您的位置: 首页 > 网络编程 > ASP.NET » 正文

Office XP Charting Examples in asp.net_.NET教程_编程技术

[ ] 已经帮助:人解决问题
asp.net|chart
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

rw4HTML5中文学习网 - HTML5先行者学习网
rw4HTML5中文学习网 - HTML5先行者学习网
(责任编辑:)
推荐书籍
推荐资讯
关于HTML5先行者 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助