views:

306

answers:

1

I want to select many points/bars/columns etc in all types of charts that the WPF charting toolkit provides, something that the toolkit does not seem to support. I really would like to avoid writing my own DataPointSeries... Any ideas how to achieve that?

A: 

As you note, the current implementation (as of November 2009) supports only single selection. There are three roads to multi-selection support that I see offhand:

  1. Implement it yourself by making the necessary modifications to the open-source code for the Data Visualization assembly. You can download the code from blogs.msdn.com/delay/archive/2009/11/30/two-birds-squared-silverlight-wpf-data-visualization-development-release-3-and-a-datavisualizationdemos-update.aspx. Making the relevant modifications shouldn't be too hard, especially if you implement just enough to support your scenario. Fundamentally, multi-select isn't much different than single-select except that more than one item can be selected at a time and it's necessary to track them all.
  2. Wait for us to get around to doing this ourselves and download the relevant release as-is. Unfortunately, this won't happen very soon, so if you need this now, this isn't a great option. :(
  3. Implement it yourself by creating a custom DataPointSeries deriving from ListBox as I mention briefly here: blogs.msdn.com/delay/archive/2009/09/13/a-preview-of-upcoming-charting-changes-silverlight-wpf-data-visualization-development-release-1.aspx. I mention this only for completeness and because the nice thing is that you get full multi-/extended-selection for free (after doing a bunch of work to convert).

So I guess there's really just one good option. But the good news is that it shouldn't be too hard - and it would make a great blog post I'd love to link to from my collection of Data Visualization links: http://cesso.org/r/DVLinks

I hope this helps!

David Anson