Difference between revisions of "FixedCrossTable class"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">
+
{{CGscriptClass_Template |Name=FixedCrossTable |Description=A resource journal entry |Constructors= {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=FixedCrossTableRowSeries|Name=rowSeries|Description=Data for the table.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.}} |Description=Create new 1x0 FixedCrossTable.}} {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=secondaryRowAxis|Description=Axis from Axis_xxx function for the secondary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=rowSeries|Description=Data for the table.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.}} |Description=Create new 2x0 FixedCrossTable.}} {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=colTitle|Description=Title of column.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryColAxis|Description=Axis from Axis_xxx function for the primary column axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=rowSeries|Description=Data for the table.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.}} |Description=Create new 1x1 FixedCrossTable.}} {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=colTitle|Description=Title of column.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryColAxis|Description=Axis from Axis_xxx function for the primary column axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=secondaryColAxis|Description=Axis from Axis_xxx function for the secondary column axis.|Comma=,}}{{CGscriptParameters_Template|Type=FixedCrossTableRowSeries|Name=rowSeries|Description=Data for the table.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.}} |Description=Create new 1x2 FixedCrossTable.}} {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=secondaryRowAxis|Description=Axis from Axis_xxx function for the secondary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=colTitle|Description=Title of column.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryColAxis|Description=Axis from Axis_xxx function for the primary column axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=rowSeries|Description=Data for the table.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.}} |Description=Create new 2x1 FixedCrossTable.}} {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=secondaryRowAxis|Description=Axis from Axis_xxx function for the secondary row axis.|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=colTitle|Description=Title of column.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=primaryColAxis|Description=Axis from Axis_xxx function for the primary column axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=secondaryColAxis|Description=Axis from Axis_xxx function for the secondary column axis.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=rowSeries|Description=Data for the table.|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.}} |Description=Create new 2x2 FixedCrossTable.}} |Methods= {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} |Properties= {{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}} {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}} }} === Examples For Table 1x0 === Unknown Object</source></source>
=== This page contains the following errors: ===
 
<div style="font-family:monospace;font-size:12px">error on line 1 at column 9751: Opening and ending tag mismatch: source line 0 and p </div>
 
=== Below is a rendering of the page up to the first error. ===
 
</parsererror>
 
