I have the following problem:
Having list of Objects (class MyClass) with several Properties I want to bind the Chart Datasource to specific class properties:
public class myClass {
public int a;
public int t;
public double v;
myClass(int aa, int tt, double val){
a=aa;
t=tt;
v=val;
}
}
public List<myClass> myList;
myList.Add(new myClass(1,1,10));
myList.Add(new myClass(1,2,15));
myList.Add(new myClass(2,3,20));
I want now to get a chart with t mapped to the AxisX and v mapped to the AxisY. I able to get 2 arrays from the Objects List but I have no idea how to "bind" them to the Datasource:
myList(item => item.t).ToArray()
myList(item => item.v).ToArray()
// Create data binding for chart
var bs = new BindingSource();
bs.DataSource = ????????????????;
Thank you for your help!!
R.