jhopper28 Posted March 29, 2010 Report Share Posted March 29, 2010 I have several DataTables that all have the same structure, and I need to display each set of data as its own series (e.g., a line graph where each table's data is represented by a separate line) in one chart. How can I do that with data binding? I've used the CrosstabDataProvider to do something similar, but in this case, my data is not represented in a single table that needs to be pivoted, but rather several separate tables. Quote Link to comment Share on other sites More sharing options...
juanZ Posted March 30, 2010 Report Share Posted March 30, 2010 Hi, You cannot databind this automatically to the chart. So, you must loop over your datarows from all yoour datatables in order to bind them to the chart manually. Depending on how your are going to compose the series on the chart, you should loop over them. So, you can get the information from from a single datarow or by merging up all the rows for the first column into a collection (int[] intArray = new int[100] and setting up the collection to a Chart ListProvider object. If you want to get more ways you can do this, please check the "Passing Data" sample that comes with the Chart FX Resource Center [Programmers Guides and Samples - Passing Data - Sample Applications] If you need more assistance, please let me know. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.