Profile Picture

How can i get the Y Axis's Top coordinate

Posted By Feng Wu 12 Years Ago
Author
Message
Feng Wu
questionmark Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 5, Visits: 1
Hi,

Refer to the attachment, i know the yellow point's coordinate is (0, 0) ,

now I have a requirement to draw a rectangle using GDI+ ,

and the rectangle's position is dependent to blue point in the attachment image,

how can i get the blue point's coordinate?



Thanks, Feng

Attachments
chart.png (64 views, 56.00 KB)
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Feng,

Check out the custom drawing example - All Examples\Custom Painting - it shows how to tranform scale coordinates to 2D view coordinates. To get the axis ranges at runtime you can use:

NRange1DD rangeX = chart.Axis(StandardAxis.PrimaryX).Scale.RulerRange;
NRange1DD rangeY = chart.Axis(StandardAxis.PrimaryY).Scale.RulerRange;

Note that the chart has to be calcuated.

Hope this helps - let us know if you meet any problems.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic