Grouped Bar
Last updated
Last updated
The Grouped Bar Chart allows you to view two layers of data with the 'Stacked by' value appearing as individual bars.
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
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.
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.
A Javascript Object:
A screenshot of the data in ServiceNow: