CasewareDocs

AddStatisticFieldWithColor

Adds an extra field for statistic operation and includes the color used to display the data in the chart.

Compatibility

Available as of IDEA version 10.3

Syntax

AddStatisticFieldWithColor(fieldName As String, colorRed As Integer, colorBlue As Integer, colorGreen As Integer)

Parameters

fieldName

The maximum allowed number of characters is 40 (after trimming). The value cannot be set to an empty string. The value must be set to a valid field of the IDEA database.

coloRed

This parameter must have a value between 0 and 255.

colorBlue

This parameter must have a value between 0 and 255.

colorGreen

This parameter must have a value between 0 and 255.

Example: oResultChart.AddStatisticFieldWithColor oTag.FieldName, 255,0,0

Example

Set oMC = SmartContext.MacroCommands
Set oSC = oMC.SimpleCommands
ChartType = CHART_TYPE_LINE
'chartType can be set to any constant defined in CHART_TYPE_* list
Set oResultFile = oSC.CreateResultObject(sdbname, 1, True, 1)
Set oResultChart = oSC.AddGraphicalResult(oResultFile, ChartType)
If Not oResultChart Is Nothing Then
'set properties
End If

SmartContext.TestResultFiles.Add oResultFile

Please note

Graphical results are not supported for server IDEA databases, so the AddGraphicalResult function will return "Nothing" in this case.