&#x7B;&#x7B;CGscriptClass_Template |Name=FixedCrossTable |Description=A resource journal entry |Constructors= &#x7B;&#x7B;CGscriptConstructors_Template|Parameters= &#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=FixedCrossTableRowSeries|Name=rowSeries|Description=Data for the table.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.&#x7D;&#x7D; |Description=Create new 1x0 FixedCrossTable.&#x7D;&#x7D; &#x7B;&#x7B;CGscriptConstructors_Template|Parameters= &#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=secondaryRowAxis|Description=Axis from Axis_xxx function for the secondary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=rowSeries|Description=Data for the table.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.&#x7D;&#x7D; |Description=Create new 2x0 FixedCrossTable.&#x7D;&#x7D; &#x7B;&#x7B;CGscriptConstructors_Template|Parameters= &#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=colTitle|Description=Title of column.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryColAxis|Description=Axis from Axis_xxx function for the primary column axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=rowSeries|Description=Data for the table.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.&#x7D;&#x7D; |Description=Create new 1x1 FixedCrossTable.&#x7D;&#x7D; &#x7B;&#x7B;CGscriptConstructors_Template|Parameters= &#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=colTitle|Description=Title of column.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryColAxis|Description=Axis from Axis_xxx function for the primary column axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=secondaryColAxis|Description=Axis from Axis_xxx function for the secondary column axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=FixedCrossTableRowSeries|Name=rowSeries|Description=Data for the table.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.&#x7D;&#x7D; |Description=Create new 1x2 FixedCrossTable.&#x7D;&#x7D; &#x7B;&#x7B;CGscriptConstructors_Template|Parameters= &#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=secondaryRowAxis|Description=Axis from Axis_xxx function for the secondary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=colTitle|Description=Title of column.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryColAxis|Description=Axis from Axis_xxx function for the primary column axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=rowSeries|Description=Data for the table.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.&#x7D;&#x7D; |Description=Create new 2x1 FixedCrossTable.&#x7D;&#x7D; &#x7B;&#x7B;CGscriptConstructors_Template|Parameters= &#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=rowTitle|Description=Title of row.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryRowAxis|Description=Axis from Axis_xxx function for the primary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=secondaryRowAxis|Description=Axis from Axis_xxx function for the secondary row axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=string|Name=colTitle|Description=Title of column.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=primaryColAxis|Description=Axis from Axis_xxx function for the primary column axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=secondaryColAxis|Description=Axis from Axis_xxx function for the secondary column axis.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=rowSeries|Description=Data for the table.|Comma=,&#x7D;&#x7D;&#x7B;&#x7B;CGscriptParameters_Template|Type=array|Name=statisticsValues|Description=Array of StatisticsItems.&#x7D;&#x7D; |Description=Create new 2x2 FixedCrossTable.&#x7D;&#x7D; |Methods= &#x7B;&#x7B;CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.&#x7D;&#x7D; |Properties= &#x7B;&#x7B;CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.&#x7D;&#x7D; &#x7B;&#x7B;CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.&#x7D;&#x7D; &#x7D;&#x7D; === Examples For Table 1x0 === <source lang="javascript">DCS_use(12344983); // Get Axis: array axisNew = Axis_new("LuuTest"); axisNew[AXIS_TEXT] = "Choose a D_Week"; // Init: FixedCrossTableRowSeries rowseries = new FixedCrossTableRowSeries(); FixedCrossTableDataSeries dataserie= new FixedCrossTableDataSeries(); FixedCrossTableDataItem dataItemAbs= new FixedCrossTableDataItem(); FixedCrossTableDataItem dataItemPct= new FixedCrossTableDataItem(); // Set up a table // table 1x0 Axis_addOption(axisNew, AxisOption_new("Week 1", "")); Axis_addOption(axisNew, AxisOption_new("Week 2", "")); dataItemAbs.Value = 1; dataItemPct.Value = 50; dataserie.Add(dataItemAbs,dataItemPct); dataserie.Add(dataItemAbs,dataItemPct); dataserie.AbsoluteTotal.Value = 2; dataserie.PercentageTotal.Value = 100; rowseries.Add(dataserie); FixedCrossTable table1x0 = new FixedCrossTable("Create by createFixedCrossDiagram - D_Week", axisNew , rowseries, empty); // genarate table: createFixedCrossDiagram(table1x0); Result: <br/>&#x5B;&#x5B;File:Tabu Table1x0.png&#x5D;&#x5D; === Examples For Table 1x1 === <source lang="javascript">DCS_use(15517112); // Get Axis: array axisPrimary = Axis_new("LuuTest1"); axisPrimary[AXIS_TEXT] = "Choose a D_Week"; array axisSecond = Axis_new("LuuTest2"); axisSecond[AXIS_TEXT] = "Choose a Region"; Axis_addOption(axisPrimary, AxisOption_new("Year 2014", "")); Axis_addOption(axisPrimary, AxisOption_new("Other Year", "")); Axis_addOption(axisSecond, AxisOption_new("Male", "")); Axis_addOption(axisSecond, AxisOption_new("Female", "")); // Init: array arrRowseries ={}; number countTotal = count() where true; number count; FixedCrossTableRowSeries rowseries; FixedCrossTableDataItem dataItemAbs; FixedCrossTableDataItem dataItemPct; FixedCrossTableDataSeries dataserie; dataserie = new FixedCrossTableDataSeries(); count = count() where D_Week == [201401-201453] && Gender == [1]; dataItemAbs = new FixedCrossTableDataItem(); dataItemAbs.Value = count; dataItemPct = new FixedCrossTableDataItem(); dataItemPct.Value = count*100/countTotal; dataserie.Add(dataItemAbs,dataItemPct); count = count() where D_Week == [201401-201453] && Gender == [2]; dataItemAbs = new FixedCrossTableDataItem(); dataItemAbs.Value = count; dataItemPct = new FixedCrossTableDataItem(); dataItemPct.Value = count*100/countTotal; dataserie.Add(dataItemAbs,dataItemPct); count = count() where D_Week == [201401-201453]; dataserie.AbsoluteTotal.Value = count; dataserie.PercentageTotal.Value = count/count * 100; rowseries.Add(dataserie); arrRowseries = {rowseries,rowseries,rowseries}; // Set up a table // table 1x1 FixedCrossTable table1x1 = new FixedCrossTable("Create by createFixedCrossDiagram ", axisPrimary,"Col title", axisSecond, arrRowseries, empty); // genarate table: createFixedCrossDiagram(table1x1); Result: <br/>&#x5B;&#x5B;File:Tabu Table1x1.png&#x5D;&#x5D; === Examples For Table 2x1 === <source lang="javascript">DCS_use(15517112); // Get Axis: array axisRowPrimary = Axis_new("LuuTest1"); axisRowPrimary[AXIS_TEXT] = "Gender test"; Axis_addOption(axisRowPrimary, AxisOption_new("Mand", "")); Axis_addOption(axisRowPrimary, AxisOption_new("Kvinde", "")); array axisRowSecond = Axis_new("LuuTest2"); axisRowSecond[AXIS_TEXT] = "Region test"; Axis_addOption(axisRowSecond, AxisOption_new("Region Hovedstaden", "")); Axis_addOption(axisRowSecond, AxisOption_new("Other Region", "")); array axisColPrimary = Axis_new("LuuTest3"); axisColPrimary[AXIS_TEXT] = "Week test"; Axis_addOption(axisColPrimary, AxisOption_new("Year 2014", "")); Axis_addOption(axisColPrimary, AxisOption_new("Year Other", "")); array arrRowseries ={}; number count; FixedCrossTableRowSeries rowseries; FixedCrossTableDataItem dataItemAbs; FixedCrossTableDataSeries dataserie; dataserie = new FixedCrossTableDataSeries(); dataItemAbs = new FixedCrossTableDataItem(); dataItemAbs.Value = 1; dataserie.Add(dataItemAbs,dataItemAbs); dataserie.Add(dataItemAbs,dataItemAbs); dataserie.AbsoluteTotal.Value = 1; dataserie.PercentageTotal.Value = 1; rowseries.Add(dataserie); rowseries.Add(dataserie); arrRowseries = {rowseries,rowseries,rowseries}; FixedCrossTable table2x1 = new FixedCrossTable("Create by createFixedCrossDiagram ", axisRowPrimary, axisRowSecond,"Column title", axisColPrimary, arrRowseries, empty); // genarate table: createFixedCrossDiagram(table2x1); createCrossDiagram({"Gender","Region"},{"D_Week"}); Result: <br/>&#x5B;&#x5B;File:Tabu Table1x1.png&#x5D;&#x5D;<br/><br/></source></source></source>
 

