ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  image maps Labels and Values TextBox
Posted by Dan on Feb-02-2017 23:24
I'm trying this:


  Dim vLabelBox as CDTextBoxMBS
  vLabelBox=c.xAxis.setLabels(  )

  vCoord= vLabelBox.getImageCoor


But I get noting in return from the getImageCoor


The same If I do

  vX= vLabelBox.getLeftX


Is it possible to get the coordinates to the box containing the labels?

  Re: image maps Labels and Values TextBox
Posted by Peter Kwan on Feb-03-2017 02:58
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

  Re: image maps Labels and Values TextBox
Posted by Dan on Feb-03-2017 05:43
Thanks for the suggestions.

Makes sense.


Dan