Jump to content
Software FX Community

Multiple series on same chart with data binding


Recommended Posts

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.

Link to comment
Share on other sites


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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...