I want to allow area drawing on the chart, but limited on one y axis.
I use a polygon series to draw the rectangle:
How can I clip the rectangle in the selected y axis?
Draw area on single y axis
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Draw area on single y axis
In MouseDown event, you can use ViewXY.GetGraphSegmentInfo method. That will report the info needed to get each Y axis segment's vertical position in screen pixels. Use those pixel coordinates as a limit. You can use yAxis.CoordToValue method to convert the limit coordinate into a limit Y axis value and limit the polygon's point based on that.
LightningChart Support Team, PT