Apologies if this is a horrible newbie question, I'm still learning.
I have a Class representation of my data which contains some Properties I want on my chart and some I don't. If I were feeding a ListView with an ObjectDataSource, I could feed the ASP.NETtemplate with the values I need using Eval("Item1"). In trying to getObjectDataSource values into a chart I am having some problems. It's probably my approach.
What I think I would like to do is programmatically access these Properties in the code-behind, assign them to variables, and then feed these variables into an array... something like:
// Get the yval Properties from an ObjectDataSource
double item1 = somehow get the Property???;
double item2 = somehow get the Property???;
double item3 = somehow get the Property???;
double item4 = somehow get the Property???;
double[] yval = { item1, item2, item3, item4 };
// Hardcode the xval Properties for now
string[] xval { "Item1", "Item2", "Item3", "Item4" };
chart1.series["MySeries"].Points.DataBindXY(xval, yval);
Does anyone have an example for grabbing ObjectDataSource Properties and sticking them into variables... or is my whole approach horrible?
Thanks,
Deak