| Search Locate Previous Next | Contents |
This function is used to make active graphics work on your web site. It allows you to associate any URL (typically the address of another page on your site) with a data point on the chart. You define the jump with a 3-element vector, giving the row,col index (1-origin) of the data point in the series, and the target URL. For example:
chHref 2 1 'boring.htm' chPie 3 2 1
The second pie slice will show a pointing hand in the web browser and when clicked it will route you to the page boring.htm. To jump to an anchor within the target page add #anchor to the tag as usual. To route the jump to a specific frame, add the frame id to the URL, separated with a semi-colon:
chHref 1 12 'detail.htm;footnote'
This would be a good way to allow the user to click on the datapoints of a timeseries and see a summary of the numeric information for that datapoint in a second frame below the chart.
Setting up multiple jumps
If you have a target page for every datapoint, you can omit the row-col information entirely and simply supply an array of strings, shaped to match your data exactly, as the Hyperlink property of your chart. Again, you would probably add a target frame here, so that the additional data can appear in a separate frame and the original chart remains visible to be clicked again.
Calling a server
If you provide a simple text vector for the URL (no row/column details at all) RainPro assumes you want every datapoint as a hotspot, and it adds the required information automatically.
chHref 'http://127.0.0.1/Barinfo'
A typical line in the generated imagemap or VML attribute will now look like:
href="http://127.0.0.1/Barinfo?row=1&col=1"
Now what you get passed as the argument list to your server script Barinfo is a set of property-value pairs such as:
row 2 col 3
... which makes it very easy to select the right data, format it and return a suitable result.
See also ...
chHint add data hints
Hyperlinks HTML jumps from data points