SummaryTableWriter - SummaryTableWriter(String tableName, String columnName)

Produces a summary set for the COUNT of all incidents grouped by category.

The custom chart definition table contains a field named Table that is hidden by default. If the field is set, which it is in some of the base custom charts, then, no matter what is defined within the custom chart scripts, clicking on the chart points you to this table.

For example, if you create a custom chart against the [task] table through a script, but you copied the custom chart from a custom chart that contains Table = incident, then clicking on any bar in the custom script will go to incident.do rather than to task.do.

To check the value of the Table field, click the additional actions icon and select Configure > Form Layout and move the Table field from Available to Selected. Open the custom chart definition and set the Table field to none.

Table 1. Parameters
Name Type Description
tableName String

Table used in the query to generate the data.

columnName String Field that is used to determine the X axis values.
var summarySet = new SummaryTableWriter('incident', 'category');
summarySet.generate();