The CreatorCon Call for Content is officially open! Get started here.

How to create a Hyperlink on the reports generated through high charts?

amarjeet
Kilo Contributor

I have created a report using the high chart API . i want to create a hyper link to the reports generated.

As we can see in out of box functionalities in service-now in reporting ,the same functionality is needed in high chart as well.

tltoulson

1 ACCEPTED SOLUTION

tltoulson
Kilo Sage

Hi Amarjeet,



If I understand correctly, this JS Fiddle shows a great example of providing clickable URL's through the HighChart API and here's the HighChart API Reference.   This gist of it is that you need to use the click event's object in your chart configuration which looks something like the following:



{


...


      plotOptions: {


              series: {


                      point: {


                              click: function () { location.href = 'url here'; }


                      }


              }


      }


...


}


View solution in original post

8 REPLIES 8

Hello Amarjeet,



Above the chart, there's a set of configurable options... find the one called "Values" and select "Value"



Screenshot 2017-09-19 18.33.51.png



Then the counts will appear on the bars, like in your screenshot.


amarjeet
Kilo Contributor

Hi Yedwab,



It worked . thanks.



One more thing , i need to ask . can we achieve graph including type Line and bar.



please let me know if we can achieve like this.



find_real_file.png













thanks.


Using a line and a bar for the same data (rather than overlaying two different sets of data) isn't as common, but we can do it.



Here's the steps:



1) Create a new report of the type 'Chart', and select Timeline.


2) For this report, group it by month (and filter as desired), but don't group it by Tower yet.


3) Click on the word 'Count' in the Value fields, click the pencil icon, and relabel it to be 'Total Incidents'.


Right now, you should have a report that looks like this:


Screenshot 2017-09-20 09.46.56.png


4) Go to File > Make a Copy.


5) In the new report, add the Secondary Category for Tower


6) Click on the word 'Total Incidents' in the Value fields, click the pencil icon, and relabel it to 'Breakdown'.


Your report should look like this (my data doesn't have a 'tower' field so I'm using 'category'):


Screenshot 2017-09-20 09.49.13.png


7) Go to File > New mashup view


😎 Select the two reports you just made in the Input View names:




9) In the resulting chart, look at the top of the report and select Type: Combo and Y-Axes: Merged:


Screenshot 2017-09-20 09.50.58.png



You will now have a Bar and Line chart for your data.


amarjeet
Kilo Contributor

Hi Yedwab,



I have achieved the required report as directed by you.



find_real_file.png


But can we achieve the values as shown in the above discussion.



thanks .