SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I’ve got a class that derives from the DataPointSelectionModifier in order to access the OnValueChanged() functionality and everything is fine (Thank you Andrew).
However – When I have 2 series on the chart (scatter series) and 2 points are quite close together, a single selection of a point can result in the selection of two points. On playing around with it a bit I notice that a point can be selected when the mouse pointer is slightly outside the limits of the pointmarker (in this case a 10×10 EllipsePointMarker) so if you get 2 points only a few pixels apart it is possible to place the mouse between the two and get both points selected. You can also see the behaviour in the SciChart examples 2DCharts|Toltips and Hit Test| Pointmarkers Selection example if you play with the points in the top left corner.
The Question: Is there a way to reduce the area around the mouse pointer that a hit test is detected in? (e.g. 20 pixel radius down to say 5 pixel radius)
I’ve had a look at overriding GeometryHitTestResult HitTestCore but I don’t really know if this is even the right way to go. If somebody can confirm this is where I should be looking then I’ll find some time to persevere with it.
Thanks in advance
Hi, I am currently working with the DataPointSelectionModifier with StackedColumnRenderableSeriesViewModel series. I currently am able to get the data point with the correct values whenever I click on a column but it seems that I am not able to change the selection fill of the column.
All I can seem able to do is changing the color of the whole series, but that is not what I am looking for.
I am currently using the DataPointSelectionModifier for StackedColumnRenderableSeriesViewModel and I am having an issue trying to have a single selection that is togglable.
I am currently not AllowingMultiSelection so the default value is SelectionMode.Replace, which, in case you click on the same column, it will deselect that column and then select it again. Is there a way around this?
I’m using the RubberBandXyZoomModifier and DataPointSelectionModifier together from the left mouse button; enabling and disabling them based on the left CTRL key being pressed (CTRL key down = select).
I’m seeing what I assume to be a focus issue on first mousing over off the chart area in that the chart area doesn’t attract focus, and thus recognise the ctrl key press, until there’s been a mouse button click. I’ve created an app to demonstrate and attached the XAML and code behind for it.
To see the behaviour, run the code and press the “does nothing” button to set focus to it. Mouse over the chart and press the CTRL key – the key press is not recognised. Click the left mouse button and the key press is now recognised. So far so good.
Now if you repeat the process but click and drag – the logic is caught between the two modifiers being enabled/disabled and the zoom selection is shown even though the CTRL key is down. There are other issues e.g. CTRL down and drag outside the chart can leave the selection modifier drag area marked on the chart while the zoom mode is in operation
I was thinking of something like setting focus or forcing a mouse click in response to the mouse over event but so far my attempts have failed – probably from doing the wrong thing in the wrong place – so, as usual, any and all suggestions are most welcome!
I’m playing with the DatPointSelectionModifier which seems mostly what i need but I have two problems as follows:
1/ I have started a selection operation by dragging over an area containing some points and I decide that I don’t want that area after all and want to cancel the operation (much like file explorer file dragging – hitting escape cancels the operation) – How do I do that?
2/ I have a set of selected points and drag to select another set which overlaps the first set. I would like the any points in the overlap to invert from selected to unselected and vice versa. How would I know which points are encompassed by the drag operation so i can work out the overlap?
Thanks for any suggestions
Here’s the situation:
Our app has a viewmodel with an XyDataSeries Property bound to the plot. We’ve overridden DataPointSelectionModifer to allow us to trigger calculations when the selected points are changed. This overridden modifier is not instantiated by nor is it directly aware of the viewmodel; it is referenced only in the view xaml.
When changing between datasets we replace the contents of the XyDataSeries Property. Afterwards we are experiencing NullReferenceExceptions in DataPointSelectionModifier.SelectManyPoints(). This occurs whether we replace the contents of the data series or we set a completely new XyDataSeries object into the property.
It appears that the DataPointSelectionModifier.SelectedPointMarkers collection is no longer properly synced to the plot’s XyDataSeries. The size of the the collections are different and with the original DataSeries being garbage-collected the DataPointInfo.DataPointMetadata references are null. So we attempt to dial in a new selection and the deselection of this orphaned null metadata raises exceptions.
Is there some secret-sauce to keeping these collections in line?
Any and all suggestions are greatly appreciated.