dojox/charting/plot2d/_PlotEvents.js

  • Provides:

    • dojox.charting.plot2d._PlotEvents
  • dojox.charting.plot2d._PlotEvents

    • type
      Function
    • source: [view]
        this._shapeEvents = [];
        this._eventSeries = {};
    • summary
  • dojox.charting.plot2d._PlotEvents.destroy

    • type
      Function
    • source: [view]
        this.resetEvents();
        this.inherited(arguments);
    • summary
      Destroy any internal elements and event handlers.
  • dojox.charting.plot2d._PlotEvents.plotEvent

    • type
      Function
    • parameters:
      • o: (typeof Object)
        An object intended to represent event parameters.
    • source: [view]
        // summary:
        //  Stub function for use by specific plots.
        // o: Object
        //  An object intended to represent event parameters.
    • summary
      Stub function for use by specific plots.
  • dojox.charting.plot2d._PlotEvents.raiseEvent

    • type
      Function
    • parameters:
      • o: (typeof Object)
        An object intended to represent event parameters.
    • source: [view]
        this.plotEvent(o);
        var t = dojo.delegate(o);
        t.originalEvent = o.type;
        t.originalPlot = o.plot;
        t.type = "onindirect";
        dojo.forEach(this.chart.stack, function(plot){
         if(plot !== this && plot.plotEvent){
          t.plot = plot;
          plot.plotEvent(t);
         }
        }, this);
    • summary
      Raises events in predefined order
  • dojox.charting.plot2d._PlotEvents.connect

    • type
      Function
    • parameters:
      • object: (typeof Object)
        The object to connect to.
      • method: (typeof String|Function)
        The method to fire when our plotEvent is fired.
    • source: [view]
        this.dirty = true;
        return dojo.connect(this, "plotEvent", object, method); // Array
    • summary
      Helper function to connect any object's method to our plotEvent.
    • return_summary
      Array
      The handle as returned from dojo.connect (see dojo.connect).
    • returns
      Array
  • dojox.charting.plot2d._PlotEvents.events

    • type
      Function
    • source: [view]
        var ls = this.plotEvent._listeners;
        if(!ls || !ls.length){ return false; }
        for(var i in ls){
         if(!(i in Array.prototype)){
          return true;
         }
        }
        return false;
    • summary
      Find out if any event handlers have been connected to our plotEvent.
    • return_summary
      Boolean
      A flag indicating that there are handlers attached.
  • dojox.charting.plot2d._PlotEvents.resetEvents

    • type
      Function
    • source: [view]
        if(this._shapeEvents.length){
         dojo.forEach(this._shapeEvents, function(item){
          item.shape.disconnect(item.handle);
         });
         this._shapeEvents = [];
        }
        this.raiseEvent({type: "onplotreset", plot: this});
    • summary
      Reset all events attached to our plotEvent (i.e. disconnect).
  • dojox.charting.plot2d._PlotEvents._connectSingleEvent

    • type
      Function
    • parameters:
      • o: (typeof )
      • eventName: (typeof )
    • source: [view]
        this._shapeEvents.push({
         shape: o.eventMask,
         handle: o.eventMask.connect(eventName, this, function(e){
          o.type = eventName;
          o.event = e;
          this.raiseEvent(o);
          o.event = null;
         })
        });
    • summary
  • dojox.charting.plot2d._PlotEvents._connectEvents

    • type
      Function
    • parameters:
      • o: (typeof )
    • source: [view]
      if(o){
      o.chart = this.chart;
      o.plot = this;
      o.hAxis = this.hAxis || null;
      o.vAxis = this.vAxis || null;
      o.eventMask = o.eventMask || o.shape;
      this._connectSingleEvent(o, "onmouseover");
      this._connectSingleEvent(o, "onmouseout");
      this._connectSingleEvent(o, "onclick");
      }
    • summary
  • dojox.charting.plot2d._PlotEvents._reconnectEvents

    • type
      Function
    • parameters:
      • seriesName: (typeof )
    • source: [view]
        var a = this._eventSeries[seriesName];
        if(a){
         dojo.forEach(a, this._connectEvents, this);
        }
    • summary
  • dojox.charting.plot2d._PlotEvents.fireEvent

    • type
      Function
    • parameters:
      • seriesName: (typeof String)
        Series name.
      • eventName: (typeof String)
        Event name to emulate.
      • index: (typeof Number)
        Valid data value index used to raise an event.
      • eventObject: (typeof Object)
        Optional event object. Especially useful for synthetic events.
        Default: null.
    • source: [view]
        var s = this._eventSeries[seriesName];
        if(s && s.length && index < s.length){
         var o = s[index];
         o.type = eventName;
         o.event = eventObject || null;
         this.raiseEvent(o);
         o.event = null;
        }
    • summary
      Emulates firing an event for a given data value (specified by
      an index) of a given series.
  • dojox.charting.plot2d._PlotEvents.dirty

    • summary
  • dojox.charting.plot2d._PlotEvents._shapeEvents

    • summary
  • dojox.charting.plot2d._PlotEvents._eventSeries

    • summary
  • dojox.charting.plot2d

    • type
      Object
    • summary
  • dojox.charting

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary