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

Message ListMessage List     Post MessagePost Message

  Extra variable for use in clickable links
Posted by Dan on Oct-22-2013 23:22
I'm building a scatterchart with HTML image map clickable links. Each spot refers to an
entity in a database, each of which has a detail page I'd like to link to from the clickable
area.

To do that, I need to feed the database record ID number that each graphed scatterchart
point belongs to, so that it can be embedded in the URL in the image map.

Is this possible?

  Re: Extra variable for use in clickable links
Posted by Peter Kwan on Oct-23-2013 23:54
Hi Dan,

You may add an extra field to the scatter layer using Layer.addExtraField. For example:

layer.addExtraField(anArrayOfRecordIDs)

In the above, the anArrayOfRecordIDs is an array of record IDs, which each element contains the record ID of the corresponding symbol.

Then in the image map, you may use:

imageMap = c.getHTMLImageMap("myHandler.cgi", "recordId={field0}", "title='xxx'")

Then in the URL, there will be a recordId query parameter, of which the value is the record ID of that point.

Hope this can help.

Regards
Peter Kwan

  Re: Extra variable for use in clickable links
Posted by Dan on Oct-24-2013 01:21
That's great, I'll check that out.

The routes in my web app are RESTful--in other words, I don't use query string
parameters, I use PATH_INFO to express the entity ID.

Is there a way to construct a url like /controller/action/ID ?

  Re: Extra variable for use in clickable links
Posted by Peter Kwan on Oct-24-2013 03:23
Hi Dan,

Yes. Just set the URL parameter as "/controller/action/{field0}".

Hope this can help.

Regards
Peter Kwan