Difference between revisions of "Cross Diagram Generator Expression Table Request"

From Catglobe Wiki
Jump to: navigation, search
(New page: = Cross Diagram Generator Expression Table Request = <br>The Cross Diagram Generator Object (CDG) receives a number of parameters from external requesters and returns an expression table....)
 
Line 1: Line 1:
= Cross Diagram Generator Expression Table Request =
+
== Cross Diagram Generator Expression Table Request ==
  
<br>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.<br>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).<br>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.
+
<br>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.<br>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).<br>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.  
  
[[Image:Hinh_4.jpg]]
+
[[Image:Hinh 4.jpg]]  
  
''Illustration 3: Using the Cross Diagram Generator''
+
''Illustration 3: Using the Cross Diagram Generator''  
  
=== ''<br>Custom Axis'' ===
+
=== ''<br>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.<br>Let us look at the information in an axis object to see what information they contain.
+
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.<br>Let us look at the information in an axis object to see what information they contain.  
<pre>
+
<pre>&lt;axis name="Q4" weight="False" is-default="True"&gt;
&lt;axis name="Q4" weight="False" is-default="True"&gt;
 
 
&lt;axis-text&gt;&lt;![CDATA[What is your gender?]]&gt;&lt;/axis-text&gt;
 
&lt;axis-text&gt;&lt;![CDATA[What is your gender?]]&gt;&lt;/axis-text&gt;
 
&lt;pct-base&gt;&lt;![CDATA[Q4!=empty]]&gt;&lt;/pct-base&gt;
 
&lt;pct-base&gt;&lt;![CDATA[Q4!=empty]]&gt;&lt;/pct-base&gt;
Line 25: Line 24:
 
&lt;/option&gt;
 
&lt;/option&gt;
 
&lt;/axis&gt;</pre>
 
&lt;/axis&gt;</pre>
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.
+
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.  
  
=== <br>''CDG parameters'' ===
+
=== <br>''CDG parameters'' ===
  
The parameters that exist for requesting an expression table. These are:
+
The parameters that exist for requesting an expression table. These are:  
  
{| cellspacing="1" cellpadding="1" width="200" border="1"
+
{| style="width: 529px; height: 649px" cellspacing="1" cellpadding="1" width="529" border="1"
 
|-
 
|-
! scope="col" | Parameter
+
! scope="col" | Parameter  
! scope="col" | Type
+
! scope="col" | Type  
 
! scope="col" | Value
 
! scope="col" | 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; <br>2=Absolute; <br>3=Both
 
|-
 
|-
|  
+
| Direction
|  
+
| Enumeration
|  
+
| 1=Vertical;<br>2=Horizontal
 
|-
 
|-
|  
+
| Filters
|  
+
| String
|  
+
| Expression1<sup>2</sup>
 
|-
 
|-
|  
+
| 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
 
|-
 
|-
|  
+
| <span style="color: #ff0000">RemoveEmptyRows</span>
|  
+
| <span style="color: #ff0000">Boolean</span>
|  
+
| <span style="color: #ff0000">True/False (only works with Tables)</span>
 
|-
 
|-
|  
+
| <span style="color: #ff0000">[In-line style sheet requests]</span>
|  
+
| <span style="color: #ff0000">*</span>
|  
+
| <span style="color: #ff0000">Please read VN1707REP (not yet done)</span>
 
|}
 
|}
  
<br><br>Row(s)<br>List<br>Names of axis/axes (Order matters)<br>Column(s)<br>List<br>Names of axis/axes (Order matters)<br>IncludeTotal<br>Boolean<br>True/False<br>ShowType<br>Enumeration<br>1=Percentage; <br>2=Absolute; <br>3=Both<br>Direction<br>Enumeration<br>1=Vertical;<br>2=Horizontal<br>Filters<br>String<br>Expression1<br>Median<br>Boolean<br>True/False<br>Average<br>Boolean<br>True/False<br>Variance<br>Boolean<br>True/False<br>StdDev<br>Boolean<br>True/False<br>Quantile/Percentile List<br>String<br>Number array e.g. “10,25,90”<br>Significance<br>Boolean<br>True/False<br>StdError<br>Boolean<br>True/False<br>AbsText<br>String<br>Not required / Text alternative<br>PctText<br>String<br>Not required / Text alternative<br>TotalText<br>String<br>Not required / Text alternative<br>MedianText<br>String<br>Not required / Text alternative<br>VarianceText<br>String<br>Not required / Text alternative<br>AverageText<br>String<br>Not required / Text alternative<br>StdDevText<br>String<br>Not required / Text alternative<br>PercentileText (Quantile?)<br>String<br>Not required / Text alternative<br>StdErrorText<br>String<br>Not required / Text alternative<br>UseAxisName<br>Boolean<br>True/False<br>RemoveEmptyRows<br>Boolean<br>True/False (only works with Tables)<br>[In-line style sheet requests]<br>*<br>Please read VN1707REP (not yet done)<br>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. <br>Data cache (axis set)<br>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.<br>Cross Diagram Generator Object<br>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<br>In-line style sheet request<br>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.<br>
+
<br>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. <br>Data cache (axis set)<br>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.<br>Cross Diagram Generator Object<br>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<br>In-line style sheet request<br>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.<br>
 +
 
 +
 
 +
<pre>2 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).</pre>

Revision as of 10:59, 16 April 2009

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.

Hinh 4.jpg

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 Expression12
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.


2 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).