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

Message ListMessage List     Post MessagePost Message

  How to make a bar with data value = 0 still clickable?
Posted by Lilian on Oct-24-2012 04:37
Hi,

I have built a data driven clickable bar chart in the application. It works all right and users like it. But a bar won't be clickable if its data value = 0 by default. It makes sense to me since there is no height for a bar in this case. However, my users requested to make the bar still linkable to a document even when the bar height is 0.

Are there any good way to make it happen? Is it possible? Appreciate your help in advance.

Lilian

  Re: How to make a bar with data value = 0 still clickable?
Posted by Peter Kwan on Oct-25-2012 01:38
Hi Lilian,

There are several methods:

(a) You may make the x-axis labels clickable (if your chart has x-axis labels). For example:

string imageMap = c.getHTMLImageMap(.....) + c.xAxis().getHTMLImageMap(....);

(b) You may add a transparent scatter layer using the same data as the bar layer. In this way, even if the bar is not clickable, the scatter symbol (which is transparent and therefore invisible) is clickable, so you can have something clickable at 0 if the bar is 0.

c.addScatterLayer(null, myData, "", Chart.SquareSymbol, 30, Chart.Transparent, Chart.Transparent);

Hope this can help.

Regards
Peter Kwan