Hi Dan,
For Axis.setLabels, there are many labels, not just one label, and the labels can be of different shapes (as they can have different font size, length, and can be rotated, etc). The returned TextBox represents the "prototype" of the labels. You can set its attributes, such as the font style, font size, colors, etc, to configure the label appearance. However, it cannot be used to retrieve the bounding boxes or the image maps of any particular label.
If you need the image map of the axis labels, you can use Axis.getHTMLImageMap. See:
http://www.advsofteng.com/doc/cdcom.htm#Axis.getHTMLImageMap.htm
Note that like the BaseChart.getHTMLImageMap, the Axis.getHTMLImageMap should be used only after the chart has already been drawn.
There is another API that can be used to obtain the "thickness" of the axis:
http://www.advsofteng.com/doc/cdcom.htm#Axis.getThickness.htm
For a horizontal x-axis, the thickness is the vertical height of the axis. For the width of the axis, we usually will just assume it to be equal to the plot area width, perhaps add some estimated margins for the labels that may go beyond the left and right sides of the plot area. With these information, it should be easy to obtain the approximate bounding box of an axis.
Hope this can help.
Regards
Peter Kwan |