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

Message ListMessage List     Post MessagePost Message

  How to get the correct URL when use getHTMLImageMap method
Posted by Calvin on Mar-15-2011 15:28
Hi, I have encounter a problem when I use getHTMLImageMap method.
I put the UserName to the x-axis as the labels,then I need to get the URL to forward to another page. Using getHTMLImageMap method like this
...
... getHTMLImageMap("URL","UserName={lable}");
...
However, I have to use the userId as the URL's parameter instead of UserName because the UserName would be duplicate. like
...
... getHTMLImageMap("URL","userId={???}");
...
The problem is the XYChart will still shown the UserName. How I get the UserId when forwarding.
The layer I add to XYChart is BarLayer.

Thanks so much.
Calvin

  Re: How to get the correct URL when use getHTMLImageMap method
Posted by Peter Kwan on Mar-16-2011 00:02
Hi Calvin,

You may add your user id as an extra field and use it in the URL. For example:

//layer = the chart layer that contains the clickable objects)
layer.addExtraField(myArrayOfUserId);

... getHTMLImageMap("URL","userId={field0}");

Hope this can help.

Regards
Peter Kwan

  Re: How to get the correct URL when use getHTMLImageMap method
Posted by Calvin on Mar-21-2011 18:44
Attachments:
Hi Peter
    Thank you very much.
    Follow your suggestion,I found it can get the correct URL I need,howerve it's hypelink area is in the plot area,not on the x-axis.

I really a appreciate your help.

Regards,
Calvin
ChartDirector-Problem Description.doc
ChartDirector-Problem Description.doc

29.50 Kb

  Re: How to get the correct URL when use getHTMLImageMap method
Posted by Peter Kwan on Mar-22-2011 00:52
Hi Calvin,

If you would like to click on the x-axis label instead of the bars, you may use Axis.getHTMLImageMap instead of BaseChart.getHTMLImageMap. The extra field in this case needs to be attached to the BaseChart itself. The code is like:

c.addExtraField(myArrayOfUserId);

.... c.xAxis().getHTMLImageMap("URL","userId={field0}");

Hope this can help.

Regards
Peter Kwan

  Re: How to get the correct URL when use getHTMLImageMap method
Posted by Calvin on Mar-28-2011 12:21
  I am sorry to tell so late that I have worked out the problems by your last comments.
  Thank you very much.

Regards,
Calvin