Thanks for Brief answer Mona,
Mona had given good example to use MS Chart which is a part of Office Web
Components on the VB.NET form.
The MS Chart has basic functionality of a displaying the chart. If you are
looking at something fancy then you can use the MS Graph on a WinForm.
All you have to do is,
(1) Add the reference of Microsoft Graph from the Add reference->COM tab
(2) The script will look something like,
Dim values(,) As Integer = {{1, 2, 3, 4}, _
{4, 5, 6, 7}, _
{7, 8, 9, 10}, _
{10, 11, 12, 14} _
}
Dim oGraph As New Graph.Global
Dim oDataSheet As Graph.DataSheet
oDataSheet = oGraph.Application.DataSheet
' Place headers into data table.
' Create four column headers.
oDataSheet.Cells(1, 2).Value = "Col1"
oDataSheet.Cells(1, 3).Value = "Col2"
oDataSheet.Cells(1, 4).Value = "Col3"
oDataSheet.Cells(1, 5).Value = "Col4"
' Create four row headers.
oDataSheet.Cells(2, 1).Value = "Row1"
oDataSheet.Cells(3, 1).Value = "Row2"
oDataSheet.Cells(4, 1).Value = "Row3"
oDataSheet.Cells(5, 1).Value = "Row4"
' Get four rows of data.
Dim lRowCnt, lColCnt As Integer
For lRowCnt = 2 To 5
For lColCnt = 2 To 5
oDataSheet.Cells(lRowCnt, lColCnt).Value = values(lRowCnt -
2, lColCnt - 2)
Next lColCnt
Next lRowCnt
Dim oChart As Graph.Chart
oChart = oGraph.Application.Chart
Dim oAxis As Graph.Axis
oAxis = oChart.Axes(Graph.XlAxisType.xlValue,
Graph.XlAxisGroup.xlPrimary)
oAxis.CrossesAt = 7
oChart.Export(FileName:="current_sales.gif", FilterName:="GIF")
oAxis = Nothing
oChart = Nothing
oDataSheet = Nothing
oGraph.Application.Quit()
oGraph = Nothing
For more information on Microsoft Graph object model, refer to,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbagr10/htm
l/grtocobjectmodelapplication.asp
I hope this information helps!
Regards,
Uday Takbhate [MSFT]
Microsoft Developer Support
--------------------
>From: "Mona" <mona@discussions.com>
>References: <1125043844.608051.107310@o13g2000cwo.googlegroups.com>
[quoted text clipped - 54 lines]
>> Thanks for all response
>> Steph