Class: TypeFieldPropertyNode
- Inherits:
-
FieldPropertyNode
- Object
- ASTNode
- FieldPropertyNode
- TypeFieldPropertyNode
- Defined in:
- lib/ast_node.rb
Constant Summary
Constants inherited from ASTNode
ASTNode::DEFAULT_GRAPH_PROPERTIES, ASTNode::METRIC_PROC_FUNCTIONS
Instance Attribute Summary
Attributes inherited from FieldPropertyNode
Attributes inherited from ASTNode
#children, #graph_properties, #parent, #properties, #root_node
Instance Method Summary collapse
Methods inherited from FieldPropertyNode
Methods inherited from ASTNode
#add_child, #children_of_class, #compile, #config=, #default_colors, #initialize, #process_variables, #properties_to_url, #root?, #targets, #to_gdash, #url
Constructor Details
This class inherits a constructor from FieldPropertyNode
Instance Method Details
#apply_function(operand) ⇒ Object
292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/ast_node.rb', line 292 def apply_function(operand) if @value == "DERIVE" || @value == "COUNTER" # The scaling is because of the minutes/(60*seconds)" #return "scale(nonNegativeDerivative(#{operand}),0.0166666666666667)" if parent.properties[:yMax] return "scaleToSeconds(nonNegativeDerivative(#{operand},#{parent.properties[:yMax]}),1)" else return "scaleToSeconds(nonNegativeDerivative(#{operand}),1)" end end operand end |