Jump to content
Software FX Community

Data binding a chart to N-number of series


justin.katz

Recommended Posts

This may be a basic data binding question, but i'm having difficulty getting this accomplished.  My goal is to have a Chart bind to my data object, and display as many SeriesAttributes as necessary to show all the data. 

For example, assume the Chart is displaying a stock portfolio with an arbitrary number of stocks.  For each stock, I want a series shown to represent its price over time.  As my StockPortfolio object is updated during runtime (stocks added, removed, quantity changed etc), I want the Chart's series'es to update to match.

Is this possible via binding, or do I need to resort to accomplishing this programatically?

I have attached a project that shows my failed attempt at binding.  Any help would be greatly appreciated!

Thanks,

Justin Katz

 

 

Link to comment
Share on other sites

Francisco,

 Thanks for the quick post.  This would be a great solution if my data were in tabular format; unfortunately my data is already organized into a set of hierarchical data.  Here is another example to better illustrate my situation:

 

Stock - Has many value/time Points in a List

ClientPortfolio - Has many Stock objects in a List

 

I want to display one Chart, with a Series for each Stock over time in the ClientPortfolio.  Ideally, I would set the Chart's data source to be the ClientPortfolio object, and it would automatically generate as many Series as necessary.  This is synonymous with display hierarchical data with a TreeView.

Thanks,

Justin

Link to comment
Share on other sites

  • 9 months later...

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.

Guest
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...