I need to constrain an anchor to not go past the last visible bar on the chart. For example, if I have a chart that has a Right Side Margin of say 350 pixels. How do I prevent the anchor from being dropped/moved beyond the last visible bar?
I can find the right-most bar by using chartsBars.ToIndex but how do I compare the pixel location of ToIndex with ChartAnchor dataPoint?
Comment