//>>built
define("dojox/charting/action2d/Tooltip","dojo/_base/kernel,dijit/Tooltip,dojo/_base/lang,dojo/_base/declare,dojo/dom-style,./PlotAction,dojox/gfx/matrix,dojox/lang/functional,dojox/lang/functional/scan,dojox/lang/functional/fold".split(","),function(q,h,k,l,m,n,o,e){var f=function(a){var b=a.run&&a.run.data&&a.run.data[a.index];return b&&"number"!=typeof b&&(b.tooltip||b.text)?b.tooltip||b.text:"candlestick"==a.element?'<table cellpadding="1" cellspacing="0" border="0" style="font-size:0.9em;"><tr><td>Open:</td><td align="right"><strong>'+
a.data.open+'</strong></td></tr><tr><td>High:</td><td align="right"><strong>'+a.data.high+'</strong></td></tr><tr><td>Low:</td><td align="right"><strong>'+a.data.low+'</strong></td></tr><tr><td>Close:</td><td align="right"><strong>'+a.data.close+"</strong></td></tr>"+(void 0!==a.data.mid?'<tr><td>Mid:</td><td align="right"><strong>'+a.data.mid+"</strong></td></tr>":"")+"</table>":"bar"==a.element?a.x:a.y},i=Math.PI/4,p=Math.PI/2;return l("dojox.charting.action2d.Tooltip",n,{defaultParams:{text:f},
optionalParams:{},constructor:function(a,b,c){this.text=c&&c.text?c.text:f;this.connect()},process:function(a){if("onplotreset"===a.type||"onmouseout"===a.type)h.hide(this.aroundRect),this.aroundRect=null,"onplotreset"===a.type&&delete this.angles;else if(a.shape&&"onmouseover"===a.type){var b={type:"rect"},c=["after-centered","before-centered"];switch(a.element){case "marker":b.x=a.cx;b.y=a.cy;b.w=b.h=1;break;case "circle":b.x=a.cx-a.cr;b.y=a.cy-a.cr;b.w=b.h=2*a.cr;break;case "spider_circle":b.x=
a.cx;b.y=a.cy;b.w=b.h=1;break;case "spider_plot":return;case "column":c=["above-centered","below-centered"];case "bar":b=k.clone(a.shape.getShape());b.w=b.width;b.h=b.height;break;case "candlestick":b.x=a.x;b.y=a.y;b.w=a.width;b.h=a.height;break;default:if(!this.angles)this.angles="number"==typeof a.run.data[0]?e.map(e.scanl(a.run.data,"+",0),"* 2 * Math.PI / this",e.foldl(a.run.data,"+",0)):e.map(e.scanl(a.run.data,"a + b.y",0),"* 2 * Math.PI / this",e.foldl(a.run.data,"a + b.y",0));var g=o._degToRad(a.plot.opt.startAngle),
d=(this.angles[a.index]+this.angles[a.index+1])/2+g;b.x=a.cx+a.cr*Math.cos(d);b.y=a.cy+a.cr*Math.sin(d);b.w=b.h=1;if(g&&(0>d||d>2*Math.PI))d=Math.abs(2*Math.PI-Math.abs(d));d<i||(d<p+i?c=["below-centered","above-centered"]:d<Math.PI+i?c=["before-centered","after-centered"]:d<2*Math.PI-i&&(c=["above-centered","below-centered"]))}g=this.chart.getCoords();b.x+=g.x;b.y+=g.y;b.x=Math.round(b.x);b.y=Math.round(b.y);b.w=Math.ceil(b.w);b.h=Math.ceil(b.h);this.aroundRect=b;a=this.text(a);if(this.chart.getTextDir)var f=
"rtl"==m.get(this.chart.node,"direction"),j="rtl"==this.chart.getTextDir(a);a&&(j&&!f?h.show("<span dir = 'rtl'>"+a+"</span>",this.aroundRect,c):!j&&f?h.show("<span dir = 'ltr'>"+a+"</span>",this.aroundRect,c):h.show(a,this.aroundRect,c))}}})});