Donut Matrix
The primary grouping of the donut matrix determines how many charts. The secondary grouping determines how the donuts are sliced.
Required Fields
table - the table to query.
conditions - the conditions to apply to the chart
group_by - the primary grouping
second_group_by - the secondary grouping
record_limit - the maximum number of primary groupings to query
Optional Fields
aggregate_type - the type of aggregate to use. If none is provided 'COUNT' will be used.
aggregate_field - if an aggregate other than 'COUNT is used, an aggregate field must be provided to determine what to aggregate on.
Return Data
An array of objects. Each object is of the following format.
groupTotal: the total value of the primary group
groupField: the value of the primary group
group: the display value for the primary group
query: the query for the primary group
stacks: an array containing the display value of all secondary groupings in the following format:
stack: the display value of the secondary grouping
value: the value of the secondary grouping
keys: an array of all the display values of all secondary groupings.
a list of each key and the value for each secondary group within the primary group.
Example Payload
A Javascript Object:
A screenshot of the data in ServiceNow:
Last updated