Custom Chart Scripts

VAIGAI_KOTHANDA
Giga Contributor

Hi ,

We have a requirement to create a   custom chart to display a bar graph of the number of created, resolved, and open.   Open is defined as not in 'resolved' or 'closed' incident state.   These bar graphs are grouped by location.   The date used is current date.   Use a filter on the assignment group to capture only those incidents that are assigned to an assignment group.

The chart will display a Graph that has three bars that represent number created, resolved, and open for each location for that day (the date the report is being generated)

can you please guide on this requirement.

Regards,

Vaigai K

1 ACCEPTED SOLUTION

Hi Travis,



Appreciate your info here.



But our requirement is something as below:-



Custom Chart Scripts


Custom Chart Script:



Both the above link here will explain you the requirement.



We are not aware with the scripting of Custom Charts, so if you can guide us with that then it would be great!! Travis Toulson



Thanks,


Shahid


View solution in original post

20 REPLIES 20

Harish KM
Kilo Patron
Kilo Patron

Hi check this Custom Chart Definitions - ServiceNow Wiki


Regards
Harish

Hi Harish,



We are trying the same thing but its not returning the right data in the reports.



showing some wrong values.




Regards,


Vaigai K


shahid1
Kilo Expert

Hi Travis,



I saw some post of yours regarding Custom Reports Create report by vendor, by priority, by month and it seemed that you can guide Vaigai here (As we are very new to this functionality of SNOW).



It would be great if you can do so here.



If you need more details here regarding the requirement then please let us know.



Travis Toulson



Thanks in Advance.


Shahid


Hi Shahid,



Thank you for reaching out.   A lot here depends on which version of ServiceNow you are running and what sacrifices you are willing to make.   I'm going to break this out by requirement:



Grouped Bar Graphs


By far, the best scenario is if you are on Fuji.   Fuji allows grouped columns whereas all prior versions will only allow stacked columns.   If you are not on Fuji and you want the Grouped Column approach, then your options are either HighCharts (Reporting v2 Plugin) or Custom Reports (last ditch effort option).   Here is the difference between the Grouped vs Stacked:



Grouped Columns (Fuji Only)


Screen Shot 2015-04-30 at 10.08.50 AM.png



Stacked Columns


Screen Shot 2015-04-30 at 10.11.26 AM.png



Group by Open/Resolved/Closed



It seems that all your information for this is contained in the State field but that there are special groupings.   Try using the Report Ranges module (Report Ranges - ServiceNow Wiki).   Failing this, I would create a separate field with the reporting options you desire and tie it to State with a business rule.   Bottom line, avoid having to use a script to make a custom report.   Storage space is cheap, far cheaper than maintaining customizations.



Group By Location



At this point, you have everything else set up.   Now you just have to tie it all together using a standard report like so:


Screen Shot 2015-04-30 at 10.22.25 AM.png


Your report fields may look slightly different if you are not on Fuji.



The real issue comes into play if you are not on Fuji and you want the Grouped Columns approach.   Then a more custom report is just about the only option you have.   I highly recommend pursuing the above first, especially since Fuji offers the grouped approach.   If you feel you absolutely need custom to meet the requirements, let me know and let me know what version you are running and I can offer some guidance on that.



I hope this has helped.



Kind regards,



Travis