%ZEN.SVGComponent.meter
Class %ZEN.SVGComponent.meter Extends (svgComponent, %ZEN.Component.dataView) [ Abstract, Deprecated, Inheritance = right, System = 3 ]
Base class for SVG meter components.
A meter is analogous to a control: it has a value as well as upper and lower ranges and thresholds. The display of the value is implemented by subclasses.
Parameters
DEFAULTVIEWBOXWIDTH
Parameter DEFAULTVIEWBOXWIDTH = 100;
Default viewBoxWidth of this component. This is set to 100 to provide a default, fixed coordinate system for meters.
DEFAULTVIEWBOXHEIGHT
Parameter DEFAULTVIEWBOXHEIGHT = 100;
Default viewBoxHeight of this component. This is set to 100 to provide a fixed coordinate system for meters.
Properties
value
Property value As %ZEN.Datatype.string [ InitialExpression = 0 ];
Current value of the meter.
label
Property label As %ZEN.Datatype.caption;
Label displayed by the meter.
labelStyle
Property labelStyle As %ZEN.Datatype.svgStyle;
Optional: CSS style applied to the meter label.
targetValue
Property targetValue As %ZEN.Datatype.string;
If defined, this is the target value for the meter. If this value is numeric, then it is used as the target value. If it is a string, then it is used as the name of a property within the data source connected to this meter.
Certain meters may display this value.
rangeLower
Property rangeLower As %ZEN.Datatype.string;
Represents the lower value of the meter range. If this value is numeric, then it is used as the value. If it is a string, then it is used as the name of a property within the data source connected to this meter.
rangeUpper
Property rangeUpper As %ZEN.Datatype.string;
Represents the upper value of the meter range. If this value is numeric, then it is used as the value. If it is a string, then it is used as the name of a property within the data source connected to this meter.
thresholdLower
Property thresholdLower As %ZEN.Datatype.string;
Represents the lower threshold level for the meter. If this value is numeric, then it is used as the value. If it is a string, then it is used as the name of a property within the data source connected to this meter.
thresholdUpper
Property thresholdUpper As %ZEN.Datatype.string;
Represents the upper threshold level for the meter. If this value is numeric, then it is used as the value. If it is a string, then it is used as the name of a property within the data source connected to this meter.
scaleFactor
Property scaleFactor As %ZEN.Datatype.float [ InitialExpression = 1 ];
The displayed value is determined by multiplying the actual value and this scaling factor.
animate
Property animate As %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If this meter supports animation, then this controls whether the animation is on or off.
disabled
Property disabled As %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, disable this meter.
dataBinding
Property dataBinding As %ZEN.Datatype.string;
Optional. If this meter is associated with a %ZEN.Auxiliary.dataController, this specifies the name of the property within the dataController that will provide the value for this control.
showConditionally
Property showConditionally As %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, hide this meter if it is bound to a non-existant data property.
onchange
Property onchange As %ZEN.Datatype.eventHandler;
onchange event handler: For meters that allow user actions to modify their value, this event handler is called when the user changes the value of the slider.
XDatas
SVGStyle
XData SVGStyle
Methods
renderContents
ClientMethod renderContents() [ Final, Language = javascript ]
Render the inner SVG contents of this component.
renderMeter
ClientMethod renderMeter() [ Language = javascript ]
Render the inner SVG contents of this component. Subclasses should implement this method.
getValue
ClientMethod getValue() [ Language = javascript ]
Short-cut method to get the current value of this meter.
setValue
ClientMethod setValue(value) [ Language = javascript ]
Short-cut method to set the current value of this meter.
acquireData
ClientMethod acquireData() [ Language = javascript ]
Acquire data for this meter.
If the meter is connected to a dataController, then set the value of the meter to the current value of the dataController property specified by dataBinding.
renderLabel
ClientMethod renderLabel(x, y) [ Language = javascript ]
Create the label displayed by this meter. Subclasses should call this from their renderx and y specify the midpoint of the label.
getLabelText
ClientMethod getLabelText() [ Language = javascript ]
Return the resolved label to display for this meter.
notifyViewHandler
ClientMethod notifyViewHandler(reason, data1, data2, data3) [ Language = javascript ]
Notification that the dataController associated with this dataView has raised an event.
onchangeHandler
ClientMethod onchangeHandler() [ Language = javascript ]
This built-in event handler is called by meters that allow user interaction. It raises notification that the meter's value has changed.
setProperty
ClientMethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.