LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Reverse of GetGraphCoordsFromPoint?

Solved!
Go to solution

I need to overlay a pie chart (from piechart.fp, with a transparent background) on an XY graph, with the pie centered at certain (x,y) coordinates on the graph.

 

How do I programmatically get the panel coordinates of the point (x,y) on a graph control? It seems to be the reverse of GetGraphCoordsFromPoint, but I can't find such a function.

 

Thanks,

Ian

0 Kudos
Message 1 of 4
(3,335 Views)
Solution
Accepted by topic author Ian.W

I don't think to remember a single function that does what you want: you will need to play with graph axes scales and graph dimensions to obtain a valid set of pixel coordinates.

I designed a simple solution in the attached project: it uses a canvas to draw a circle on the graph and it's far from optimized (as an example it does not take care of the center coordinates being outside the graph area) but it can be used as a framework for you ro develop your own function.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(3,320 Views)

Answered like a "Proven Enthusiastic Veteran".  In fact, I'd argue you deserve a higher rank in the CVI world.

 

Thank you Roberto.

 

--Ian

0 Kudos
Message 3 of 4
(3,291 Views)

You're welcome! Smiley Happy

 

With reference to rank, I know there is a good group of very experienced people here that shares its knowledge and helps this board to develop and develop: I'm honoured that you list me among them!

Message Edited by Roberto Bozzolo on 11-02-2009 03:25 PM


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(3,287 Views)