Pre loader

Tag: HitTest

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1 vote
2k views

Hi I have an application where I would like to get the color information of the the pixel clicked on the uniformheatmap.

I am of course able to get the value, x, y using the hitTestProvider.hitTest but it does not contain any additional information regarding the color of the clicked pixel

Any help of direction is appreciated.

Pramod

0 votes
6k views

I encountered an exception inside scichart2d.js when I used hitTestProvider.hitTest.

getHitTestInfo(idx, e) {
let touch0 = e.targetTouches[0];
let rect = e.currentTarget.getBoundingClientRect();
let x = parseInt(touch0.pageX - rect.left);
let y = parseInt(touch0.pageY - rect.top);
const premultipliedX = x * DpiHelper.PIXEL_RATIO;
const premultipliedY = y * DpiHelper.PIXEL_RATIO;
let lineSeries = this.$store.state.components.scitchart.sciObj[idx].sciChartSurface.renderableSeries.items[0];
console.log(`lineSeries.hitTestProvider.hitTest(${premultipliedX}, ${premultipliedY}, ${DpiHelper.PIXEL_RATIO})`);
let result = lineSeries.hitTestProvider.hitTest(premultipliedX, premultipliedY, DpiHelper.PIXEL_RATIO);
return result;

}

The video URL is as follows
https://youtu.be/3GIlv_ldorY

1 vote
3k views

Hi Scichart Team,
RenderableSeries Hit-Test still having some issues. I saw that the bug on your board is already closed state and my last comments are missed on the bug. So i am adding the same here.

https://www.scichart.com/questions/js/renderableseries-hit-test-not-working-as-expected

Can you please check the video and the code. Only change i have done on the Example is the data values are updated. On the video you can saw the clicking outside for some area Hit is showing, some area miss is showing, and clicking on the lines or point also showing the same. Let me know you need any more inputs from my side.

0 votes
4k views

RenderableSeries Hit-Test is not working as expected. Some bugs on the the RenderableSeries Hit-Test. Distance between two points are less then its working most of the time and getting the isHit variable getting true. But the distance is high then the lines near to the point only getting the isHit true. I am attaching the image when the red marked area is working fine and the blue marked area not working.

0 votes
6k views

I am getting a console error when using isVisible: false to the FastLineRenderableSeries or FastMountainRenderableSeries and CursorModifier together.

0 votes
0 answers
6k views

Hello.

When the “RotationAngle” is set for “PolarXAxis” in the range -180 to 0 degrees, the “HitTest” method returns a “HitTestInfo” instance with an invalid “DataSeriesIndex” value. In most cases, “DataSeriesIndex” differs by 1 from the position of the item in the “DataSeries” collection under the mouse cursor.

Please help me to solve this problem.

The attached project reproduces only this problem.

1 vote
7k views

Regarding Andrews comment on my question in this thread: https://www.scichart.com/questions/wpf/hittest-with-mvvm#sabai-entity-content-13177.

Thanks Andrew,
actually I need to know which nearest Y-value my XY line series has at the given VerticalLineAnnotationViewModel position. I need this value only for some calculation no need to show this on screen.

I found this post:
https://www.scichart.com/questions/wpf/current-y-value-of-annotation

But neither your answer Andrew nor the suggested solution of Alitec Developer works for me. The VerticalSliceHitTest() returns always a HitTestInfo with default values and the FindIndex() approach is not suitable for me because I have unsorted data.

  • Roland D asked 4 years ago
  • last active 1 year ago
0 votes
7k views

Hello,

I am creating a LineAnnotation using Annotation Modifier.

In AnnotationCreated event, I need the Hit Test Info of the start and end Points of annotation i.e. annotation.X1,Y1,X2,Y2 points in order to find out the series name and other information(similar to HitTestAPI example in examples suit).

I also need to verify if they are lying on a series or not.

The problem here is series.HitTest() accepts a raw point which I am unable to get from annotation.

Is there any way to do this.

0 votes
7k views

I am creating point data series using SCIXyScatterRenderableSeries.
I need to tap on specific data points and display pop over or some view on top of it. Pop over provides information regarding that point.

How can I implement that in iOS.

0 votes
7k views

We have a graph surface with some point markers on it and we want to show a custom tooltip every time the user taps on a point marker. So far I’ve used a UITapGestureRecognizer, convert the touchpoint in the chart frame and for each of the renderable series perform a HitTestAtX with a radius (I’ve tried 1, 5 and 30) but it always returns true, even if I tap on an area where there’s a gap in the chart. Here’s some sample code:

SCIHitTestInfo hitTestInfo = renderableSeries.HitTestProvider.HitTestInterpolateModeAtX(touchPoint.X, touchPoint.Y, 30, renderableSeries.CurrentRenderPassData);

if (hitTestInfo.match)
{
       Console.WriteLine($"Tapped {hitTestInfo.xValue} {hitTestInfo.yValue} with index {hitTestInfo.index} of the series {renderableSeries.DataSeries.SeriesName}");

       var elementSeries = Model.BottomRightLegendList.FirstOrDefault(tup => tup.DataSeries.SeriesName == renderableSeries.DataSeries.SeriesName);

       var element = elementSeries.GraphElement;

       if (element != null)
       {
            matchedElements.Add(element);
       }
}

Why is the “match” property always true, even if there are no Point Markers in the radius?

0 votes
10k views

Hi All,

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
/Stuart

1 vote
11k views

I have multiple series on a chart surface, each with their own y-axis. I do not want to display all y-axes as this would take up half the chart surface.

Is there a way to make the matching y-axis only visible when the mouse cursor hovers over a series (hit-test)? How would I go about that?

Thanks
Matt

  • bbmat asked 7 years ago
  • last active 7 years ago
2 votes
11k views

Hi,
I am currently trying the iOS Charting Library and want to implement a Column series with the drill-down functionality (when touching one of column points by end user). Does the charting component supports the hit-testing or selection feature to determine which point has been clicked at runtime?
Thanks!
Liza

  • liza yudup asked 7 years ago
  • last active 7 years ago
0 votes
8k views

I have multliple renderable series on one scichartsurface and each series has its own y-axis, when CursorModifier-cross moves over line/scatter point/ohlc/candle series how can I ONLY show the y-Value on the with the rendered series matching y-Axis?

With multiple rendered series its virtually impossible to determine which y-Axis value pertains to the specific point of the CursorModifier which “hit-tests” a rendered series.

Is there a simple way to only highlight the y-Value on the matching yAxis as soon as the CursorModifier hit-tests a rendered series? I do not mind to show all yValues on all yAxes when the CursorModifier does not hit-test any rendered series.

Thanks

  • bbmat asked 8 years ago
  • last active 8 years ago
0 votes
14k views

We are using SciChart 2.2.3441
And i need to detect hit only at DataPoint,
RenderableSeries.HitTest(hitTestPoint, true) – works fine!
But RenderableSeries.HitTest(hitTestPoint, 10, false) – always returns IsHit = false. No matter what is hitTestRadius.
See attached project for example

Showing 15 results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies