Difference between revisions of "CreateFixedCrossDiagram"

From Catglobe Wiki
Jump to: navigation, search
 
Line 71: Line 71:
 
Version 6.0 __NOTOC__
 
Version 6.0 __NOTOC__
 
<!-- imported from file: 4223.htm-->
 
<!-- imported from file: 4223.htm-->
 +
[[Category:Diagram/report_generating_CGScript_functions]]

Latest revision as of 06:17, 22 April 2022


createFixedCrossDiagram

Creates a custom cross diagram.

Syntax

createFixedCrossDiagram(FixedCrossTable)

Arguments

FixedCrossTable: An FixedCrossTable expression.

Return type

number

Examples

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 axisColSecond = Axis_new("LuuTest4");
axisColSecond[AXIS_TEXT] = "Age Group test";
Axis_addOption(axisColSecond, AxisOption_new("Year 2014", ""));
Axis_addOption(axisColSecond, 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,rowseries,rowseries,rowseries};

FixedCrossTable table2x2 = new FixedCrossTable("Create by createFixedCrossDiagram ", axisRowPrimary, axisRowSecond,"Column title", axisColPrimary, axisColSecond, arrRowseries, empty);
// genarate table:
createFixedCrossDiagram(table2x2);

Result:
Table2x2.png

Availability

Version 6.0