Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Axis addOption: Difference between revisions

From Catglobe Wiki
Cg_pham (talk | contribs)
No edit summary
Cg van (talk | contribs)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category:Axis set modifying CGScript functions]]
 {{HelpFiles}}


====Axis_addOption====
==== Axis_addOption ====


Adds an axis option to the end of the array containing the axis options in the axis passed as argument to the method, and returns its index in the option list.
Adds an axis option to the end of the array containing the axis options in the axis passed as argument to the method, and returns its index in the option list.  


'''Syntax'''
'''Syntax'''  


Axis_addOption(''axis'', ''axisOption'')
Axis_addOption(''axis'', ''axisOption'')  


'''Arguments'''
'''Arguments'''  


''axis'': Is an axis array created by Axis_new function.
''axis'': Is an axis array created by Axis_new function.  


''axisOption'': Is an axis option array, created by AxisOption_new function.
''axisOption'': Is an axis option array, created by AxisOption_new function.  


'''Return type'''
'''Return type'''  


Number
Number  


'''Examples'''
'''Examples'''  


number index = Axis_addOption(myAxis, myOption);
''array axis = Axis_new("Age groups");''


'''Availability'''
''axis[AXIS_TEXT] = "Choose an age group";''


Version 5.5
''axis[AXIS_MATH_BASE] = "Age";''
__NOTOC__
 
<!-- imported from file: 5228.htm-->
''axis[AXIS_PCT_BASE] = "Age != empty";''
 
''number index1 = Axis_addOption(axis, AxisOption_new("Under 18", "Age < 18"));''
 
''number index2 = Axis_addOption(axis, AxisOption_new("18 - 29", "Age == [18-29]"));''
 
''print(index1); //Result: 0''
 
''print(index2); //Result: 1''
 
'''Availability'''
 
Version 5.5 __NOTOC__ <!-- imported from file: 5228.htm-->  
 
[[Category:Axis_set_modifying_CGScript_functions]]

Latest revision as of 09:26, 23 December 2011



Axis_addOption

Adds an axis option to the end of the array containing the axis options in the axis passed as argument to the method, and returns its index in the option list.

Syntax

Axis_addOption(axis, axisOption)

Arguments

axis: Is an axis array created by Axis_new function.

axisOption: Is an axis option array, created by AxisOption_new function.

Return type

Number

Examples

array axis = Axis_new("Age groups");

axis[AXIS_TEXT] = "Choose an age group";

axis[AXIS_MATH_BASE] = "Age";

axis[AXIS_PCT_BASE] = "Age != empty";

number index1 = Axis_addOption(axis, AxisOption_new("Under 18", "Age < 18"));

number index2 = Axis_addOption(axis, AxisOption_new("18 - 29", "Age == [18-29]"));

print(index1); //Result: 0

print(index2); //Result: 1

Availability

Version 5.5