Difference between revisions of "Cross Diagram Generator Expression Table Request"
Line 1: | Line 1: | ||
+ | <accesscontrol>Administrators,,Cem,,Maysunshine</accesscontrol> | ||
+ | [[Category:Guidelines]] | ||
+ | |||
== Cross Diagram Generator Expression Table Request == | == Cross Diagram Generator Expression Table Request == | ||
Revision as of 08:28, 5 October 2011
<accesscontrol>Administrators,,Cem,,Maysunshine</accesscontrol>
Contents
Cross Diagram Generator Expression Table Request
The Cross Diagram Generator Object (CDG) receives a number of parameters from external requesters and returns an expression table. It must always have a data cache in context (basically also as a parameter) from which it will use the data cache's axis set.
The purpose of the CDG is to make it easier to create Expression Tables using just a few parameters, rather than the more intricate methods used by the other expression table creation methods (manual creation for standard diagrams and dynamic diagrams, which have their own custom methods).
It is the hope that we in the near future can start using CDG for dynamic diagrams. The creation of time sets and dashboards was an important prerequisite that hopefully has made us ready for converting soon.
Illustration 3: Using the Cross Diagram Generator
Custom Axis
A custom axis is the same kind of axis object that can be found in an axis set. The reason it is necessary for the CDG to receive such axes is, that the Time Set module can create these axes but will not place them in any Axis Set since they are made “on the spot”. This means that those parameters in the CDG that receive an axis object as input must be able to receive these both as the name of an axis (where they will then themselves find the Axis object in the Axis Set) as well as entire axis objects.
Let us look at the information in an axis object to see what information they contain.
<axis name="Q4" weight="False" is-default="True"> <axis-text><![CDATA[What is your gender?]]></axis-text> <pct-base><![CDATA[Q4!=empty]]></pct-base> <math-base><![CDATA[Q4]]></math-base> <math-base-modifier><![CDATA[Q4]]></math-base-modifier> <option> <name><![CDATA[Yes]]></name> <value><![CDATA[Q4==[1]]]></value> </option> <option> <name><![CDATA[No]]></name> <value><![CDATA[Q4==[2]]]></value> </option> </axis>
You can later read more on how this axis object is used inside the Cross Diagram Generator object. The important thing to notice is that every axis object has a name. It is this name that we can specify in the parameters sent to the CDG for rows and columns specification.
CDG parameters
The parameters that exist for requesting an expression table. These are:
Parameter | Type | Value |
---|---|---|
Row(s) | List | Names of axis/axes (Order matters) |
Column(s) | List | Names of axis/axes (Order matters) |
IncludeTotal | Boolean | True/False |
ShowType | Enumeration | 1=Percentage; 2=Absolute; 3=Both |
Direction | Enumeration | 1=Vertical; 2=Horizontal |
Filters | String | Expression1 |
Median | Boolean | True/False |
Average | Boolean | True/False |
Variance | Boolean | True/False |
StdDev | Boolean | True/False |
Quantile/Percentile List | String | Number array e.g. “10,25,90” |
Significance | Boolean | True/False |
StdError | Boolean | True/False |
AbsText | String | Not required / Text alternative |
PctText | String | Not required / Text alternative |
TotalText | String | Not required / Text alternative |
MedianText | String | Not required / Text alternative |
VarianceText | String | Not required / Text alternative |
AverageText | String | Not required / Text alternative |
StdDevText | String | Not required / Text alternative |
PercentileText (Quantile?) | String | Not required / Text alternative |
StdErrorText | String | Not required / Text alternative |
UseAxisName | Boolean | True/False |
RemoveEmptyRows | Boolean | True/False (only works with Tables) |
[In-line style sheet requests] | * | Please read VN1707REP (not yet done) |
There does (should) of course exist rules in the CDG object that ensures that illegal combinations are not supplied; as for example two numerical axes being crossed.
Data cache (axis set)
It is necessary for the CDG to know the data cache, since each data cache has one axis set related. An axis set has an array of axes objects, where each axes object is identified by a name. These names are the ones that are supplied to the CDG Parameters Row(s) and Column(s) to tell the CDG that it should retrieve these objects for the CDG process.
Cross Diagram Generator Object
The cross diagram object retrieves the information on data cache (axis set), CDG parameters and any custom axes that may exist. It converts any parameters that were names of objects in the axis set to their actual objects, so that it now has all the information it needs to create the Expression Table. It then returns the Finished Expression Table to the requester.2
In-line style sheet request
Newer projects in v5.7 request that the CDG is able to apply in-line styles to the expression sheets that it creates. Most of these settings regard in-line styles for Tables. If the CDG object is extended to be able to support such features it will obviously be logical that it also is made able to set the in-line settings of series being bars or lines for bar-line charts, so that this is not handled as a separate process (which I assume it is now since there is no setting for it in the CDG, and the cross diagram viewer needs to set this when it creates it's expression sheets. Please read the chapters on “Chart request” further down to investigate this subject in more detail.
1. One could argue that the Filters (which are like Expression Filters) should not be supplied to the CDG in the Expression Table Request process, but rather just supplied in the Data Table Request. This could although make things a bit more complex when the CDG is used for creating Standard Diagram objects to be saved in for example a report, since these do not have any place to store Expression Filters (as of now).
2. A number of projects have been made that together have created the CDG object. Know more by reading VN0583REP (main doc), VN0585REP, VN0833REP, VN0956REP, VN1746REP.