/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.charting.plot2d._PlotEvents"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.charting.plot2d._PlotEvents"]){_4._hasResource["dojox.charting.plot2d._PlotEvents"]=true;_4.provide("dojox.charting.plot2d._PlotEvents");_4.declare("dojox.charting.plot2d._PlotEvents",null,{constructor:function(){this._shapeEvents=[];this._eventSeries={};},destroy:function(){this.resetEvents();this.inherited(arguments);},plotEvent:function(o){},raiseEvent:function(o){this.plotEvent(o);var t=_4.delegate(o);t.originalEvent=o.type;t.originalPlot=o.plot;t.type="onindirect";_4.forEach(this.chart.stack,function(_7){if(_7!==this&&_7.plotEvent){t.plot=_7;_7.plotEvent(t);}},this);},connect:function(_8,_9){this.dirty=true;return _4.connect(this,"plotEvent",_8,_9);},events:function(){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;},resetEvents:function(){if(this._shapeEvents.length){_4.forEach(this._shapeEvents,function(_a){_a.shape.disconnect(_a.handle);});this._shapeEvents=[];}this.raiseEvent({type:"onplotreset",plot:this});},_connectSingleEvent:function(o,_b){this._shapeEvents.push({shape:o.eventMask,handle:o.eventMask.connect(_b,this,function(e){o.type=_b;o.event=e;this.raiseEvent(o);o.event=null;})});},_connectEvents:function(o){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");}},_reconnectEvents:function(_c){var a=this._eventSeries[_c];if(a){_4.forEach(a,this._connectEvents,this);}},fireEvent:function(_d,_e,_f,_10){var s=this._eventSeries[_d];if(s&&s.length&&_f<s.length){var o=s[_f];o.type=_e;o.event=_10||null;this.raiseEvent(o);o.event=null;}}});}}};});