Page 1 of 1

use dataset in TeeChart V7

Posted: Tue Oct 28, 2008 1:45 am
by 9526011
hello.
I got two problems there..
Can anyone tell me the TeeCahrt activeX pro V7 support dataset object in asp.net? or what's wrong with my code?

I added the com item to the toolbox, why can't I drag the Teechart object to the Web form in design mode?

where is my partial code..
==========
da.SelectCommand = New SqlCommand(sqlstr, conn)
da.Fill(ds, "test_table")

TChart1.Width = 500
TChart1.Height = 500
TChart1.Aspect.View3D = False
TChart1.AddSeries(TeeChart.ESeriesClass.scLine)

'TChart1.Series(0).DataSource = ds2rs(ds) ---> convert to recordset , works fine

'TChart1.Series(0).DataSource = ds ---> conflict the unexpected error HRESULT: 0x8000FFFF (E_UNEXPECTED)

TChart1.Series(0).YValues.ValueSource = "field1"
TChart1.Series(0).XValues.ValueSource = "field2"
response.binarywrite(TChart1.Export.asPNG.SaveToStream)
==========
PS. IDE is VS2005

best regards.

Posted: Tue Oct 28, 2008 9:42 am
by narcis
Hi procal,
Can anyone tell me the TeeCahrt activeX pro V7 support dataset object in asp.net? or what's wrong with my code?
You may be interested in having a look at Tutorial 9, specially the ADO and ODBC sections. You'll find the tutorials at TeeChart's program group.
I added the com item to the toolbox, why can't I drag the Teechart object to the Web form in design mode?


Have you looked at the examples at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual Studio .NET? You should use TeeChart ActiveX in Visual Studio .NET as shown there.

Posted: Tue Oct 28, 2008 10:34 am
by 9526011
hi. NarcĂ­s.
thanks for your reply.
narcis wrote:Hi procal,
Can anyone tell me the TeeCahrt activeX pro V7 support dataset object in asp.net? or what's wrong with my code?
You may be interested in having a look at Tutorial 9, specially the ADO and ODBC sections. You'll find the tutorials at TeeChart's program group.
thanks alot, I will read it more seriouosly.
However ,
dataset is a new type of ado.net, it's different from recordset.
I wanna know is If I can set the chart's datasource to a dataset object directly?
now I downloaded the V8-eval, but the questione still.
If I wanna use the dataset, which version should I buy or what method should I do?
I added the com item to the toolbox, why can't I drag the Teechart object to the Web form in design mode?

Have you looked at the examples at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual Studio .NET? You should use TeeChart ActiveX in Visual Studio .NET as shown there.
In VS2005's design, I use it well in windows form(VB),
but I can select it in web form(ASP.NET)
I will read the example again thank you alot

Best Regards.

Posted: Thu Oct 30, 2008 8:36 am
by narcis
Hi procal,

TeeChart ActiveX doesn't support ADO.NET directly over a dataset. You'll have to iterate the dataset manually and add data to your series using AddXY method.