Problems with add Arrays to TChart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
martinx
Newbie
Newbie
Posts: 13
Joined: Wed Apr 12, 2006 12:00 am

Problems with add Arrays to TChart

Post by martinx » Mon Jul 09, 2007 5:26 am

Hi there, i have the following Problem, i can do the following

objTChart.Add(CType(arrTimes.ToArray(GetType(DateTime)), DateTime()), CType(arrHiValue.ToArray(GetType(Double)), Double()))

i can do
objTChart.add(Date,Double,"Label")

but i cannot do add three Arrays
objTChart.add(arrTimes,arrHiValue,arrTimes.text)

why not. i've got allways error like
Error by the (German) Überladungsauflösung

the third Array is for the Labels in the Bottom Axis

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Mon Jul 09, 2007 9:02 am

Hi Martinx

Could you please send us a simple example project we can run "as-is" to reproduce the issue here?

You can post your files either at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup or at our upload page

please let us know when you have posted the sample project.
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Jul 09, 2007 9:15 am

Hello!

Which overload of Series.Add() are you using?
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

martinx
Newbie
Newbie
Posts: 13
Joined: Wed Apr 12, 2006 12:00 am

method

Post by martinx » Mon Jul 09, 2007 9:43 am

Hi, i use
.add(x as Date,y as Double , text as String)

Greetings

martinx
Newbie
Newbie
Posts: 13
Joined: Wed Apr 12, 2006 12:00 am

Post by martinx » Mon Jul 09, 2007 9:44 am

Sorry i mean
but i cannot do add three Arrays
objTChart.add(arrTimes,arrHiValue,arrTimes_text)

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Jul 09, 2007 9:54 am

Hello,
Sorry i mean
but i cannot do add three Arrays
objTChart.add(arrTimes,arrHiValue,arrTimes_text)
Ok. I think the problem here is that there is no overload of Series.Add() which takes three Arrays, in which case you will have to iterate through your arrays and add them in using the relevant Series.Add() overload (which is what would happen in any case, internally). We'll look into the possibility of a new Series.Add() overload which takes three arrays.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

martinx
Newbie
Newbie
Posts: 13
Joined: Wed Apr 12, 2006 12:00 am

Post by martinx » Mon Jul 09, 2007 10:26 am

Hi Mr.Ireland
>Ok. I think the problem here is that there is no overload of Series.Add() >which takes three Arrays, in which case you will have to iterate through >your arrays and add them in using the relevant Series.Add() overload

Did you Have an Example what you did mean ?


At the moment i have done the following solution . Please correct me if its not okay

Dim labels As New Steema.TeeChart.Styles.StringList(ds.Tables(0).Rows.Count)





For Each cRow In ds.Tables(0).Rows
dMenge = Convert.ToDouble(GetDBValue(cRow.Item("Value"), "Zahl"))
arrHiValue.Add(Convert.ToDouble(dMenge))
If dMenge > nMaximum Then
nMaximum = dMenge
End If
Dim tDatum As Date
tDatum = Convert.ToDateTime(GetDBValue(cRow.Item("Date"), "DatumUhrzeit"))
sDatum = Format(tDatum, "dd.MM.yy")
sDatum = sDatum & vbCrLf
sDatum = sDatum & Format(tDatum, "HH:mm")

arrTimes.Add(tDatum)
labels.Add(sDatum)
Next
If arrTimes.Count > 0 Then
objTChart.Add(CType(arrTimes.ToArray(GetType(DateTime)), DateTime()), _
CType(arrHiValue.ToArray(GetType(Double)), Double()))
objTChart.Labels = labels
End If



i don't know if correct but it works :)
greetings martin

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Jul 09, 2007 10:36 am

Hello,
i don't know if correct but it works
It looks ok to me. If it works, it _is_ correct :D
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply