text: function(t,i,s){"use strict";var e=t("../../../core/utils/extend").extend,h=t("./symbol_point"),o=t("./bar_point"),a=Math,n=a.abs,l=a.min,r=a.max,u=a.round,c=2;s.exports=e({},o,{_getContinuousPoints:function(t,i){var s,e=this,h=this.x,o=this._options.rotated?function(t,i){return[i,t]}:function(t,i){return[t,i]},a=this.width,l=this.highY,r=n(l-t)<n(l-i)?t:i,u=r===i?t:i;return s=u===r?[].concat(o(h,this.highY)).concat(o(h,this.lowY)).concat(o(h,this.closeY)).concat(o(h-a/2,this.closeY)).concat(o(h+a/2,this.closeY)).concat(o(h,this.closeY)):[].concat(o(h,this.highY)).concat(o(h,r)).concat(o(h+a/2,r)).concat(o(h+a/2,u)).concat(o(h,u)).concat(o(h,this.lowY)).concat(o(h,u)).concat(o(h-a/2,u)).concat(o(h-a/2,r)).concat(o(h,r))},_getCrockPoints:function(t){var i=this,s=this.x,e=this._options.rotated?function(t,i){return[i,t]}:function(t,i){return[t,i]};return[].concat(e(s,this.highY)).concat(e(s,this.lowY)).concat(e(s,t)).concat(e(s-this.width/2,t)).concat(e(s+this.width/2,t)).concat(e(s,t))},_getPoints:function(){var t,i=this,s=this.closeY,e=this.openY;return t=null!==s&&null!==e?this._getContinuousPoints(e,s):e===s?[this.x,this.highY,this.x,this.lowY]:this._getCrockPoints(null!==e?e:s)},getColor:function(){var t=this;return this._isReduction?this._options.reduction.color:this._styles.normal.stroke||this.series.getColor()},_drawMarkerInGroup:function(t,i,s){var e=this;this.graphic=s.path(this._getPoints(),"area").attr({"stroke-linecap":"square"}).attr(i).data({"chart-data-point":this}).sharp().append(t)},_fillStyle:function(){var t=this,i=this._options.styles;this._isReduction&&this._isPositive?this._styles=i.reductionPositive:this._isReduction?this._styles=i.reduction:this._isPositive?this._styles=i.positive:this._styles=i},_getMinTrackerWidth:function(){return 2+2*this._styles.normal["stroke-width"]},correctCoordinates:function(t){var i=this._getMinTrackerWidth(),s=10,e=t.width;e=e<i?i:e>10?10:e,this.width=e+e%2,this.xCorrection=t.offset},_getMarkerGroup:function(t){var i,s=this;return i=this._isReduction&&this._isPositive?t.reductionPositiveMarkersGroup:this._isReduction?t.reductionMarkersGroup:this._isPositive?t.defaultPositiveMarkersGroup:t.defaultMarkersGroup},_drawMarker:function(t,i){this._drawMarkerInGroup(this._getMarkerGroup(i),this._getStyle(),t)},_getSettingsForTracker:function(){var t,i,s,e,h=this,o=this.highY,a=this.lowY,r=this._options.rotated;return o===a&&(o=r?o+2:o-2,a=r?a-2:a+2),r?(t=l(a,o),i=this.x-this.width/2,s=n(a-o),e=this.width):(t=this.x-this.width/2,i=l(a,o),s=this.width,e=n(a-o)),{x:t,y:i,width:s,height:e}},_getGraphicBBox:function(){var t=this,i=this._options.rotated,s=this.x,e=this.width,h=this.lowY,o=this.highY;return{x:i?h:s-u(e/2),y:i?s-u(e/2):o,width:i?o-h:e,height:i?e:h-o}},getTooltipParams:function(t){var i=this;if(this.graphic){var s,e,h=l(this.lowY,this.highY),o=r(this.lowY,this.highY),a=this._getVisibleArea(),n="edge"===t,u=this._options.rotated,c=u?a.minX:a.minY,g=u?a.maxX:a.maxY,V=r(c,h),_=l(g,o),p=V+(_-V)/2;return u?(e=this.x,s=n?_:p):(s=this.x,e=n?V:p),{x:s,y:e,offset:0}}},hasValue:function(){return null!==this.highValue&&null!==this.lowValue},hasCoords:function(){return null!==this.x&&null!==this.lowY&&null!==this.highY},_translate:function(){var t,i=this,s=this._options.rotated,e=this._getValTranslator(),h=this._getArgTranslator().translate(this.argument);this.vx=this.vy=this.x=null===h?h:h+(this.xCorrection||0),this.openY=null!==this.openValue?e.translate(this.openValue):null,this.highY=e.translate(this.highValue),this.lowY=e.translate(this.lowValue),this.closeY=null!==this.closeValue?e.translate(this.closeValue):null,t=l(this.lowY,this.highY)+n(this.lowY-this.highY)/2,this._calculateVisibility(s?t:this.x,s?this.x:t)},getCrosshairData:function(t,i){var s,e,h=this,o=this._options.rotated,a=o?t:i,l=this.argument,r="low";return n(this.lowY-a)<n(this.closeY-a)?s=this.lowY:(s=this.closeY,r="close"),n(s-a)>=n(this.openY-a)&&(s=this.openY,r="open"),n(s-a)>=n(this.highY-a)&&(s=this.highY,r="high"),(e=o?{y:this.vy,x:s,xValue:this[r+"Value"],yValue:l}:{x:this.vx,y:s,xValue:l,yValue:this[r+"Value"]}).axis=this.series.axis,e},_updateData:function(t){var i=this,s=this._label,e=this._options.reduction.color;this.value=this.initialValue=t.reductionValue,this.originalValue=t.value,this.lowValue=this.originalLowValue=t.lowValue,this.highValue=this.originalHighValue=t.highValue,this.openValue=this.originalOpenValue=t.openValue,this.closeValue=this.originalCloseValue=t.closeValue,this._isPositive=t.openValue<t.closeValue,this._isReduction=t.isReduction,this._isReduction&&s.setColor(e)},_updateMarker:function(t,i,s){var e=this,h=this.graphic;h.attr({points:this._getPoints()}).smartAttr(i).sharp(),s&&h.append(this._getMarkerGroup(s))},_getLabelFormatObject:function(){var t=this;return{openValue:this.openValue,highValue:this.highValue,lowValue:this.lowValue,closeValue:this.closeValue,reductionValue:this.initialValue,argument:this.initialArgument,value:this.initialValue,seriesName:this.series.name,originalOpenValue:this.originalOpenValue,originalCloseValue:this.originalCloseValue,originalLowValue:this.originalLowValue,originalHighValue:this.originalHighValue,originalArgument:this.originalArgument,point:this}},_getFormatObject:function(t){var i=this,s=t.formatValue(this.highValue),o=t.formatValue(this.openValue),a=t.formatValue(this.closeValue),n=t.formatValue(this.lowValue),l,r=h._getFormatObject.call(this,t);return e({},r,{valueText:"h: "+s+(""!==o?" o: "+o:"")+(""!==a?" c: "+a:"")+" l: "+n,highValueText:s,openValueText:o,closeValueText:a,lowValueText:n})},getMaxValue:function(){return this.highValue},getMinValue:function(){return this.lowValue}})}
  
  