How do I set up chart hyperlinks in HTML5 charts?

Issue Description:

With new Highcahrts lib (often referred to as HTML5 charts) added to JR adding hyperlink to a chart is pretty much the same as to JFreeCharts (regular Charts) and Fusion charts (Charts Pro). You just open chart properties, go to Hyperlink tab and add whatever you want. However you may also notice that there is no way to add hyperlinks to HTML5 chart items (like bar sections or pie slices), at least not the way it is for other chart libs.


Creating this kind of hyperlinks in HTML5 charts is a little more tricky than in Charts or Charts Pro. Here is a summary of the process:

  1. Identify the series you want to use for your link

  2. Create a bucket property for that series (i.e. if you are using a pie chart, the category bucket may have a property called myUrl which contains your url built with the category value). This can be done in Edit Chart Properties->Chart Data->Data Axes->Categories

    Keep in mind that bucket level properties are the only place where you can create expressions to be used with your link. Otherwise you'll have to either use static values or reference a bucket level property

  3. Identify the measure to which you need to add a link (Edit Chart Properties->Chart Data->Data Axes->Measures)

  4. In the advanced properties of your measure click on "Hyperlink". This will create for you a couple of properties, just edit them by assigning the proper value (again, here you'll have to either use static values or reference a bucket level property)

Report execution hyperlinks:

If you want a ReportExecution hyperlink, you'll need to rename one of the measure advanced properties (see item 4. above) to _report and enter the corresponding value, and if you need to pass parameter values you'll need to add them as measure properties too.

Attached is a sample report that has chart item ReportExecution hyperlinks. It runs on the JasperReports Server sample database.

Ref. Case #00031817
See also: HTML5 Charts in iReport