|
Getting the positions of ticks on the plot area |
Posted by Pooja Gupta on Aug-09-2010 14:22 |
|
I am using multi-bar chart and on its X-axis I have 12, 13 or 14 labels depending upon the weeks in the quarter. I have associated an image map with it. The map has been divided into rectangular bars, each alternate one is clickable.
As of now, I have hard-coded the values for aligning the clickable area with the actual ticks on the x-axis. But for different number of values shown on x-axis (12/13/14) I have to compute and hard-code the values for the rectangular regions in the image map.
Is it possible to generalize it so that the code written once can work for any number of values shown on the axis?
Is there some way of obtaining the positions where the ticks are put in the plot area? |
Re: Getting the positions of ticks on the plot area |
Posted by Peter Kwan on Aug-09-2010 22:44 |
|
Hi Pooja,
Suppose the ticks are in the center of the bar group (the default), the position of the tick for the Nth bar group is:
int pos = c.getXCoor(N);
Note that like all code that generates image maps, the above code must be called after the chart is "make" (after makeChart or makeSession, etc).
Hope this can help.
Regards
Peter Kwan |
|