how to use TeeChart with vs2003?
Posted: Wed Mar 29, 2006 9:08 am
i follow the "Tutorial 9 - Internet applications-TeeChart and ASP.NET " instruction, but it doesn't work. the error message is "TChart1 unfefined"
the code:
Create a new ASP.NET application.
Add an Image box to the WebForm.
Right Click on the project's References and add in a reference to the TeeChart Pro ActiveX Control v7 (COM Tab).
In the WebForm's Page_Load event, add in the following code (VB.NET example):
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TChart1.AddSeries(TeeChart.ESeriesClass.scBar)
TChart1.Series(0).FillSampleValues(10)
TChart1.Height = Image1.Height.Value
TChart1.Width = Image1.Width.Value
TChart1.Export.asPNG.SaveToFile("E:\Inetpub\wwwroot\TestASPNETSol\VBWeb\MyChart.png") 'path to virtual folder
Image1.ImageUrl = "http://localhost/VBWeb/MyChart.png"
End Sub
how should i do?
the code:
Create a new ASP.NET application.
Add an Image box to the WebForm.
Right Click on the project's References and add in a reference to the TeeChart Pro ActiveX Control v7 (COM Tab).
In the WebForm's Page_Load event, add in the following code (VB.NET example):
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TChart1.AddSeries(TeeChart.ESeriesClass.scBar)
TChart1.Series(0).FillSampleValues(10)
TChart1.Height = Image1.Height.Value
TChart1.Width = Image1.Width.Value
TChart1.Export.asPNG.SaveToFile("E:\Inetpub\wwwroot\TestASPNETSol\VBWeb\MyChart.png") 'path to virtual folder
Image1.ImageUrl = "http://localhost/VBWeb/MyChart.png"
End Sub
how should i do?