You can use any field or function in your report as a parameter for a WebI:Chart Macro.
NUMERIC PARAMETERS
- Include the field(s) or function(s) that you want to use as input parameters to WebI:Chart macros in your data set.
- Make a note of the zero-based position of these fields in the data set.
- In your macro, use the letter "P" followed by the number that represents the zero-based position in the data set (e.g., @Y P5).
IMPORTANT NOTES:
- Do not reference an item in the data set that is part of the data being graphed. This would cause the selected data series to disappear.
- You cannot use the same "P" parameter twice (e.g., @USER_FILL 0 1 P5 P5 is not valid).
- The letter "P" is case sensitive (i.e., @Y P5 - not @Y p5).
- Only NUMERIC parameters (Integer, Boolean, Real) can be mapped.
EXAMPLE:
This example data set includes five series columns and a column of macro parameter values:
Series/Groups
Series1
Series2
Series3
Series4
Series5
Parameter Values
Group1
10
50
90
130
170
10
Group2
20
60
100
140
180
20
Group3
30
70
110
150
190
30
Group4
40
80
120
160
200
40
When a chart is created using this data set, the values from the "Macro Parameters" column are included in the chart. EXAMPLE:
When a macro references this column (e.g. @CY P5 255 0 0), the series is removed from the chart and the value is used as an input parameter to the macro:
@CY P5 255 0 0
In this example, "P5" identifies the location to draw a red (255 0 0) line on the Y-Axis and the Macro Parameter values are removed from the chart.
STRING PARAMETERS
Series/Legend labels that contain string~ prefixes can be extracted and used in WebI:Chart macros that use numeric parameters. Each legend label must be formatted with one or more prefix strings terminated with a tilde (~):
Prefix0~Prefix1~Prefix2 ... Prefixn~ SeriesLabel
- Prefix strings must be numeric characters (0...9).
- Use the letter "S" and the zero-based position of the prefix string (e.g., S0, S1, S2, etc.) as an input parameter to any macro that requires a numeric (integer or real) value.
- When an Sn parameter is used as an input parameter to a WebI:Chart macro, the prefix is stripped from the legend label and will not be shown in the legend area.
IMPORTANT NOTES:
- Sn parameters cannot be used as input parameters to macros that require a string parameter (e.g., @YSZ 1000 0 0 S0 will draw a line with the label "S0" and not the value of the prefix at position S0).
- The letter "S" is case sensitive (i.e., @Y S5 - not @Y s5).
EXAMPLE:
This example data set includes five series columns and each series/legend label includes three numeric prefixes:
Groups
10~20~30~Series1
20~30~40~Series2
30~40~50~Series3
40~50~60~Series4
50~60~70~Series5
Group1
10
50
90
130
170
Group2
20
60
100
140
180
Group3
30
70
110
150
190
Group4
40
80
120
160
200
When a chart is created using this data set, the series label prefixes are initially included in the chart. EXAMPLE:
When a macro references a series label prefix (e.g. @CY S0 255 0 0), the series is removed from the chart and the value is used as an input parameter to the macro:
@CY S0 255 0 0
@CY S1 0 255 0
@CY S2 0 0 255
In this example:
"S0" identifies the location to draw a red (255 0 0) line on the Y-Axis.
"S1" identifies the location to draw a green (0 255 0) line on the Y-Axis.
"S2" identifies the location to draw a blue (0 0 255) line on the Y-Axis.
After the prefix is referenced in a macro, the string prefixes are stripped from the legend labels.
WebI:Chart is a product from |