|
Place several images on top of contour chart |
Posted by Dennis on Feb-01-2018 23:25 |
|
I have created a contour chart of the topography of a bowling lane.
I need to place arrows on the chart like on a bowling lane. at the correct places like every 5 boards on the X axis and staggered like on a lane on the Y axis.
I have tried placing 1 arrow with no success.
Dim myImage As DrawArea = New DrawArea()
myImage.resize(50, 50)
myImage.loadPNG(AppPath() & "BlackLaneArrow")
c.makeChart3().merge(myImage, 5, 15, Chart.BottomCenter, 0)
I am unsure of the syntax and where in creating the chart routine the code should go.
I have included an image of the chart in question.
Thanks for any help.
|
Re: Place several images on top of contour chart |
Posted by Peter Kwan on Feb-02-2018 03:09 |
|
Hi Dennis,
For your case, the best method is to add a scatter layer with arrow symbols. The arrow is a built-in symbol in ChartDirector version 6 and you can configure its size, angle, color, etc.. See:
http://www.advsofteng.com/doc/cdnet.htm#builtinsymbols.htm
The following is an example of adding a scatter layer on top of a contour layer. It uses a cross symbol, but you can change it to an arrow symbol.
http://www.advsofteng.com/doc/cdnet.htm#scattercontour.htm
Using the scatter layer should be easier than using the DrawArea and then merge. With a scatter layer, you do not need to load an external image file, and so do not need to worry about its filename and path. Also, the scatter layer uses data coordinates (the scales use on the axes), while the DrawArea.merge uses pixel coordinates. For example, the (5, 15) coordinate in your code merge code would be somewhere near the top-left corner of the chart image, not the (5, 15) according to the axis.
Hope this can help.
Regards
Peter Kwan |
Re: Place several images on top of contour chart |
Posted by Dennis on Feb-02-2018 20:10 |
|
That works great.
Thanks |
|