Hi,
I have a binding for CursorPosition in CrosshairLayer:
<Setter Property="CursorPosition" Value="{Binding DataCursorPosition, Mode=OneWay}" /> If I change the zoom it is placed not over data point, if not zoomed works fine.updating cursor cursor in ViewModel:
DataCursorPosition = (double)(dataPoint.Time.Ticks - minTime.Ticks) / (maxTime.Ticks - minTime.Ticks);
Best regards,Krzysztof
Hello Krzysztof,
Thank you for your update on this matter. I am glad the workaround is working for you on this matter.
I have asked our development teams to examine this further, and so I believe this behavior should be fixed in a future version, allowing the calculations to take into account the applied PlotAreaMargin.
To ensure this receives attention, I have logged it in our internal tracking systems with a development ID of 274655. I will be linking this to a private support case that I have created for you so you can be notified when a fix or other resolution is made. This case has an ID of C-00226551, and you can access it after signing into your account, here: https://account.infragistics.com/support-cases.
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
yes, that's how I fixed it for now. As for workaround it is ok, but would be nice to fix it in the futureBest regards,Krzysztof
If your data points are being cut off, it is worth noting that if you are using a TimeXAxis or CategoryDateTimeXAxis, you can set the MinimumValue and MaximumValue of the axis to something slightly outside of the data that is plotted. This would prevent the markers from being cut on the left and right.
Similarly, the NumericYAxis also has a MinimumValue and MaximumValue property that can do something similar to prevent the markers from being cut from the top and bottom.
Unfortunately it does not help, when zooming in and out it will cause that cursor snap from one datapoint to another depending
We have two crosshair layers, the 'default' one with interpolation off, and second which we call 'data cursor' crosshairlayer, as you can see when I hover over right data point, the 'default' layer is snapping correctly, when I click this datapoint, because of that plotareamargin, position is snapped to the left data point (green). When I will zoom in/out it will snap to another data point (or moving zoombar also will cause it)
So it must be also somehow adjusted by WindowRect X and Width and the 'default' layer can handle it somehow
Setting PlotAreaMargin to 0 (or left/right to 0) is solving it but some of the data markers are cut off, but maybe I will figure out how to do the margins in another way if there is no way to calculate the position.
Best regardsKrzysztof
It may be worth noting in this case that if you are trying to get the CrosshairLayer to snap to your data points, you can set the UseInterpolation property of the CrosshairLayer to false. This will prevent the CrosshairLayer from moving from the points in the plot area, as it will snap to the actual points instead.