IntensityGrid Cursors

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Leodox
Posts: 5
Joined: Sat Apr 16, 2016 6:03 am

IntensityGrid Cursors

Post by Leodox » Tue Oct 11, 2022 7:12 pm

I am using an IntensityGrid (currently version 10.1.1.4001) to display a static spectrogram. I have need of a Horizontal cursor, Vertical cursor, and an XY cursor. These cursors would need to be interactable for the user. So far, the only cursor I can find that is supported by IntensityGrid is the LineSeriesCursor, but it only supports X coordinates. I see that it has SnapToPoint and HairCross properties, but I can't get them to work on the IntensityGrid. They kind of don't make sense for an IntensityGrid because which Y value will they snap to? How can you set the Y value of the cross line? Are there other types of cursors that I can use on the IntensityGrid? For the XY Cursor, I would like to set the X and Y coordinates, see the crosshairs displayed on the chart, interact with either axis, and then retrieve and display the Z data value at that point. Any help is appreciated!

Best Regards,
Jon Barrett

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: IntensityGrid Cursors

Post by ArctionKestutis » Wed Oct 12, 2022 7:48 am

If you need draggable horizontal line, you can use ConstantLine object/class. The idea how ConstantLine and LineSeriesCursor could be used on IntensityGrid is demonstrated in ExampleSpectrogramLayoutCursors from our Demo.
ExampleSpectrogramLayoutCursors.jpg
ExampleSpectrogramLayoutCursors.jpg (376.01 KiB) Viewed 8788 times
If you need lines to follow the mouse-cursor, you could implement them as two FreeformPointLineSeries, which updated on fly. Such idea is demonstrated in ExampleHeatMapXYMouseCrossSection.
ExampleHeatMapXYMouseCrossSection.jpg
ExampleHeatMapXYMouseCrossSection.jpg (301.39 KiB) Viewed 8788 times

P.S. If you have active subscription, you can write email directly to Suppot at lightningchart.com, and we could discuss most optimal approach for your application.

Leodox
Posts: 5
Joined: Sat Apr 16, 2016 6:03 am

Re: IntensityGrid Cursors

Post by Leodox » Fri Oct 14, 2022 3:21 pm

I was able to create an XYZCursor class which wraps a LinearSeriesCursor, ConstantLine, and AnnotationXY. All the colors, line patterns, and positions are linked., Both lines and the annotation target point are draggable by the user. If it has an IntensityGridSeries instance, then the Z value is automatically found using using the X,Y point, and the values are displayed in the annotation comment. It works very well. Thank you for the quick reply.

Best regards,
Jon

Post Reply