What are some options when a pie slice is too small to select? E.g., if one slice's value is 15,000, and another is 2, the mouse pointer does not actually hover over the small slice.
I would like to do one or both of the following:
1. Set a minimum arc length of small slices so they remain selectable - even though the visual proportion becomes inaccurate.
2. Allow the user to select the slice by selecting the corresponding legend item.
I can't find any pointers for either of these ideas. Any help would be greatly appreciated.
Hi Francis,
I’m attaching my sample that shows the xamPieChart’s SliceClick event which is raised when you click on a slice and the associated code to set the isExploded and IsSelected properties.
You can use the Legend’s LegendItemMouseLeftButtonDown for the legend items. You’ll see the code I used to add the item to the SelectedSlices and the ExplodedSlices .
There is also some code to display which slices are currently included in the SelectedSlices collection. You’ll notice that when the slice is extremely small it is still not visible.
If you have a number of very small slices you might rather include them in the Other category with the following settings. The OtherCategoryType can use Number or Percent.
OthersCategoryThreshold="50"
OthersCategoryType="Number"
OthersCategoryText="Others"
Let me know if this solves your question.
That's perfect, Marianne, thanks a lot!! Next time, I'll give you a difficult one. :)