Graphical results
Besides standard IDEA tables and Pivot tables a third result type can be created: graphical results. During the macro execution, a command, which describes the graphical result, will be called. Similar to a Pivot table result a graphical result is a sub result of its source table. Currently only one source table is allowed.
Graphical results will be displayed in the Results & Reporting grid.
Constants
Const CHART_TYPE_COLUMN = 0
Const CHART_TYPE_BAR = 1
Const CHART_TYPE_LINE = 2
Const CHART_TYPE_PIE = 3
Const CHART_TYPE_SCATTER = 4
Const CHART_TYPE_TREEMAP = 5
Const STATISTIC_OPERATION_SUM = 0
Const STATISTIC_OPERATION_AVERAGE = 1
Const STATISTIC_OPERATION_COUNT = 2
Properties
| Property | Type | Description | Example |
|---|---|---|---|
|
ChartType |
integer |
Returns the type of the chart (see CHART_TYPE_* constants for possible values). The property is read-only. It can only be set when the object is created (using AddGraphicalResult). |
|
|
Database |
|
Returns the path of the IDEA database that will be used to generate the chart. The path is relative to the current project and does not contain the file extension. The property is read-only. It will always contain the same path defined for the parent result object. |
|
|
WindowTitle |
string |
Sets or gets the caption of the start window. The maximum allowed numbers of characters are 128 (after trimming). The value can not be set to an empty string. |
oResultChart.WindowTitle = "Sample chart" |
|
WindowWidth |
integer |
Sets or gets the width (in pixel) of the chart window. The value must be set to a positive integer. 0 (zero) is the default value and it means that the window will get the same width as the active screen. |
oResultChart.WindowWidth = 800 |
|
WindowHeight |
integer |
Sets or gets the height (in pixel) of the chart window. The value must be set to a positive integer. 0 (zero) is the default value and it means that the window will get the same width as the active screen. |
oResultChart.WindowHeight = 600 |
|
ChartTitle |
string |
Sets or gets the chart title. The maximum allowed numbers of characters are 128 (after trimming). The default value is an empty string (no chart title will be displayed). |
oResultChart.ChartTitle = "This is a chart title" |
|
ShowLegend |
boolean |
Sets or gets the visibility of the legend in the chart. |
oResultChart.ShowLegend = true |
|
XAxisTitle |
string |
Sets or gets the title of the x-axis. The maximum allowed number of characters is 128 (after trimming). The default value is an empty string (no label will be displayed). Pie and Treemap charts do not have axes, therefore setting this property for these types of charts will raise an error. |
oResultChart.XAxisTitle = "x axis title" |
|
YAxisTitle |
string |
Sets or gets the title of the y-axis. The maximum allowed number of characters is 128 (after trimming). The default value is an empty string (no label will be displayed). Pie and Treemap charts do not have axes, therefore setting this property for these types of charts will raise an error. |
oResultChart.YAxisTitle = "y axis title" |
|
Field |
string |
Sets or gets the name of the IDEA field that will be represented on the x-axis (or in case of Pie and Treemap charts the name of the field that will be used as the main series of the chart). The maximum allowed numbers of characters is 40 (after trimming). The value cannot be set to an empty string. The value must be set to a valid field name of the IDEA database. |
oResultChart.Field = "AMOUNT" |
|
IsStratified |
boolean |
Sets or gets the information if a stratification operation is performed over the field defined in the "Field" property. The default value is false. This property has no meaning for charts of the types Pie, Scatter and Treemap, so setting it will raise an error. |
oResultChart.IsStratified = true |
|
ExcludeErrors |
boolean |
Sets or gets the information whether or not empty, zero and error values will be excluded from the chart. The default value is false. |
oResultChart.ExcludeErrors = true |
|
StatisticOperation |
integer |
Sets or gets the type of statistic operation to use (see STATISTIC_OPERATION_*). The default value is SUM(0). Scatter charts only allow SUM as possible value, setting a different value will raise an error. |
oResultChart.StatisticOperation = STATISTIC_OPERATION_AVERAGE |
|
SecondaryStatisticOperation |
integer |
Sets or gets the type of statistic operation to use for secondary operation (see STATISTIC_OPERATION_*). The default value is SUM(0). Only the Treemap chart supports this property, setting a different type of charts will raise an error. |
oResultChart.SecondaryStatisticOperation = STATISTIC_OPERATION_AVERAGE |