Difference between revisions of "SetTotal"

From Catglobe Wiki
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{HelpFiles}}
+
[[Category:Include_total_functions]]
  
 
===== setTotal =====
 
===== setTotal =====
Line 17: Line 17:
 
empty  
 
empty  
  
'''Examples'''
+
'''Examples'''
 
 
''setTotal(false);''
 
 
 
''bool b = getTotal();''
 
 
 
''if (b) print("Total row is enabled and can be shown for table diagrams.");''
 
  
''else print("Total row is disabled and cannot be shown for table diagrams.");''
+
 +
<span style="color:#DF8621"> Example for cross 1x0 </span>
 +
<source lang="javascript">
 +
DCS_use(15645932);
 +
setTotal(false) ;
 +
createCrossDiagram({"Gender"},{});
 +
</source>
  
''//Result: Total row is disabled and cannot be shown for table diagrams. ''
+
[[File:2018-11-12_09-18-41.png]]
  
'''Availability'''
 
  
Version 5.4 __NOTOC__ <!-- imported from file: 4208.htm-->  
+
<span style="color:#DF8621"> Example for cross 2x1 </span>
 
+
<source lang="javascript">
[[Category:Include_total_functions]]
+
DCS_use(15639259);
 +
setTotal(false) ;
 +
createCrossDiagram({"Gender", "Age"},{"Q3"});
 +
</source>
 +
[[File:2018-11-12_9-52-12.png]]

Latest revision as of 09:27, 16 November 2018


setTotal

Enables or disables the total row which can be shown for table diagrams.

Syntax

setTotal(enabled)

Arguments

enabled: Is a boolean expression. If true the row will be included, if false the row will not be included

Return type

empty

Examples


Example for cross 1x0

DCS_use(15645932);
setTotal(false) ;
createCrossDiagram({"Gender"},{});

2018-11-12 09-18-41.png


Example for cross 2x1

DCS_use(15639259);
setTotal(false) ;
createCrossDiagram({"Gender", "Age"},{"Q3"});

2018-11-12 9-52-12.png