Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/widget/gauge/_Gauge.js

  • Provides:

    • dojox.widget.gauge._Gauge
  • Requires:

    • dijit._Widget in common
    • dijit._Templated in common
    • dijit._Container in common
    • dijit._Contained in common
    • dijit.Tooltip in common
    • dojo.fx.easing in common
    • dojox.gfx in common
  • dojox.widget.gauge._Gauge

    • type
      Function
    • chains:
      • dijit._Widget: (prototype)
      • dijit._Templated.prototype: (prototype)
      • dijit._Container.prototype: (prototype)
      • dijit._Widget: (call)
      • dijit._Templated: (call)
      • dijit._Container: (call)
    • summary
      a gauge built using the dojox.gfx package.
    • description
      using dojo.gfx (and thus either SVG or VML based on what is supported), this widget
      builds a gauge component, used to display numerical data in a familiar format
      
      usage:
      this widget is not to be used alone. it is meant to be subclassed, such as
      dojox.widget.BarGauge or dojox.widget.AnalogGauge
  • dojox.widget.gauge._Gauge.width

    • type
      The
    • summary
      width of the mark
      length: The length of the mark
      interval: The interval the ticks should be added on
      color: The color of the mark and text
      font: an object with any/all of the following parameters:
      {family: "Helvetica", style: "italic", variant: 'small-caps', weight: 'bold', size: "18pt"}
  • dojox.widget.gauge._Gauge.height

    • type
      Number
    • summary
      the height of the gauge (default is 200)
  • dojox.widget.gauge._Gauge.background

    • type
      Object
    • summary
      the color of the background.  This must be an object of one of two forms:
      {'color': 'color-name'}
      OR
      (for a gradient:)
      {'type': 'linear', 'x1': 0, 'x2': 0, 'y1': 0, 'y2': 200, 'colors': [{offset: 0, color:'#C0C0C0'}, {offset: 1, color: '#E0E0E0'}] }
  • dojox.widget.gauge._Gauge.min

    • type
      Number
    • summary
      The minimum value of the gauge.  Normally not set explicitly, as it will be determined by
      the ranges that are added.
  • dojox.widget.gauge._Gauge.max

    • type
      Number
    • summary
      The maximum value of the gauge.  Normally not set explicitly, as it will be determined by
      the ranges that are added.
  • dojox.widget.gauge._Gauge.image

    • type
      String
    • summary
      background image for gauge (default is no image)
  • dojox.widget.gauge._Gauge.useRangeStyles

    • type
      Number
    • summary
      indicates whether to use given css classes (dojoxGaugeRangeXX)
      to determine the color (and other style attributes?) of the ranges
      this value should be the number of dojoxGaugeRange classes that are
      defined, starting at dojoxGaugeRange1 (0 indicates falling to default
      hardcoded colors)
  • dojox.widget.gauge._Gauge.useTooltip

    • type
      Boolean
    • summary
      indicates whether tooltips should be displayed for ranges, indicators, etc.
  • dojox.widget.gauge._Gauge.majorTicks

    • type
      Object
    • summary
      An object representing the tick marks that should be added to the gauge. Major tick marks have a text label
      indicating the value.  The object can have the following attributes (required are marked with a *):
      offset: the distance from the 'center' of the gauge.  Used differently for Analog vs. Bar
  • dojox.widget.gauge._Gauge.minorTicks

    • type
      Object
    • summary
      An object of the same format as majorTicks, indicating where the minor (label-less) marks should be placed
      The font parameter is ignored if provided since minor tick marks have no text label.
  • dojox.widget.gauge._Gauge._defaultIndicator

    • type
      Objection
    • summary
      Should be overridden by any extending classes and used to indicate what the 'default' indicator is.
      This object is used as the indicator when creating tick marks or when an anonmyous object is passed into
      addIndicator.
  • dojox.widget.gauge._Gauge.defaultColors

    • type
      Array
    • summary
      Set of default colors to color ranges with.
  • dojox.widget.gauge._Gauge.surface

    • type
      Object
    • summary
      The SVG/VML surface that the shapes are drawn on.  Can be accessed/used by indicators to draw themselves
  • dojox.widget.gauge._Gauge.hideValues

    • type
      Boolean
    • summary
      indicates whether the text boxes showing the value of the indicator (as text
      content) should be hidden or shown.  Default is not hidden, aka shown.
  • dojox.widget.gauge._Gauge.gaugeContent

    • type
      Object
  • dojox.widget.gauge._Gauge.templateString

    • type
      Object
  • dojox.widget.gauge._Gauge._backgroundDefault

    • type
      Object
  • dojox.widget.gauge._Gauge._backgroundDefault.color

    • type
      String
  • dojox.widget.gauge._Gauge._rangeData

    • type
      Array
  • dojox.widget.gauge._Gauge._indicatorData

    • type
      Array
  • dojox.widget.gauge._Gauge._drag

    • type
      Object
  • dojox.widget.gauge._Gauge._img

    • type
      Object
  • dojox.widget.gauge._Gauge._overOverlay

    • type
      bool
  • dojox.widget.gauge._Gauge._lastHover

    • type
      String
  • dojox.widget.gauge._Gauge.startup

    • type
      Function
  • dojox.widget.gauge._Gauge.ranges

    • type
      Object
  • dojox.widget.gauge._Gauge.indicators

    • type
      Object
  • dojox.widget.gauge._Gauge._setTicks

    • parameters:
      • oldTicks: (typeof Object)
      • newTicks: (typeof Object)
      • label: (typeof Boolean)
    • summary
      internal method used to clear existing tick marks, then add new ones
    • type
      Function
  • dojox.widget.gauge._Gauge.setMinorTicks

    • parameters:
      • ticks: (typeof Object)
    • summary
      Creates and draws the minor tick marks based on the passed object (expecting the same format
      as the minorTicks object documented above)
    • type
      Function
  • dojox.widget.gauge._Gauge.setMajorTicks

    • parameters:
      • ticks: (typeof Object)
    • summary
      Creates and draws the major tick marks based on the passed object (expecting the same format
      as the majorTicks object documented above)
    • type
      Function
  • dojox.widget.gauge._Gauge.postCreate

    • type
      Function
  • dojox.widget.gauge._Gauge.createSurface

    • summary
      internal method used by the gauge to create the graphics surface area
    • type
      Function
  • dojox.widget.gauge._Gauge.gaugeContent.style.width

    • type
      String
  • dojox.widget.gauge._Gauge.gaugeContent.style.height

    • type
      String
  • dojox.widget.gauge._Gauge._background

    • type
      Object
  • dojox.widget.gauge._Gauge.setBackground

    • parameters:
      • background: (typeof An)
        object in one of the two forms:
        {'color': 'color-name'}
        OR
        (for a gradient:)
        {'type': 'linear', 'colors': [{offset: 0, color:'#C0C0C0'}, {offset: 1, color: '#E0E0E0'}] }
        If background is null or undefined, this will set the fill to this._backgroundDefault
    • summary
      This method is used to set the background of the gauge after it is created.
    • description
      Sets the background using the given object.  Must be the same 'type' of object
      as the original background argument.
    • type
      Function
  • dojox.widget.gauge._Gauge.setBackground.background

    • type
      An
    • summary
      object in one of the two forms:
      {'color': 'color-name'}
      OR
      (for a gradient:)
      {'type': 'linear', 'colors': [{offset: 0, color:'#C0C0C0'}, {offset: 1, color: '#E0E0E0'}] }
      If background is null or undefined, this will set the fill to this._backgroundDefault
  • dojox.widget.gauge._Gauge.addRange

    • parameters:
      • range: (typeof Object)
        A range is either a dojox.widget.gauge.Range object, or a object
        with similar parameters (low, high, hover, etc.).
    • summary
      This method is used to add a range to the gauge.
    • description
      Creates a range (colored area on the background of the gauge)
      based on the given arguments.
    • type
      Function
  • dojox.widget.gauge._Gauge.addRanges

    • parameters:
      • ranges: (typeof Array)
    • summary
      This method is used to add ranges to the gauge.
    • description
      Creates a range (colored area on the background of the gauge)
      based on the given arguments.
      range:
      A range is either a dojox.widget.gauge.Range object, or a object
      with similar parameters (low, high, hover, etc.).
    • type
      Function
  • dojox.widget.gauge._Gauge.addIndicator

    • parameters:
      • indicator: (typeof Object)
        A dojox.widget.gauge._Indicator or an object with similar parameters
        (value, color, offset, etc.).
    • summary
      This method is used to add an indicator to the bar graph.
    • description
      This method adds an indicator, such as a tick mark or needle,
      to the bar graph.
    • type
      Function
  • dojox.widget.gauge._Gauge.removeIndicator

    • parameters:
      • indicator: (typeof Object)
    • summary
      Removes the given indicator from the gauge by calling it's remove function
      and removing it from the local cache.
    • type
      Function
  • dojox.widget.gauge._Gauge.moveIndicatorToFront

    • parameters:
      • indicator: (typeof Object)
        A dojox.widget.gauge._Indicator or an object with similar parameters
        (value, color, offset, etc.).
    • summary
      This function is used to move an indicator the the front (top)
      of the gauge
    • type
      Function
  • dojox.widget.gauge._Gauge.drawText

    • parameters:
      • txt: (typeof String)
        The text to be drawn
      • x: (typeof Number)
        The x coordinate at which to place the text
      • y: (typeof Number)
        The y coordinate at which to place the text
        align?:	String
        Indicates how to align the text
        Valid value is 'right', otherwise text is left-aligned
        vAlign?:	String
        Indicates how to align the text vertically.
        Valid value is 'top', otherwise text is bottom-aligned
        color?:	String
        Indicates the color of the text
        font?:	Object
        A font object, generally of the following format:
        {family: "Helvetica", style: "italic", variant: 'small-caps', weight: 'bold', size: "18pt"}
      • align: (typeof String)
      • vAlign: (typeof String)
      • color: (typeof String)
      • font: (typeof Object)
    • summary
      This function is used draw text onto the gauge.  The text object
      is also returned by the function so that may be removed later
      by calling removeText
    • type
      Function
  • dojox.widget.gauge._Gauge.removeText

    • parameters:
      • t: (typeof String)
        The text to remove.
    • summary
      Removes a text element from the gauge.
    • type
      Function
  • dojox.widget.gauge._Gauge.updateTooltip

    • parameters:
      • txt: (typeof String)
        The text to put in the tooltip.
      • e: (typeof Event)
    • summary
      Updates the tooltip for the gauge to display the given text.
    • type
      Function
  • dojox.widget.gauge._Gauge.handleMouseOver

    • parameters:
      • event: (typeof Object)
        The event object
    • summary
      This is an internal handler used by the gauge to support
      hover text
    • type
      Function
  • dojox.widget.gauge._Gauge.handleMouseOut

    • parameters:
      • event: (typeof Object)
        The event object
    • summary
      This is an internal handler used by the gauge to support
      hover text
    • type
      Function
  • dojox.widget.gauge._Gauge.handleMouseDown

    • parameters:
      • event: (typeof Object)
        The event object
    • summary
      This is an internal handler used by the gauge to support using
      the mouse to drag an indicator to modify it's value
    • type
      Function
  • dojox.widget.gauge._Gauge._indicatorData.length

    • type
      Number
  • dojox.widget.gauge._Gauge.handleMouseUp

    • parameters:
      • event: (typeof Object)
        The event object
    • summary
      This is an internal handler used by the gauge to support using
      the mouse to drag an indicator to modify it's value
    • type
      Function
  • dojox.widget.gauge._Gauge.handleMouseMove

    • parameters:
      • event: (typeof Object)
        The event object
    • summary
      This is an internal handler used by the gauge to support using
      the mouse to drag an indicator to modify it's value
    • type
      Function
  • dojox.widget.gauge.Range

    • type
      Function
    • chains:
      • dijit._Widget: (prototype)
      • dijit._Contained.prototype: (prototype)
      • dijit._Widget: (call)
      • dijit._Contained: (call)
    • summary
      a range to be used in a _Gauge
    • description
      a range widget, which has given properties.  drawn by a _Gauge.
      
      usage:
      <script type="text/javascript">
      dojo.require("dojox.widget.AnalogGauge");
      dojo.require("dijit.util.parser");
      </script>
      ...
      <div	dojoType="dojox.widget.AnalogGauge"
      id="testGauge"
      width="300"
      height="200"
      cx=150
      cy=175
      radius=125
      image="gaugeOverlay.png"
      imageOverlay="false"
      imageWidth="280"
      imageHeight="155"
      imageX="12"
      imageY="38">
      <div	dojoType="dojox.widget.gauge.Range"
      low=5
      high=10
      hover="5 - 10"
      ></div>
      <div	dojoType="dojox.widget.gauge.Range"
      low=10
      high=20
      hover="10 - 20"
      ></div>
      </div>
  • dojox.widget.gauge.Range.low

    • type
      Number
    • summary
      the low value of the range
  • dojox.widget.gauge.Range.high

    • type
      Numbe
    • summary
      the high value of the range
  • dojox.widget.gauge.Range.hover

    • type
      String
    • summary
      the text to put in the tooltip for the gauge
  • dojox.widget.gauge.Range.color

    • type
      Object
    • summary
      the color of the range.  This must be an object of one of two forms:
      {'color': 'color-name'}
      OR
      (for a gradient:)
      {'type': 'linear', 'colors': [{offset: 0, color:'#C0C0C0'}, {offset: 1, color: '#E0E0E0'}] }
  • dojox.widget.gauge.Range.size

    • type
      Number
    • summary
      for a circular gauge (such as an AnalogGauge), this dictates the size of the arc
  • dojox.widget.gauge.Range.startup

    • type
      Function
  • dojox.widget.gauge._Indicator

    • type
      Function
    • chains:
      • dijit._Widget: (prototype)
      • dijit._Contained.prototype: (prototype)
      • dijit._Templated.prototype: (prototype)
      • dijit._Widget: (call)
      • dijit._Contained: (call)
      • dijit._Templated: (call)
    • summary
      a indicator to be used in a gauge
    • description
      an indicator widget, which has given properties.  drawn by a gauge.
      
      usage:
      <script type="text/javascript">
      dojo.require("dojox.widget.AnalogGauge");
      dojo.require("dijit.util.parser");
      </script>
      ...
      <div	dojoType="dojox.widget.AnalogGauge"
      id="testGauge"
      width="300"
      height="200"
      cx=150
      cy=175
      radius=125
      image="gaugeOverlay.png"
      imageOverlay="false"
      imageWidth="280"
      imageHeight="155"
      imageX="12"
      imageY="38">
      <div 	dojoType="dojox.widget.gauge.Indicator"
      value=17
      type="arrow"
      length=135
      width=3
      hover="Value: 17"
      onDragMove="handleDragMove">
      </div>
      </div>
  • dojox.widget.gauge._Indicator.value

    • type
      Number
    • summary
      The value (on the gauge) that this indicator should be placed at
  • dojox.widget.gauge._Indicator.type

    • type
      String
    • summary
      The type of indicator to draw.  Varies by gauge type.  Some examples include
      &quot;line&quot;, &quot;arrow&quot;, and &quot;bar&quot;
  • dojox.widget.gauge._Indicator.color

    • type
      String
    • summary
      The color of the indicator.
  • dojox.widget.gauge._Indicator.label

    • type
      String
    • summary
      The text label for the indicator.
  • dojox.widget.gauge._Indicator.font

    • type
      Object
    • summary
      Generally in a format similar to:
      {family: &quot;Helvetica&quot;, weight: &quot;bold&quot;, style: &quot;italic&quot;, size: &quot;18pt&quot;, rotated: true}
  • dojox.widget.gauge._Indicator.font.family

    • type
      String
  • dojox.widget.gauge._Indicator.font.size

    • type
      String
  • dojox.widget.gauge._Indicator.length

    • type
      Number
    • summary
      The length of the indicator.  In the above example, the radius of the AnalogGauge
      is 125, but the length of the indicator is 135, meaning it would project beyond
      the edge of the AnalogGauge
  • dojox.widget.gauge._Indicator.width

    • type
      Number
    • summary
      The width of the indicator.
  • dojox.widget.gauge._Indicator.offset

    • type
      Number
    • summary
      The offset of the indicator
  • dojox.widget.gauge._Indicator.hover

    • type
      String
    • summary
      The string to put in the tooltip when this indicator is hovered over.
  • dojox.widget.gauge._Indicator.front

    • type
      boolean
    • summary
      Keep this indicator at the front
  • dojox.widget.gauge._Indicator.easing

    • alias - dojo._defaultEasing
    • type
      String|Object
    • summary
      indicates the easing function to be used when animating the of an indicator.
  • dojox.widget.gauge._Indicator.duration

    • type
      Number
    • summary
      indicates how long an animation of the indicator should take
  • dojox.widget.gauge._Indicator.hideValue

    • type
      bool
  • dojox.widget.gauge._Indicator.noChange

    • type
      Boolean
    • summary
      indicates whether the indicator's value can be changed.  Useful for
      a static target indicator.  Default is false (that the value can be changed).
  • dojox.widget.gauge._Indicator._gauge

    • type
      Object
  • dojox.widget.gauge._Indicator.title

    • type
      String
    • summary
      The title of the indicator, to be displayed next to it's input box for the text-representation.
  • dojox.widget.gauge._Indicator.templateString

    • type
      Object
  • dojox.widget.gauge._Indicator.startup

    • type
      Function
  • dojox.widget.gauge._Indicator.onDragMove

    • summary
      Handles updating the text box and the hover text while dragging an indicator
    • type
      Function
  • dojox.widget.gauge._Indicator.postCreate

    • type
      Function
  • dojox.widget.gauge._Indicator._update

    • parameters:
      • event
    • summary
      A private function, handling the updating of the gauge
    • type
      Function
  • dojox.widget.gauge._Indicator.valueNode.value

  • dojox.widget.gauge._Indicator.update

    • parameters:
      • value
    • summary
      Updates the value of the indicator, including moving/re-drawing at it's new location and
      updating the text box
    • type
      Function
  • dojox.widget.gauge._Indicator.draw

    • parameters:
      • dontAnimate: (typeof Boolean)
        Indicates if the drawing should not be animated (rather than teh default, to animate)
    • summary
      Performs the initial drawing of the indicator.
    • type
      Function
  • dojox.widget.gauge._Indicator.remove

    • summary
      Removes the indicator's shapes from the gauge surface.
    • type
      Function
  • dojox.widget.gauge

    • type
      Object
  • dojox.widget

    • type
      Object
  • dojox

    • type
      Object