Revision as of 07:43, 7 December 2015

FixedCrossTable



A resource journal entry

Constructors

  • (string rowTitle "Title of row.", array primaryRowAxis "Axis from Axis_xxx function for the primary row axis.", FixedCrossTableRowSeries rowSeries "Data for the table.", array statisticsValues "Array of StatisticsItems.") - Create new 1x0 FixedCrossTable.
  • (string rowTitle "Title of row.", array primaryRowAxis "Axis from Axis_xxx function for the primary row axis.", array secondaryRowAxis "Axis from Axis_xxx function for the secondary row axis.", array rowSeries "Data for the table.", array statisticsValues "Array of StatisticsItems.") - Create new 2x0 FixedCrossTable.
  • (string rowTitle "Title of row.", array primaryRowAxis "Axis from Axis_xxx function for the primary row axis.", string colTitle "Title of column.", array primaryColAxis "Axis from Axis_xxx function for the primary column axis.", array rowSeries "Data for the table.", array statisticsValues "Array of StatisticsItems.") - Create new 1x1 FixedCrossTable.
  • (string rowTitle "Title of row.", array primaryRowAxis "Axis from Axis_xxx function for the primary row axis.", string colTitle "Title of column.", array primaryColAxis "Axis from Axis_xxx function for the primary column axis.", array secondaryColAxis "Axis from Axis_xxx function for the secondary column axis.", FixedCrossTableRowSeries rowSeries "Data for the table.", array statisticsValues "Array of StatisticsItems.") - Create new 1x2 FixedCrossTable.
  • (string rowTitle "Title of row.", array primaryRowAxis "Axis from Axis_xxx function for the primary row axis.", array secondaryRowAxis "Axis from Axis_xxx function for the secondary row axis.", string colTitle "Title of column.", array primaryColAxis "Axis from Axis_xxx function for the primary column axis.", array rowSeries "Data for the table.", array statisticsValues "Array of StatisticsItems.") - Create new 2x1 FixedCrossTable.
  • (string rowTitle "Title of row.", array primaryRowAxis "Axis from Axis_xxx function for the primary row axis.", array secondaryRowAxis "Axis from Axis_xxx function for the secondary row axis.", string colTitle "Title of column.", array primaryColAxis "Axis from Axis_xxx function for the primary column axis.", array secondaryColAxis "Axis from Axis_xxx function for the secondary column axis.", array rowSeries "Data for the table.", array statisticsValues "Array of StatisticsItems.") - Create new 2x2 FixedCrossTable.

Methods

  • string ToString() - The string representation of the object.

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.
=== Examples For Table 1x0 === Unknown Object</source></source>