End-of-Life (EoL)

JSON File Widget Example

reports dashboard Example of creating a widget using a JSON file and importing into the Widgets Library.
In the following example, create a JSON file to display Incidents severity by type, which contains the following:
  • Bar chart
  • Incidents from the last 30 days
  • Grouped by severity and for each severity display the nested group size (count of incidents displayed by the length of the bar) colored according to type.
Create the following JSON file:
{ "name": "Incident Severity by Type", "dataType": "incidents", "widgetType": "bar", "query": "-category:job and -status:archived and -status:closed", "dateRange": { "period": { "byFrom": "days", "fromValue": 30 } }, "params": { "groupBy": [ "severity", "type" ] } }
You can see the following parameters:
  • The Widget is called
    Incident Severity by type
  • The data type is
  • The widget type is
  • The
    specifies that you do not want to return incidents that are categorized as job nor incidents that are archived and closed.
  • For the date range, the
    sets the widget to display the last 30 units of time. The
    sets the units of time to days, which results in the last 30 days.
  • The
    parameter is set with a
    value marking the first group by severity name and then by type (making the bar chart stacked).
After you import the widget into the
Widget Library
the following widget appears:
You can see the incidents are grouped by severity and the number of incidents are displayed by the length of the bar, which are colored according to type.

Recommended For You