I have set up a ASP.NET page with a single WebChart. I have added a series to the WebChart of type line. I run a SQL query and get a dataset back which consists of 2 fields, a date and a measurement. When I add the series manually by using the Add method eg:
Code: Select all
line1.Add( (DateTime) dtMyDate[i], (double) myMeasurement[i] );
Code: Select all
line1.Add( (DataTable) dtMyData );
Adding it in a loop works but it's not optimized. I'd like to drop a chunk of data and not have so many jumps and conditional branching occurring on the server if possible.
Also, in your tutorials it says the ASP.NET WebChart uses a similar data binding technique as in the Windows form. How do I get a OleDbDataAdapter to be recognized by the WebChart component at design time in an ASP.NET session? It's not available in the toolbox. I can declare and add it to my code, but it will only get instantiated at runtime. Sorry if this is a stupid question, I'm still learning ASP.NET I am used to C/C++/Java embedded firmware development.