Hi,
Is it possible to select an area like the zoom selection and get the informations about position and size or do I have to do it by hand?
ViewXY Selected Rectangle
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: ViewXY Selected Rectangle
I'd probably use AnnotationXY for it. It can be set to use screen coordinates or axis values.
For screen coordinates based approach, set:
annot.Style = Rectangle
annot.Anchor.X = 0; //sets anchor to top left
annot.Anchor.Y = 0;
annot.LocationCoordinateSystem = ScreenCoordinates;
annot.LocationScreenCoords.X = mouseX;
annot.LocationScreenCoords.Y = mouseY;
annot.Sizing = ScreenCoordinates
annot.SizeScreenCoords.Width = 100;
annot.SizeScreenCoords.Height = 100;
when you then grab from the edge of the annotation or drag it to other location, SizeScreenCoords and LocationScreenCoords get updated, and you can use that info for further data analysis. You can always convert the screen coordinates into axis values (data values) by using axis.CoordToValue method.
For axis values based approach, take a look at properties
annot.Sizing = AxisValueBoundaries
annot.AxisValuesBoundaries.XMin, XMax, YMin, YMax
For screen coordinates based approach, set:
annot.Style = Rectangle
annot.Anchor.X = 0; //sets anchor to top left
annot.Anchor.Y = 0;
annot.LocationCoordinateSystem = ScreenCoordinates;
annot.LocationScreenCoords.X = mouseX;
annot.LocationScreenCoords.Y = mouseY;
annot.Sizing = ScreenCoordinates
annot.SizeScreenCoords.Width = 100;
annot.SizeScreenCoords.Height = 100;
when you then grab from the edge of the annotation or drag it to other location, SizeScreenCoords and LocationScreenCoords get updated, and you can use that info for further data analysis. You can always convert the screen coordinates into axis values (data values) by using axis.CoordToValue method.
For axis values based approach, take a look at properties
annot.Sizing = AxisValueBoundaries
annot.AxisValuesBoundaries.XMin, XMax, YMin, YMax
LightningChart Support Team, PT
Re: ViewXY Selected Rectangle
It works.
Thank's a lot ...
Thank's a lot ...