The Custom Chart allows you to display data in the dashboard as a table of values, bar chart or line graph. Custom Charts are not limited to objects. Nodes or global variables may be added to the Custom Chart. Code is then executed to specify what data will appear in the chart. This allows the flexibility of displaying just about anything in the Dashboard.
Associations
Custom charts are tied to associations, rather than restricted to only objects as with other Dashboard Widgets. An association can be a node in the tree, a global variable, an object, global table, label table, etc. Associations can be added to the custom chart any number of times, however, the first association is what will be used to specify the number of series to display (see # Series below).
Displaying Data
There are 5 picklists that allow you to specify how many series and how many categories are displayed in the chart. Think of the series as columns in a table, and the categories as rows in a table. All picklists are fired each time the graph is drawn, or for a time graph, each update time. This allows the number of series and categories to be dynamically changed, ie a global table that has columns or rows added to it. A list of presets is available for displaying current values, tables, etc.
Global Variables: Global Variables that are added to the custom chart to be accessed as an association must be either an integer or double type. When using the # Series, # Categories or Data Point Value picklists with global variables, use getnodenum(current) to get the current value of the global variable. This allows you to tie to multiple global variables and other nodes and display all of their data in the same chart. Any other reference to current will give you the global variable's node, ie /Tools/GlobalVariables/myVariable.
Other global variables may be used directly, however, the special functionality of using getnodenum(current) will only return valid data for integer and double types.
# Series
The number of series is only calculated once for all associations. This picklist is the first to be fired and passes in the first association object/node. The value returned should be an integer.
Access Variables
- current: the first association object/node in the list.
Series Title
This picklist is fired for each series. These titles will display in the charts legend. The value returned should be a string.
Access Variables
- current: the first association object/node in the list.
- seriesnum: the index of the series.
# Categories
The number of categories is calculated for each association in the list. Each category will be a row in the chart, beginning with the first association, in order, down to the last. The value returned should be an integer.
Access Variables
- current: the association object/node.
Category Title
This picklist is fired for each category, for each association. If two or more categories who are sequential (next to each other) have the same title, those categories will become a group. By default, a group's total values are calculated as an average of all of its members. To calculate the total as a sum, the title must have a #sum at the end. ie, "Total#sum". When using groups, the default titles displayed for the group members will be their path in the model. To change this to a custom display, set a Display Name for the association in the Associations tab. The value returned should be a string.
Access Variables
- current: the association object/node.
- categorynum: the index of the category for the association.
Data Point Value
This picklist is fired for each association, for each category, for each series. The value returned should be a number.
Access Variables
- current: the association object/node.
- seriesnum: the index of the series.
- categorynum: the index of the category for the association.