Page 1 of 1

Series.Add<T>?

Posted: Mon May 16, 2011 5:10 pm
by 15656770
Is there an example on the use of series.Add<t>?

If I define a list<xypoint> can I use this in a line series?

class xypoint
{
double x;
double y;
}

Re: Series.Add<T>?

Posted: Tue May 17, 2011 4:10 pm
by yeray
Hello John,

The "Add<T>(T TType)" method is intended for those who have an unknown type of source. The method calls the according Add override for the given parameter type. For example if you have a list of object but for any reason you don't know if the list is a list of integers or doubles or ... the "Add<T>(T TType)" method will call "Add(Convert.ToInt32(TType))" or "Add(Convert.ToSingle(TType))" or ...

In your case, I think you are sure you'll have doubles, isn't it? In that case you could directly use the "Add(PointF p)" or the "Add(double x, double y)"

Re: Series.Add<T>?

Posted: Wed Jun 15, 2011 8:31 am
by 15659548
Hi,

I am facing an issue in which the Series.Add<T> doesn't work with the UInt64 type. Can you help me confirm this and how I can get over this issue?

Best regards,
Siguo

Re: Series.Add<T>?

Posted: Thu Jun 16, 2011 9:41 am
by narcis
Hi Siguo,

I'm afraid Series.Add<T> doesn't support UInt64 at the present moment. I have added your request (TF02015619) to the wish-list to be considered for inclusion in future releases. In the meantime you should convert UInt64 manually as Yeray indicated.