10-30-2009 11:25 AM
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
Solved! Go to Solution.
10-31-2009 05:35 AM
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.
11-02-2009 08:00 AM
Answered like a "Proven Enthusiastic Veteran". In fact, I'd argue you deserve a higher rank in the CVI world.
Thank you Roberto.
--Ian
11-02-2009 08:21 AM - edited 11-02-2009 08:25 AM
You're welcome!
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!