This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi We downloaded the June 3, 2014 nightly build and found a problem on SelectedDataPoint for scattered series. A Chart contains a scatter data series. We add a few context menu to the chart, 1) when we selected a Data Point by right or left mouse click, the chart will send us a SelectedDataPointChanged Event with SelectedDataPoint != null , which is good and act as before versions before. 2) then right click to choose a context menu item, when we click on the menu item, the chart will send us another SelectedDataPointChanged Event with SelectedDataPoint == null, this cause a lot of problem for us. However, the May 22, 2014 nightly build does not have the problem. Could you fix this please? Thanks, Gordon |
|
|
Hello Gordon I have not been able to reproduce this problem. Please let me know the values of the CanToggleSelection and CanDeselectOnClickNothing properties of the chart. Also, please send some xaml code of the context menus that can reproduce the problem - in particular what elements are the context menus parented to. -Jason Fauchelle |
|
|
Hi Jason, Here are the values you asked for: CanToggleSelection = false CanDeselectOnClickNothing = true Thanks, Gordon |
|
|
Hi Jason, The chart is on a user control and the context menu items is added to the user control not on chart. Not sure if this will be helpful. Thanks, Gordon |
|
|
Thanks for the additional information, though when clicking on a menu item within a context menu on the user control, the selection state of the chart is unchanged. Right clicking on an empty space in the chart however deselects the data point due to CanDeselectOnClickNothing being set to true which is the expected behavior. I will need a repro project to find the cause of this issue. Will your previous repo project that you sent via email be able to reproduce this? -Jason Fauchelle |
|
|
Hi Jason, I finally nail the point when it happens. It has nothing to do with ContextMenu clicking. Sorry for the confusion. When we choose that menu item, it will remove one or all dataseries from Chart (I will clear the databinding for the dataseries and set the dataseries.itemssource=null), which will fires up the SelectedDataPointChanged event. So it may not be your problem if you cannot change it, I will try to fix them in our end... Thanks, Gordon |
|
|
Thanks Gordon That explains it. It makes sense for the selection to be set to nothing when the items source is emptied or removed, so I will not change this. Maybe you will be able to remove the SelectedDataPointChanged event handler before clearing the data binding. I'm sure you'll find a simple solution to resolve this at your end. -Jason Fauchelle |
|