开发者

WPF Charting Toolkit: SelectedItems instead of SelectedItem? [closed]

开发者 https://www.devze.com 2022-12-14 16:35 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 5 years ago.

Improve this question

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 开发者_StackOverflowthat?


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://dlaa.me/r/DVLinks

I hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消