stock.js 69.9 KB
/*
 Highcharts JS v6.2.0 (2018-10-17)
 Highstock as a plugin for Highcharts

 (c) 2018 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(K){"object"===typeof module&&module.exports?module.exports=K:"function"===typeof define&&define.amd?define(function(){return K}):K(Highcharts)})(function(K){(function(a){var B=a.addEvent,q=a.Axis,D=a.Chart,p=a.css,G=a.defined,C=a.each,z=a.extend,A=a.noop,n=a.pick,y=a.timeUnits,x=a.wrap;x(a.Series.prototype,"init",function(a){var d;a.apply(this,Array.prototype.slice.call(arguments,1));(d=this.xAxis)&&d.options.ordinal&&B(this,"updatedData",function(){delete d.ordinalIndex})});x(q.prototype,
"getTimeTicks",function(a,d,c,k,b,f,r,m){var e=0,l,u,g={},v,J,F,H=[],h=-Number.MAX_VALUE,t=this.options.tickPixelInterval,w=this.chart.time;if(!this.options.ordinal&&!this.options.breaks||!f||3>f.length||void 0===c)return a.call(this,d,c,k,b);J=f.length;for(l=0;l<J;l++){F=l&&f[l-1]>k;f[l]<c&&(e=l);if(l===J-1||f[l+1]-f[l]>5*r||F){if(f[l]>h){for(u=a.call(this,d,f[e],f[l],b);u.length&&u[0]<=h;)u.shift();u.length&&(h=u[u.length-1]);H=H.concat(u)}e=l+1}if(F)break}a=u.info;if(m&&a.unitRange<=y.hour){l=
H.length-1;for(e=1;e<l;e++)w.dateFormat("%d",H[e])!==w.dateFormat("%d",H[e-1])&&(g[H[e]]="day",v=!0);v&&(g[H[0]]="day");a.higherRanks=g}H.info=a;if(m&&G(t)){m=w=H.length;l=[];var M;for(v=[];m--;)e=this.translate(H[m]),M&&(v[m]=M-e),l[m]=M=e;v.sort();v=v[Math.floor(v.length/2)];v<.6*t&&(v=null);m=H[w-1]>k?w-1:w;for(M=void 0;m--;)e=l[m],k=Math.abs(M-e),M&&k<.8*t&&(null===v||k<.8*v)?(g[H[m]]&&!g[H[m+1]]?(k=m+1,M=e):k=m,H.splice(k,1)):M=e}return H});z(q.prototype,{beforeSetTickPositions:function(){var a,
d=[],c,k=!1,b,f=this.getExtremes(),r=f.min,m=f.max,e,l=this.isXAxis&&!!this.options.breaks,f=this.options.ordinal,u=Number.MAX_VALUE,g=this.chart.options.chart.ignoreHiddenSeries;b="highcharts-navigator-xaxis"===this.options.className;var v;!this.options.overscroll||this.max!==this.dataMax||this.chart.mouseIsDown&&!b||this.eventArgs&&(!this.eventArgs||"navigator"===this.eventArgs.trigger)||(this.max+=this.options.overscroll,!b&&G(this.userMin)&&(this.min+=this.options.overscroll));if(f||l){C(this.series,
function(b,e){c=[];if(!(g&&!1===b.visible||!1===b.takeOrdinalPosition&&!l)&&(d=d.concat(b.processedXData),a=d.length,d.sort(function(b,h){return b-h}),u=Math.min(u,n(b.closestPointRange,u)),a)){for(e=0;e<a-1;)d[e]!==d[e+1]&&c.push(d[e+1]),e++;c[0]!==d[0]&&c.unshift(d[0]);d=c}b.isSeriesBoosting&&(v=!0)});v&&(d.length=0);a=d.length;if(2<a){b=d[1]-d[0];for(e=a-1;e--&&!k;)d[e+1]-d[e]!==b&&(k=!0);!this.options.keepOrdinalPadding&&(d[0]-r>b||m-d[d.length-1]>b)&&(k=!0)}else this.options.overscroll&&(2===
a?u=d[1]-d[0]:1===a?(u=this.options.overscroll,d=[d[0],d[0]+u]):u=this.overscrollPointsRange);k?(this.options.overscroll&&(this.overscrollPointsRange=u,d=d.concat(this.getOverscrollPositions())),this.ordinalPositions=d,b=this.ordinal2lin(Math.max(r,d[0]),!0),e=Math.max(this.ordinal2lin(Math.min(m,d[d.length-1]),!0),1),this.ordinalSlope=m=(m-r)/(e-b),this.ordinalOffset=r-b*m):(this.overscrollPointsRange=n(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=
void 0)}this.isOrdinal=f&&k;this.groupIntervalFactor=null},val2lin:function(a,d){var c=this.ordinalPositions;if(c){var k=c.length,b,f;for(b=k;b--;)if(c[b]===a){f=b;break}for(b=k-1;b--;)if(a>c[b]||0===b){a=(a-c[b])/(c[b+1]-c[b]);f=b+a;break}d=d?f:this.ordinalSlope*(f||0)+this.ordinalOffset}else d=a;return d},lin2val:function(a,d){var c=this.ordinalPositions;if(c){var k=this.ordinalSlope,b=this.ordinalOffset,f=c.length-1,r;if(d)0>a?a=c[0]:a>f?a=c[f]:(f=Math.floor(a),r=a-f);else for(;f--;)if(d=k*f+b,
a>=d){k=k*(f+1)+b;r=(a-d)/(k-d);break}return void 0!==r&&void 0!==c[f]?c[f]+(r?r*(c[f+1]-c[f]):0):a}return a},getExtendedPositions:function(){var a=this,d=a.chart,c=a.series[0].currentDataGrouping,k=a.ordinalIndex,b=c?c.count+c.unitName:"raw",f=a.options.overscroll,r=a.getExtremes(),m,e;k||(k=a.ordinalIndex={});k[b]||(m={series:[],chart:d,getExtremes:function(){return{min:r.dataMin,max:r.dataMax+f}},options:{ordinal:!0},val2lin:q.prototype.val2lin,ordinal2lin:q.prototype.ordinal2lin},C(a.series,function(b){e=
{xAxis:m,xData:b.xData.slice(),chart:d,destroyGroupedData:A};e.xData=e.xData.concat(a.getOverscrollPositions());e.options={dataGrouping:c?{enabled:!0,forced:!0,approximation:"open",units:[[c.unitName,[c.count]]]}:{enabled:!1}};b.processData.apply(e);m.series.push(e)}),a.beforeSetTickPositions.apply(m),k[b]=m.ordinalPositions);return k[b]},getOverscrollPositions:function(){var F=this.options.overscroll,d=this.overscrollPointsRange,c=[],k=this.dataMax;if(a.defined(d))for(c.push(k);k<=this.dataMax+F;)k+=
d,c.push(k);return c},getGroupIntervalFactor:function(a,d,c){var k;c=c.processedXData;var b=c.length,f=[];k=this.groupIntervalFactor;if(!k){for(k=0;k<b-1;k++)f[k]=c[k+1]-c[k];f.sort(function(b,a){return b-a});f=f[Math.floor(b/2)];a=Math.max(a,c[0]);d=Math.min(d,c[b-1]);this.groupIntervalFactor=k=b*f/(d-a)}return k},postProcessTickInterval:function(a){var d=this.ordinalSlope;return d?this.options.breaks?this.closestPointRange||a:a/(d/this.closestPointRange):a}});q.prototype.ordinal2lin=q.prototype.val2lin;
x(D.prototype,"pan",function(a,d){var c=this.xAxis[0],k=c.options.overscroll,b=d.chartX,f=!1;if(c.options.ordinal&&c.series.length){var r=this.mouseDownX,m=c.getExtremes(),e=m.dataMax,l=m.min,u=m.max,g=this.hoverPoints,v=c.closestPointRange||c.overscrollPointsRange,r=(r-b)/(c.translationSlope*(c.ordinalSlope||v)),J={ordinalPositions:c.getExtendedPositions()},v=c.lin2val,O=c.val2lin,H;J.ordinalPositions?1<Math.abs(r)&&(g&&C(g,function(b){b.setState()}),0>r?(g=J,H=c.ordinalPositions?c:J):(g=c.ordinalPositions?
c:J,H=J),J=H.ordinalPositions,e>J[J.length-1]&&J.push(e),this.fixedRange=u-l,r=c.toFixedRange(null,null,v.apply(g,[O.apply(g,[l,!0])+r,!0]),v.apply(H,[O.apply(H,[u,!0])+r,!0])),r.min>=Math.min(m.dataMin,l)&&r.max<=Math.max(e,u)+k&&c.setExtremes(r.min,r.max,!0,!1,{trigger:"pan"}),this.mouseDownX=b,p(this.container,{cursor:"move"})):f=!0}else f=!0;f&&(k&&(c.max=c.dataMax+k),a.apply(this,Array.prototype.slice.call(arguments,1)))})})(K);(function(a){function B(){return Array.prototype.slice.call(arguments,
1)}function q(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,p(this.pointArrayMap,["y"]))}var D=a.addEvent,p=a.pick,G=a.wrap,C=a.each,z=a.extend,A=a.isArray,n=a.fireEvent,y=a.Axis,x=a.Series;z(y.prototype,{isInBreak:function(a,d){var c=a.repeat||Infinity,k=a.from,b=a.to-a.from;d=d>=k?(d-k)%c:c-(k-d)%c;return a.inclusive?d<=b:d<b&&0!==d},isInAnyBreak:function(a,d){var c=this.options.breaks,k=c&&c.length,b,f,r;if(k){for(;k--;)this.isInBreak(c[k],a)&&(b=!0,f||(f=p(c[k].showPoints,
this.isXAxis?!1:!0)));r=b&&d?b&&!f:b}return r}});D(y,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});D(y,"afterSetTickPositions",function(){if(this.isBroken){var a=this.tickPositions,d=this.tickPositions.info,c=[],k;for(k=0;k<a.length;k++)this.isInAnyBreak(a[k])||c.push(a[k]);this.tickPositions=c;this.tickPositions.info=d}});D(y,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});y.prototype.setBreaks=function(a,d){function c(a){var f=
a,e,l;for(l=0;l<b.breakArray.length;l++)if(e=b.breakArray[l],e.to<=a)f-=e.len;else if(e.from>=a)break;else if(b.isInBreak(e,a)){f-=a-e.from;break}return f}function k(a){var f,e;for(e=0;e<b.breakArray.length&&!(f=b.breakArray[e],f.from>=a);e++)f.to<a?a+=f.len:b.isInBreak(f,a)&&(a+=f.len);return a}var b=this,f=A(a)&&!!a.length;b.isDirty=b.isBroken!==f;b.isBroken=f;b.options.breaks=b.userOptions.breaks=a;b.forceRedraw=!0;f||b.val2lin!==c||(delete b.val2lin,delete b.lin2val);f&&(b.userOptions.ordinal=
!1,b.val2lin=c,b.lin2val=k,b.setExtremes=function(b,a,e,f,u){if(this.isBroken){for(;this.isInAnyBreak(b);)b-=this.closestPointRange;for(;this.isInAnyBreak(a);)a-=this.closestPointRange}y.prototype.setExtremes.call(this,b,a,e,f,u)},b.setAxisTranslation=function(a){y.prototype.setAxisTranslation.call(this,a);this.unitLength=null;if(this.isBroken){a=b.options.breaks;var f=[],e=[],l=0,u,g,v=b.userMin||b.min,c=b.userMax||b.max,d=p(b.pointRangePadding,0),r,h;C(a,function(h){g=h.repeat||Infinity;b.isInBreak(h,
v)&&(v+=h.to%g-v%g);b.isInBreak(h,c)&&(c-=c%g-h.from%g)});C(a,function(b){r=b.from;for(g=b.repeat||Infinity;r-g>v;)r-=g;for(;r<v;)r+=g;for(h=r;h<c;h+=g)f.push({value:h,move:"in"}),f.push({value:h+(b.to-b.from),move:"out",size:b.breakSize})});f.sort(function(b,h){return b.value===h.value?("in"===b.move?0:1)-("in"===h.move?0:1):b.value-h.value});u=0;r=v;C(f,function(b){u+="in"===b.move?1:-1;1===u&&"in"===b.move&&(r=b.value);0===u&&(e.push({from:r,to:b.value,len:b.value-r-(b.size||0)}),l+=b.value-r-
(b.size||0))});b.breakArray=e;b.unitLength=c-v-l+d;n(b,"afterBreaks");b.staticScale?b.transA=b.staticScale:b.unitLength&&(b.transA*=(c-b.min+d)/b.unitLength);d&&(b.minPixelPadding=b.transA*b.minPointOffset);b.min=v;b.max=c}});p(d,!0)&&this.chart.redraw()};G(x.prototype,"generatePoints",function(a){a.apply(this,B(arguments));var d=this.xAxis,c=this.yAxis,k=this.points,b,f=k.length,r=this.options.connectNulls,m;if(d&&c&&(d.options.breaks||c.options.breaks))for(;f--;)b=k[f],m=null===b.y&&!1===r,m||!d.isInAnyBreak(b.x,
!0)&&!c.isInAnyBreak(b.y,!0)||(k.splice(f,1),this.data[f]&&this.data[f].destroyElements())});a.Series.prototype.drawBreaks=function(a,d){var c=this,k=c.points,b,f,r,m;a&&C(d,function(e){b=a.breakArray||[];f=a.isXAxis?a.min:p(c.options.threshold,a.min);C(k,function(l){m=p(l["stack"+e.toUpperCase()],l[e]);C(b,function(b){r=!1;if(f<b.from&&m>b.to||f>b.from&&m<b.from)r="pointBreak";else if(f<b.from&&m>b.from&&m<b.to||f>b.from&&m>b.to&&m<b.from)r="pointInBreak";r&&n(a,r,{point:l,brk:b})})})})};a.Series.prototype.gappedPath=
function(){var n=this.currentDataGrouping,d=n&&n.totalRange,n=this.options.gapSize,c=this.points.slice(),k=c.length-1,b=this.yAxis;if(n&&0<k)for("value"!==this.options.gapUnit&&(n*=this.closestPointRange),d&&d>n&&(n=d);k--;)c[k+1].x-c[k].x>n&&(d=(c[k].x+c[k+1].x)/2,c.splice(k+1,0,{isNull:!0,x:d}),this.options.stacking&&(d=b.stacks[this.stackKey][d]=new a.StackItem(b,b.options.stackLabels,!1,d,this.stack),d.total=0));return this.getGraphPath(c)};G(a.seriesTypes.column.prototype,"drawPoints",q);G(a.Series.prototype,
"drawPoints",q)})(K);(function(a){var B=a.addEvent,q=a.arrayMax,D=a.arrayMin,p=a.Axis,G=a.defaultPlotOptions,C=a.defined,z=a.each,A=a.extend,n=a.format,y=a.isNumber,x=a.merge,F=a.pick,d=a.Point,c=a.Series,k=a.Tooltip,b=a.wrap,f=c.prototype,r=f.processData,m=f.generatePoints,e={approximation:"average",groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M",
"%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},l={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",groupPixelWidth:10},arearange:{approximation:"range"},areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",
groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},u=a.defaultDataGroupingUnits=[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]],g=a.approximations={sum:function(b){var a=b.length,e;if(!a&&b.hasNulls)e=null;else if(a)for(e=0;a--;)e+=b[a];return e},average:function(b){var a=b.length;b=g.sum(b);y(b)&&a&&(b/=a);return b},averages:function(){var b=
[];z(arguments,function(a){b.push(g.average(a))});return void 0===b[0]?void 0:b},open:function(b){return b.length?b[0]:b.hasNulls?null:void 0},high:function(b){return b.length?q(b):b.hasNulls?null:void 0},low:function(b){return b.length?D(b):b.hasNulls?null:void 0},close:function(b){return b.length?b[b.length-1]:b.hasNulls?null:void 0},ohlc:function(b,a,e,f){b=g.open(b);a=g.high(a);e=g.low(e);f=g.close(f);if(y(b)||y(a)||y(e)||y(f))return[b,a,e,f]},range:function(b,a){b=g.low(b);a=g.high(a);if(y(b)||
y(a))return[b,a];if(null===b&&null===a)return null}};f.groupData=function(b,a,f,c){var h=this,t=h.data,w=h.options.data,v=[],I=[],u=[],d=b.length,E,r,m=!!a,k=[];c="function"===typeof c?c:g[c]||l[h.type]&&g[l[h.type].approximation]||g[e.approximation];var J=h.pointArrayMap,n=J&&J.length,O=["x"].concat(J||["y"]),H=0,q=0,G,p;n?z(J,function(){k.push([])}):k.push([]);G=n||1;for(p=0;p<=d&&!(b[p]>=f[0]);p++);for(p;p<=d;p++){for(;void 0!==f[H+1]&&b[p]>=f[H+1]||p===d;){E=f[H];h.dataGroupInfo={start:q,length:k[0].length};
r=c.apply(h,k);C(h.dataGroupInfo.options)||(h.dataGroupInfo.options=x(h.pointClass.prototype.optionsToObject.call({series:h},h.options.data[q])),z(O,function(b){delete h.dataGroupInfo.options[b]}));void 0!==r&&(v.push(E),I.push(r),u.push(h.dataGroupInfo));q=p;for(E=0;E<G;E++)k[E].length=0,k[E].hasNulls=!1;H+=1;if(p===d)break}if(p===d)break;if(J){E=h.cropStart+p;r=t&&t[E]||h.pointClass.prototype.applyOptions.apply({series:h},[w[E]]);var A;for(E=0;E<n;E++)A=r[J[E]],y(A)?k[E].push(A):null===A&&(k[E].hasNulls=
!0)}else E=m?a[p]:null,y(E)?k[0].push(E):null===E&&(k[0].hasNulls=!0)}return[v,I,u]};f.processData=function(){var b=this.chart,a=this.options.dataGrouping,e=!1!==this.allowDG&&a&&F(a.enabled,b.options.isStock),g=this.visible||!b.options.chart.ignoreHiddenSeries,h,t=this.currentDataGrouping,w;this.forceCrop=e;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==r.apply(this,arguments)&&e){this.destroyGroupedData();var l,I=a.groupAll?this.xData:this.processedXData,c=a.groupAll?this.yData:this.processedYData,
d=b.plotSizeX,b=this.xAxis,E=b.options.ordinal,m=this.groupPixelWidth=b.getGroupPixelWidth&&b.getGroupPixelWidth();if(m){this.isDirty=h=!0;this.points=null;e=b.getExtremes();w=e.min;e=e.max;E=E&&b.getGroupIntervalFactor(w,e,this)||1;m=m*(e-w)/d*E;d=b.getTimeTicks(b.normalizeTimeTickInterval(m,a.units||u),Math.min(w,I[0]),Math.max(e,I[I.length-1]),b.options.startOfWeek,I,this.closestPointRange);c=f.groupData.apply(this,[I,c,d,a.approximation]);I=c[0];E=c[1];if(a.smoothed&&I.length){l=I.length-1;for(I[l]=
Math.min(I[l],e);l--&&0<l;)I[l]+=m/2;I[0]=Math.max(I[0],w)}w=d.info;this.closestPointRange=d.info.totalRange;this.groupMap=c[2];if(C(I[0])&&I[0]<b.dataMin&&g){if(!C(b.options.min)&&b.min<=b.dataMin||b.min===b.dataMin)b.min=I[0];b.dataMin=I[0]}a.groupAll&&(a=this.cropData(I,E,b.min,b.max,1),I=a.xData,E=a.yData);this.processedXData=I;this.processedYData=E}else this.groupMap=null;this.hasGroupedData=h;this.currentDataGrouping=w;this.preventGraphAnimation=(t&&t.totalRange)!==(w&&w.totalRange)}};f.destroyGroupedData=
function(){var b=this.groupedData;z(b||[],function(a,e){a&&(b[e]=a.destroy?a.destroy():null)});this.groupedData=null};f.generatePoints=function(){m.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};B(d,"update",function(){if(this.dataGroup)return a.error(24),!1});b(k.prototype,"tooltipFooterHeaderFormatter",function(b,a,e){var f=this.chart.time,h=a.series,t=h.tooltipOptions,w=h.options.dataGrouping,g=t.xDateFormat,l,c=h.xAxis;return c&&"datetime"===c.options.type&&
w&&y(a.key)?(b=h.currentDataGrouping,w=w.dateTimeLabelFormats,b?(c=w[b.unitName],1===b.count?g=c[0]:(g=c[1],l=c[2])):!g&&w&&(g=this.getXDateFormat(a,t,c)),g=f.dateFormat(g,a.key),l&&(g+=f.dateFormat(l,a.key+b.totalRange-1)),n(t[(e?"footer":"header")+"Format"],{point:A(a.point,{key:g}),series:h},f)):b.call(this,a,e)});B(c,"destroy",f.destroyGroupedData);B(c,"afterSetOptions",function(b){b=b.options;var a=this.type,f=this.chart.options.plotOptions,g=G[a].dataGrouping,h=this.useCommonDataGrouping&&e;
if(l[a]||h)g||(g=x(e,l[a])),b.dataGrouping=x(h,g,f.series&&f.series.dataGrouping,f[a].dataGrouping,this.userOptions.dataGrouping);this.chart.options.isStock&&(this.requireSorting=!0)});B(p,"afterSetScale",function(){z(this.series,function(b){b.hasProcessed=!1})});p.prototype.getGroupPixelWidth=function(){var b=this.series,a=b.length,e,f=0,h=!1,t;for(e=a;e--;)(t=b[e].options.dataGrouping)&&(f=Math.max(f,t.groupPixelWidth));for(e=a;e--;)(t=b[e].options.dataGrouping)&&b[e].hasProcessed&&(a=(b[e].processedXData||
b[e].data).length,b[e].groupPixelWidth||a>this.chart.plotSizeX/f||a&&t.forced)&&(h=!0);return h?f:0};p.prototype.setDataGrouping=function(b,a){var e;a=F(a,!0);b||(b={forced:!1,units:null});if(this instanceof p)for(e=this.series.length;e--;)this.series[e].update({dataGrouping:b},!1);else z(this.chart.options.series,function(a){a.dataGrouping=b},!1);this.ordinalSlope=null;a&&this.chart.redraw()}})(K);(function(a){var B=a.each,q=a.Point,D=a.seriesType,p=a.seriesTypes;D("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eOpen: {point.open}\x3cbr/\x3eHigh: {point.high}\x3cbr/\x3eLow: {point.low}\x3cbr/\x3eClose: {point.close}\x3cbr/\x3e'},
threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},init:function(){p.column.prototype.init.apply(this,arguments);this.options.stacking=!1},pointAttribs:function(a,q){q=p.column.prototype.pointAttribs.call(this,a,q);var z=this.options;delete q.fill;!a.options.color&&z.upColor&&a.open<a.close&&
(q.stroke=z.upColor);return q},translate:function(){var a=this,q=a.yAxis,z=!!a.modifyValue,A=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];p.column.prototype.translate.apply(a);B(a.points,function(n){B([n.open,n.high,n.low,n.close,n.low],function(p,x){null!==p&&(z&&(p=a.modifyValue(p)),n[A[x]]=q.toPixels(p,!0))});n.tooltipPos[1]=n.plotHigh+q.pos-a.chart.plotTop})},drawPoints:function(){var a=this,q=a.chart;B(a.points,function(p){var A,n,y,x,C=p.graphic,d,c=!C;void 0!==p.plotY&&(C||(p.graphic=
C=q.renderer.path().add(a.group)),C.attr(a.pointAttribs(p,p.selected&&"select")),n=C.strokeWidth()%2/2,d=Math.round(p.plotX)-n,y=Math.round(p.shapeArgs.width/2),x=["M",d,Math.round(p.yBottom),"L",d,Math.round(p.plotHigh)],null!==p.open&&(A=Math.round(p.plotOpen)+n,x.push("M",d,A,"L",d-y,A)),null!==p.close&&(A=Math.round(p.plotClose)+n,x.push("M",d,A,"L",d+y,A)),C[c?"attr":"animate"]({d:x}).addClass(p.getClassName(),!0))})},animate:null},{getClassName:function(){return q.prototype.getClassName.call(this)+
(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(K);(function(a){var B=a.defaultPlotOptions,q=a.each,D=a.merge,p=a.seriesType,G=a.seriesTypes;p("candlestick","ohlc",D(B.column,{states:{hover:{lineWidth:2}},tooltip:B.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),{pointAttribs:function(a,p){var q=G.column.prototype.pointAttribs.call(this,a,p),n=this.options,y=a.open<a.close,x=n.lineColor||this.color;q["stroke-width"]=n.lineWidth;
q.fill=a.options.color||(y?n.upColor||this.color:this.color);q.stroke=a.lineColor||(y?n.upLineColor||x:x);p&&(a=n.states[p],q.fill=a.color||q.fill,q.stroke=a.lineColor||q.stroke,q["stroke-width"]=a.lineWidth||q["stroke-width"]);return q},drawPoints:function(){var a=this,p=a.chart,A=a.yAxis.reversed;q(a.points,function(n){var q=n.graphic,x,z,d,c,k,b,f,r=!q;void 0!==n.plotY&&(q||(n.graphic=q=p.renderer.path().add(a.group)),q.attr(a.pointAttribs(n,n.selected&&"select")).shadow(a.options.shadow),k=q.strokeWidth()%
2/2,b=Math.round(n.plotX)-k,x=n.plotOpen,z=n.plotClose,d=Math.min(x,z),x=Math.max(x,z),f=Math.round(n.shapeArgs.width/2),z=A?x!==n.yBottom:Math.round(d)!==Math.round(n.plotHigh),c=A?Math.round(d)!==Math.round(n.plotHigh):x!==n.yBottom,d=Math.round(d)+k,x=Math.round(x)+k,k=[],k.push("M",b-f,x,"L",b-f,d,"L",b+f,d,"L",b+f,x,"Z","M",b,d,"L",b,z?Math.round(A?n.yBottom:n.plotHigh):d,"M",b,x,"L",b,c?Math.round(A?n.plotHigh:n.yBottom):x),q[r?"attr":"animate"]({d:k}).addClass(n.getClassName(),!0))})}})})(K);
var X=function(a){var B=a.each,q=a.defined,D=a.seriesTypes,p=a.stableSort;return{getPlotBox:function(){return a.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){D.column.prototype.translate.apply(this);var a=this.options,C=this.chart,z=this.points,A=z.length-1,n,y,x=a.onSeries,x=x&&C.get(x),a=a.onKey||"y",F=x&&x.options.step,d=x&&x.points,c=d&&d.length,k=C.inverted,b=this.xAxis,f=this.yAxis,r=0,m,e,l,u;if(x&&x.visible&&c)for(r=
(x.pointXOffset||0)+(x.barW||0)/2,n=x.currentDataGrouping,e=d[c-1].x+(n?n.totalRange:0),p(z,function(b,a){return b.x-a.x}),a="plot"+a[0].toUpperCase()+a.substr(1);c--&&z[A]&&!(m=d[c],n=z[A],n.y=m.y,m.x<=n.x&&void 0!==m[a]&&(n.x<=e&&(n.plotY=m[a],m.x<n.x&&!F&&(l=d[c+1])&&void 0!==l[a]&&(u=(n.x-m.x)/(l.x-m.x),n.plotY+=u*(l[a]-m[a]),n.y+=u*(l.y-m.y))),A--,c++,0>A)););B(z,function(a,e){var g;a.plotX+=r;if(void 0===a.plotY||k)0<=a.plotX&&a.plotX<=b.len?k?(a.plotY=b.translate(a.x,0,1,0,1),a.plotX=q(a.y)?
f.translate(a.y,0,0,0,1):0):a.plotY=C.chartHeight-b.bottom-(b.opposite?b.height:0)+b.offset-f.top:a.shapeArgs={};(y=z[e-1])&&y.plotX===a.plotX&&(void 0===y.stackIndex&&(y.stackIndex=0),g=y.stackIndex+1);a.stackIndex=g});this.onSeries=x}}}(K);(function(a,B){function q(a){F[a+"pin"]=function(c,d,b,f,r){var m=r&&r.anchorX;r=r&&r.anchorY;"circle"===a&&f>b&&(c-=Math.round((f-b)/2),b=f);c=F[a](c,d,b,f);m&&r&&(c.push("M","circle"===a?c[1]-c[4]:c[1]+c[4]/2,d>r?d:d+f,"L",m,r),c=c.concat(F.circle(m-1,r-1,2,
2)));return c}}var D=a.addEvent,p=a.each,G=a.merge,C=a.noop,z=a.Renderer,A=a.Series,n=a.seriesType,y=a.TrackerMixin,x=a.VMLRenderer,F=a.SVGRenderer.prototype.symbols;n("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,
takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:A.prototype.init,pointAttribs:function(a,c){var d=this.options,b=a&&a.color||this.color,f=d.lineColor,r=a&&a.lineWidth;a=a&&a.fillColor||d.fillColor;c&&(a=d.states[c].fillColor,f=d.states[c].lineColor,r=d.states[c].lineWidth);return{fill:a||b,stroke:f||b,"stroke-width":r||d.lineWidth||0}},translate:B.translate,getPlotBox:B.getPlotBox,drawPoints:function(){var d=this.points,c=this.chart,k=c.renderer,b,f,r=c.inverted,m=this.options,
e=m.y,l,u,g,v,n,q,H=this.yAxis,h={},t=[];for(u=d.length;u--;)g=d[u],q=(r?g.plotY:g.plotX)>this.xAxis.len,b=g.plotX,v=g.stackIndex,l=g.options.shape||m.shape,f=g.plotY,void 0!==f&&(f=g.plotY+e-(void 0!==v&&v*m.stackDistance)),g.anchorX=v?void 0:g.plotX,n=v?void 0:g.plotY,v=g.graphic,void 0!==f&&0<=b&&!q?(v||(v=g.graphic=k.label("",null,null,l,null,null,m.useHTML).attr(this.pointAttribs(g)).css(G(m.style,g.style)).attr({align:"flag"===l?"left":"center",width:m.width,height:m.height,"text-align":m.textAlign}).addClass("highcharts-point").add(this.markerGroup),
g.graphic.div&&(g.graphic.div.point=g),v.shadow(m.shadow),v.isNew=!0),0<b&&(b-=v.strokeWidth()%2),l={y:f,anchorY:n},m.allowOverlapX&&(l.x=b,l.anchorX=g.anchorX),v.attr({text:g.options.title||m.title||"A"})[v.isNew?"attr":"animate"](l),m.allowOverlapX||(h[g.plotX]?h[g.plotX].size=Math.max(h[g.plotX].size,v.width):h[g.plotX]={align:0,size:v.width,target:b,anchorX:b}),g.tooltipPos=[b,f+H.pos-c.plotTop]):v&&(g.graphic=v.destroy());m.allowOverlapX||(a.objectEach(h,function(b){b.plotX=b.anchorX;t.push(b)}),
a.distribute(t,r?H.len:this.xAxis.len,100),p(d,function(b){var a=b.graphic&&h[b.plotX];a&&(b.graphic[b.graphic.isNew?"attr":"animate"]({x:a.pos,anchorX:b.anchorX}),a.pos?b.graphic.isNew=!1:(b.graphic.attr({x:-9999,anchorX:-9999}),b.graphic.isNew=!0))}));m.useHTML&&a.wrap(this.markerGroup,"on",function(b){return a.SVGElement.prototype.on.apply(b.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;y.drawTrackerPoint.apply(this);p(a,function(c){var d=
c.graphic;d&&D(d.element,"mouseover",function(){0<c.stackIndex&&!c.raised&&(c._y=d.y,d.attr({y:c._y-8}),c.raised=!0);p(a,function(b){b!==c&&b.raised&&b.graphic&&(b.graphic.attr({y:b._y}),b.raised=!1)})})})},animate:function(a){a?this.setClip():this.animate=null},setClip:function(){A.prototype.setClip.apply(this,arguments);!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},buildKDTree:C,invertGroups:C});F.flag=function(a,c,k,b,f){var d=f&&f.anchorX||
a;f=f&&f.anchorY||c;return F.circle(d-1,f-1,2,2).concat(["M",d,f,"L",a,c+b,a,c,a+k,c,a+k,c+b,a,c+b,"Z"])};q("circle");q("square");z===x&&p(["flag","circlepin","squarepin"],function(a){x.prototype.symbols[a]=F[a]})})(K,X);(function(a){function B(b,a,c){this.init(b,a,c)}var q=a.addEvent,D=a.Axis,p=a.correctFloat,G=a.defaultOptions,C=a.defined,z=a.destroyObjectProperties,A=a.each,n=a.fireEvent,y=a.hasTouch,x=a.merge,F=a.pick,d=a.removeEvent,c,k={height:a.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,
liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};G.scrollbar=x(!0,k,G.scrollbar);a.swapXY=c=function(b,a){var f=b.length,c;if(a)for(a=0;a<f;a+=3)c=b[a+1],b[a+1]=b[a+2],b[a+2]=c;return b};B.prototype={init:function(b,a,
c){this.scrollbarButtons=[];this.renderer=b;this.userOptions=a;this.options=x(k,a);this.chart=c;this.size=F(this.options.size,this.options.height);a.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var b=this.renderer,a=this.options,d=this.size,m;this.group=m=b.g("scrollbar").attr({zIndex:a.zIndex,translateY:-99999}).add();this.track=b.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:a.trackBorderRadius||0,height:d,width:d}).add(m);this.track.attr({fill:a.trackBackgroundColor,
stroke:a.trackBorderColor,"stroke-width":a.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=b.g().add(m);this.scrollbar=b.rect().addClass("highcharts-scrollbar-thumb").attr({height:d,width:d,r:a.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=b.path(c(["M",-3,d/4,"L",-3,2*d/3,"M",0,d/4,"L",0,2*d/3,"M",3,d/4,"L",3,2*d/3],a.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);
this.scrollbar.attr({fill:a.barBackgroundColor,stroke:a.barBorderColor,"stroke-width":a.barBorderWidth});this.scrollbarRifles.attr({stroke:a.rifleColor,"stroke-width":1});this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(b,a,c,d){var e=this.options.vertical,f=0,u=this.rendered?"animate":"attr";this.x=b;this.y=a+this.trackBorderWidth;
this.width=c;this.xOffset=this.height=d;this.yOffset=f;e?(this.width=this.yOffset=c=f=this.size,this.xOffset=a=0,this.barWidth=d-2*c,this.x=b+=this.options.margin):(this.height=this.xOffset=d=a=this.size,this.barWidth=c-2*d,this.y+=this.options.margin);this.group[u]({translateX:b,translateY:this.y});this.track[u]({width:c,height:d});this.scrollbarButtons[1][u]({translateX:e?0:c-a,translateY:e?d-f:0})},drawScrollbarButton:function(b){var a=this.renderer,d=this.scrollbarButtons,m=this.options,e=this.size,
l;l=a.g().add(this.group);d.push(l);l=a.rect().addClass("highcharts-scrollbar-button").add(l);l.attr({stroke:m.buttonBorderColor,"stroke-width":m.buttonBorderWidth,fill:m.buttonBackgroundColor});l.attr(l.crisp({x:-.5,y:-.5,width:e+1,height:e+1,r:m.buttonBorderRadius},l.strokeWidth()));l=a.path(c(["M",e/2+(b?-1:1),e/2-3,"L",e/2+(b?-1:1),e/2+3,"L",e/2+(b?2:-2),e/2],m.vertical)).addClass("highcharts-scrollbar-arrow").add(d[b]);l.attr({fill:m.buttonArrowColor})},setRange:function(b,a){var f=this.options,
c=f.vertical,e=f.minWidth,l=this.barWidth,d,g,v=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";C(l)&&(b=Math.max(b,0),d=Math.ceil(l*b),this.calculatedWidth=g=p(l*Math.min(a,1)-d),g<e&&(d=(l-e+g)*b,g=e),e=Math.floor(d+this.xOffset+this.yOffset),l=g/2-.5,this.from=b,this.to=a,c?(this.scrollbarGroup[v]({translateY:e}),this.scrollbar[v]({height:g}),this.scrollbarRifles[v]({translateY:l}),this.scrollbarTop=e,this.scrollbarLeft=0):(this.scrollbarGroup[v]({translateX:e}),
this.scrollbar[v]({width:g}),this.scrollbarRifles[v]({translateX:l}),this.scrollbarLeft=e,this.scrollbarTop=0),12>=g?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===f.showFull&&(0>=b&&1<=a?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var b=this;b.mouseMoveHandler=function(a){var f=b.chart.pointer.normalize(a),c=b.options.vertical?"chartY":"chartX",e=b.initPositions;!b.grabbedCenter||a.touches&&0===a.touches[0][c]||(f=b.cursorToScrollbarPosition(f)[c],
c=b[c],c=f-c,b.hasDragged=!0,b.updatePosition(e[0]+c,e[1]+c),b.hasDragged&&n(b,"changed",{from:b.from,to:b.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a}))};b.mouseUpHandler=function(a){b.hasDragged&&n(b,"changed",{from:b.from,to:b.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a});b.grabbedCenter=b.hasDragged=b.chartX=b.chartY=null};b.mouseDownHandler=function(a){a=b.chart.pointer.normalize(a);a=b.cursorToScrollbarPosition(a);b.chartX=a.chartX;b.chartY=a.chartY;b.initPositions=[b.from,b.to];b.grabbedCenter=
!0};b.buttonToMinClick=function(a){var c=p(b.to-b.from)*b.options.step;b.updatePosition(p(b.from-c),p(b.to-c));n(b,"changed",{from:b.from,to:b.to,trigger:"scrollbar",DOMEvent:a})};b.buttonToMaxClick=function(a){var c=(b.to-b.from)*b.options.step;b.updatePosition(b.from+c,b.to+c);n(b,"changed",{from:b.from,to:b.to,trigger:"scrollbar",DOMEvent:a})};b.trackClick=function(a){var c=b.chart.pointer.normalize(a),f=b.to-b.from,e=b.y+b.scrollbarTop,d=b.x+b.scrollbarLeft;b.options.vertical&&c.chartY>e||!b.options.vertical&&
c.chartX>d?b.updatePosition(b.from+f,b.to+f):b.updatePosition(b.from-f,b.to-f);n(b,"changed",{from:b.from,to:b.to,trigger:"scrollbar",DOMEvent:a})}},cursorToScrollbarPosition:function(b){var a=this.options,a=a.minWidth>this.calculatedWidth?a.minWidth:0;return{chartX:(b.chartX-this.x-this.xOffset)/(this.barWidth-a),chartY:(b.chartY-this.y-this.yOffset)/(this.barWidth-a)}},updatePosition:function(a,c){1<c&&(a=p(1-p(c-a)),c=1);0>a&&(c=p(c-a),a=0);this.from=a;this.to=c},update:function(a){this.destroy();
this.init(this.chart.renderer,x(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],c=this.scrollbarButtons,d=this.scrollbarGroup.element,k=this.mouseDownHandler,e=this.mouseMoveHandler,l=this.mouseUpHandler,a=[[c[a[0]].element,"click",this.buttonToMinClick],[c[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[d,"mousedown",k],[d.ownerDocument,"mousemove",e],[d.ownerDocument,"mouseup",l]];y&&a.push([d,"touchstart",k],
[d.ownerDocument,"touchmove",e],[d.ownerDocument,"touchend",l]);A(a,function(a){q.apply(null,a)});this._events=a},removeEvents:function(){A(this._events,function(a){d.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();A(["track","scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,z(a.scrollbarButtons))}};q(D,"afterInit",function(){var a=
this;a.options&&a.options.scrollbar&&a.options.scrollbar.enabled&&(a.options.scrollbar.vertical=!a.horiz,a.options.startOnTick=a.options.endOnTick=!1,a.scrollbar=new B(a.chart.renderer,a.options.scrollbar,a.chart),q(a.scrollbar,"changed",function(b){var c=Math.min(F(a.options.min,a.min),a.min,a.dataMin),d=Math.max(F(a.options.max,a.max),a.max,a.dataMax)-c,e;a.horiz&&!a.reversed||!a.horiz&&a.reversed?(e=c+d*this.to,c+=d*this.from):(e=c+d*(1-this.from),c+=d*(1-this.to));a.setExtremes(c,e,!0,!1,b)}))});
q(D,"afterRender",function(){var a=Math.min(F(this.options.min,this.min),this.min,F(this.dataMin,this.min)),c=Math.max(F(this.options.max,this.max),this.max,F(this.dataMax,this.max)),d=this.scrollbar,k=this.titleOffset||0;if(d){this.horiz?(d.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:k+this.axisTitleMargin+this.offset),this.width,this.height),k=1):(d.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?k+this.axisTitleMargin+
this.offset:0),this.top,this.width,this.height),k=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[k]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(a)||isNaN(c)||!C(this.min)||!C(this.max)?d.setRange(0,0):(k=(this.min-a)/(c-a),a=(this.max-a)/(c-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?d.setRange(k,a):d.setRange(1-a,1-k))}});q(D,"afterGetOffset",function(){var a=this.horiz?2:1,c=this.scrollbar;c&&(this.chart.scrollbarsOffsets=[0,
0],this.chart.axisOffset[a]+=c.size+c.options.margin)});a.Scrollbar=B})(K);(function(a){function B(a){this.init(a)}var q=a.addEvent,D=a.Axis,p=a.Chart,G=a.color,C=a.defaultOptions,z=a.defined,A=a.destroyObjectProperties,n=a.each,y=a.erase,x=a.error,F=a.extend,d=a.grep,c=a.hasTouch,k=a.isArray,b=a.isNumber,f=a.isObject,r=a.isTouchDevice,m=a.merge,e=a.pick,l=a.removeEvent,u=a.Scrollbar,g=a.Series,v=a.seriesTypes,J=a.wrap,O=[].concat(a.defaultDataGroupingUnits),H=function(a){var h=d(arguments,b);if(h.length)return Math[a].apply(0,
h)};O[4]=["day",[1,2,3,4]];O[5]=["week",[1,2,3]];v=void 0===v.areaspline?"line":"areaspline";F(C,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:G("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:v,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,
units:O},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,
labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});a.Renderer.prototype.symbols["navigator-handle"]=function(a,b,e,c,d){a=d.width/2;b=Math.round(a/3)+.5;d=d.height;return["M",-a-1,.5,"L",a,.5,"L",a,d+.5,"L",-a-1,d+.5,"L",-a-1,.5,"M",-b,4,"L",-b,d-3,"M",b-1,4,"L",b-1,d-3]};B.prototype={drawHandle:function(a,b,e,c){var h=this.navigatorOptions.handles.height;this.handles[b][c](e?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+
.5-h)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-h/2-1)})},drawOutline:function(a,b,e,c){var h=this.navigatorOptions.maskInside,t=this.outline.strokeWidth(),d=t/2,t=t%2/2,w=this.outlineHeight,g=this.scrollbarHeight,l=this.size,f=this.left-g,u=this.top;e?(f-=d,e=u+b+t,b=u+a+t,a=["M",f+w,u-g-t,"L",f+w,e,"L",f,e,"L",f,b,"L",f+w,b,"L",f+w,u+l+g].concat(h?["M",f+w,e-d,"L",f+w,b+d]:[])):(a+=f+g-t,b+=f+g-t,u+=d,a=["M",f,u,"L",a,u,"L",a,u+w,"L",b,u+w,"L",
b,u,"L",f+l+2*g,u].concat(h?["M",a-d,u,"L",b+d,u]:[]));this.outline[c]({d:a})},drawMasks:function(a,b,e,c){var h=this.left,t=this.top,d=this.height,w,g,l,f;e?(l=[h,h,h],f=[t,t+a,t+b],g=[d,d,d],w=[a,b-a,this.size-b]):(l=[h,h+a,h+b],f=[t,t,t],g=[a,b-a,this.size-b],w=[d,d,d]);n(this.shades,function(a,b){a[c]({x:l[b],y:f[b],width:g[b],height:w[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,e=b.maskInside,c=a.chart,d=c.inverted,g=c.renderer,l;a.navigatorGroup=l=g.g("navigator").attr({zIndex:8,
visibility:"hidden"}).add();var f={cursor:d?"ns-resize":"ew-resize"};n([!e,e,!e],function(h,e){a.shades[e]=g.rect().addClass("highcharts-navigator-mask"+(1===e?"-inside":"-outside")).attr({fill:h?b.maskFill:"rgba(0,0,0,0)"}).css(1===e&&f).add(l)});a.outline=g.path().addClass("highcharts-navigator-outline").attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor}).add(l);b.handles.enabled&&n([0,1],function(h){b.handles.inverted=c.inverted;a.handles[h]=g.symbol(b.handles.symbols[h],-b.handles.width/
2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[h].attr({zIndex:7-h}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][h]).add(l);var e=b.handles;a.handles[h].attr({fill:e.backgroundColor,stroke:e.borderColor,"stroke-width":e.lineWidth}).css(f)})},update:function(a){n(this.series||[],function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();m(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(h,
t,c,d){var g=this.chart,w,l,f=this.scrollbarHeight,u,k=this.xAxis;w=k.fake?g.xAxis[0]:k;var v=this.navigatorEnabled,M,m=this.rendered;l=g.inverted;var n,q=g.xAxis[0].minRange,p=g.xAxis[0].options.maxRange;if(!this.hasDragged||z(c)){if(!b(h)||!b(t))if(m)c=0,d=e(k.width,w.width);else return;this.left=e(k.left,g.plotLeft+f+(l?g.plotWidth:0));this.size=M=u=e(k.len,(l?g.plotHeight:g.plotWidth)-2*f);g=l?f:u+2*f;c=e(c,k.toPixels(h,!0));d=e(d,k.toPixels(t,!0));b(c)&&Infinity!==Math.abs(c)||(c=0,d=g);h=k.toValue(c,
!0);t=k.toValue(d,!0);n=Math.abs(a.correctFloat(t-h));n<q?this.grabbedLeft?c=k.toPixels(t-q,!0):this.grabbedRight&&(d=k.toPixels(h+q,!0)):z(p)&&n>p&&(this.grabbedLeft?c=k.toPixels(t-p,!0):this.grabbedRight&&(d=k.toPixels(h+p,!0)));this.zoomedMax=Math.min(Math.max(c,d,0),M);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(c,d),0),M);this.range=this.zoomedMax-this.zoomedMin;M=Math.round(this.zoomedMax);c=Math.round(this.zoomedMin);v&&(this.navigatorGroup.attr({visibility:"visible"}),
m=m&&!this.hasDragged?"animate":"attr",this.drawMasks(c,M,l,m),this.drawOutline(c,M,l,m),this.navigatorOptions.handles.enabled&&(this.drawHandle(c,0,l,m),this.drawHandle(M,1,l,m)));this.scrollbar&&(l?(l=this.top-f,w=this.left-f+(v||!w.opposite?0:(w.titleOffset||0)+w.axisTitleMargin),f=u+2*f):(l=this.top+(v?this.height:-f),w=this.left-f),this.scrollbar.position(w,l,g,f),this.scrollbar.setRange(this.zoomedMin/(u||1),this.zoomedMax/(u||1)));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,
e=b.container,d=[],g,l;a.mouseMoveHandler=g=function(b){a.onMouseMove(b)};a.mouseUpHandler=l=function(b){a.onMouseUp(b)};d=a.getPartsEvents("mousedown");d.push(q(e,"mousemove",g),q(e.ownerDocument,"mouseup",l));c&&(d.push(q(e,"touchmove",g),q(e.ownerDocument,"touchend",l)),d.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=d;a.series&&a.series[0]&&d.push(q(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,h=[];
n(["shades","handles"],function(e){n(b[e],function(c,t){h.push(q(c.element,a,function(a){b[e+"Mousedown"](a,t)}))})});return h},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var e=this.chart,h=this.xAxis,c=this.zoomedMin,d=this.left,t=this.size,g=this.range,l=a.chartX,f,u;e.inverted&&(l=a.chartY,d=this.top);1===b?(this.grabbedCenter=l,this.fixedWidth=g,this.dragOffset=l-c):(a=l-d-g/2,0===b?a=Math.max(0,a):2===b&&a+g>=t&&(a=t-g,this.reversedExtremes?(a-=g,u=this.getUnionExtremes().dataMin):
f=this.getUnionExtremes().dataMax),a!==c&&(this.fixedWidth=g,b=h.toFixedRange(a,a+g,u,f),z(b.min)&&e.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart;var e=a.xAxis[0],h=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=h?e.min:e.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=h?e.max:e.min);
a.fixedRange=null},onMouseMove:function(b){var h=this,c=h.chart,d=h.left,g=h.navigatorSize,l=h.range,f=h.dragOffset,u=c.inverted;b.touches&&0===b.touches[0].pageX||(b=c.pointer.normalize(b),c=b.chartX,u&&(d=h.top,c=b.chartY),h.grabbedLeft?(h.hasDragged=!0,h.render(0,0,c-d,h.otherHandlePos)):h.grabbedRight?(h.hasDragged=!0,h.render(0,0,h.otherHandlePos,c-d)):h.grabbedCenter&&(h.hasDragged=!0,c<f?c=f:c>g+f-l&&(c=g+f-l),h.render(0,0,c-f,c-f+l)),h.hasDragged&&h.scrollbar&&e(h.scrollbar.options.liveRedraw,
a.svg&&!r&&!this.chart.isBoosting)&&(b.DOMType=b.type,setTimeout(function(){h.onMouseUp(b)},0)))},onMouseUp:function(a){var b=this.chart,e=this.xAxis,h=this.scrollbar,c,d,g=a.DOMEvent||a;(!this.hasDragged||h&&h.hasDragged)&&"scrollbar"!==a.trigger||(h=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?c=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(d=this.fixedExtreme),this.zoomedMax===this.size&&(d=this.reversedExtremes?h.dataMin:h.dataMax),0===this.zoomedMin&&(c=this.reversedExtremes?
h.dataMax:h.dataMin),e=e.toFixedRange(this.zoomedMin,this.zoomedMax,c,d),z(e.min)&&b.xAxis[0].setExtremes(Math.min(e.min,e.max),Math.max(e.min,e.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:g}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(n(this.eventsToUnbind,function(a){a()}),this.eventsToUnbind=
void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&n(a,function(a){l(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&l(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,h=b.navigator,c=h.enabled,d=b.scrollbar,g=d.enabled,b=c?h.height:0,l=g?d.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=
b;this.scrollbarHeight=l;this.scrollbarEnabled=g;this.navigatorEnabled=c;this.navigatorOptions=h;this.scrollbarOptions=d;this.outlineHeight=b+l;this.opposite=e(h.opposite,!c&&a.inverted);var f=this,c=f.baseSeries,d=a.xAxis.length,g=a.yAxis.length,k=c&&c[0]&&c[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;f.navigatorEnabled?(f.xAxis=new D(a,m({breaks:k.options.breaks,ordinal:k.options.ordinal},h.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:d,isInternal:!0,
offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[l,0,-l,0],width:b}:{offsets:[0,-l,0,l],height:b})),f.yAxis=new D(a,m(h.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:g,isInternal:!0,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),c||h.series.data?f.updateNavigatorSeries(!1):0===a.series.length&&(f.unbindRedraw=q(a,"beforeRedraw",function(){0<a.series.length&&!f.series&&(f.setBaseSeries(),f.unbindRedraw())})),f.reversedExtremes=
a.inverted&&!f.xAxis.reversed||!a.inverted&&f.xAxis.reversed,f.renderElements(),f.addMouseEvents()):f.xAxis={translate:function(b,e){var h=a.xAxis[0],c=h.getExtremes(),d=h.len-2*l,g=H("min",h.options.min,c.dataMin),h=H("max",h.options.max,c.dataMax)-g;return e?b*h/d+g:d*(b-g)/h},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:D.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=f.scrollbar=new u(a.renderer,m(a.options.scrollbar,
{margin:f.navigatorEnabled?0:10,vertical:a.inverted}),a),q(f.scrollbar,"changed",function(b){var e=f.size,h=e*this.to,e=e*this.from;f.hasDragged=f.scrollbar.hasDragged;f.render(0,0,e,h);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){f.onMouseUp(b)})}));f.addBaseSeriesEvents();f.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],h=this.xAxis,c=h.options,d=b.options,g;a&&null===b.dataMin||(g={dataMin:e(c&&c.min,H("min",
d.min,b.dataMin,h.dataMin,h.min)),dataMax:e(c&&c.max,H("max",d.max,b.dataMax,h.dataMax,h.max))});return g},setBaseSeries:function(a,b){var e=this.chart,h=this.baseSeries=[];a=a||e.options&&e.options.navigator.baseSeries||0;n(e.series||[],function(b,e){b.options.isInternal||!b.options.showInNavigator&&(e!==a&&b.options.id!==a||!1===b.options.showInNavigator)||h.push(b)});this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,b)},updateNavigatorSeries:function(b,e){var h=this,c=h.chart,d=h.baseSeries,
g,f,t=h.navigatorOptions.series,u,v={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0},q=h.series=a.grep(h.series||[],function(b){var e=b.baseSeries;return 0>a.inArray(e,d)?(e&&(l(e,"updatedData",h.updatedDataHandler),delete e.navigatorSeries),b.chart&&b.destroy(),!1):!0});d&&d.length&&n(d,function(a){var b=a.navigatorSeries,l=F({color:a.color,visible:a.visible},k(t)?C.navigator.series:
t);b&&!1===h.navigatorOptions.adaptToUpdatedData||(v.name="Navigator "+d.length,g=a.options||{},u=g.navigatorOptions||{},f=m(g,v,l,u),l=u.data||l.data,h.hasNavigatorData=h.hasNavigatorData||!!l,f.data=l||g.data&&g.data.slice(0),b&&b.options?b.update(f,e):(a.navigatorSeries=c.initSeries(f),a.navigatorSeries.baseSeries=a,q.push(a.navigatorSeries)))});if(t.data&&(!d||!d.length)||k(t))h.hasNavigatorData=!1,t=a.splat(t),n(t,function(a,b){v.name="Navigator "+(q.length+1);f=m(C.navigator.series,{color:c.series[b]&&
!c.series[b].options.isInternal&&c.series[b].color||c.options.colors[b]||c.options.colors[0]},v,a);f.data=a.data;f.data&&(h.hasNavigatorData=!0,q.push(c.initSeries(f)))});b&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&q(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);n(b,function(b){q(b,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});q(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,
!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&q(b,"updatedData",this.updatedDataHandler);q(b,"remove",function(){this.navigatorSeries&&(y(a.series,this.navigatorSeries),z(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(b){return a.reduce(this.baseSeries,function(a,b){return Math.min(a,b.xData[0])},b)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||
b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,c=this.getExtremes(),d=c.dataMin,g=c.dataMax,c=c.max-c.min,f=a.stickToMin,l=a.stickToMax,u=e(this.options.overscroll,0),k,v,m=a.series&&a.series[0],n=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(f&&(v=d,k=v+c),l&&(k=g+u,f||(v=Math.max(k-c,a.getBaseSeriesMin(m&&m.xData?m.xData[0]:-Number.MAX_VALUE)))),n&&(f||l)&&b(v)&&(this.min=
this.userMin=v,this.max=this.userMax=k));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,e=this.navigatorSeries,c=a.getBaseSeriesMin(this.xData[0]);a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=b(this.xAxis.min)&&this.xAxis.min<=c&&(!this.chart.fixedRange||!a.stickToMax);e&&!a.hasNavigatorData&&(e.options.pointStart=this.xData[0],e.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||
(this.eventsToUnbind=[]);this.eventsToUnbind.push(q(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)}),q(this.chart,"getMargins",function(){var a=this.navigator,b=a.opposite?"plotTop":"marginBottom";this.inverted&&(b=a.opposite?"marginRight":"plotLeft");this[b]=(this[b]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))},destroy:function(){this.removeEvents();
this.xAxis&&(y(this.chart.xAxis,this.xAxis),y(this.chart.axes,this.xAxis));this.yAxis&&(y(this.chart.yAxis,this.yAxis),y(this.chart.axes,this.yAxis));n(this.series||[],function(a){a.destroy&&a.destroy()});n("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);n([this.handles],function(a){A(a)},this)}};a.Navigator=B;J(D.prototype,"zoom",function(a,b,
e){var c=this.chart,d=c.options,h=d.chart.zoomType,g=d.chart.pinchType,f=d.navigator,d=d.rangeSelector,l;this.isXAxis&&(f&&f.enabled||d&&d.enabled)&&(!r&&"x"===h||r&&"x"===g?c.resetZoomButton="blocked":"y"===h?l=!1:(!r&&"xy"===h||r&&"xy"===g)&&this.options.range&&(c=this.previousZoom,z(b)?this.previousZoom=[this.min,this.max]:c&&(b=c[0],e=c[1],delete this.previousZoom)));return void 0!==l?l:a.call(this,b,e)});q(p,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=
this.navigator=new B(this)});q(p,"afterSetChartSize",function(){var a=this.legend,b=this.navigator,c,d,g,f;b&&(d=a&&a.options,g=b.xAxis,f=b.yAxis,c=b.scrollbarHeight,this.inverted?(b.left=b.opposite?this.chartWidth-c-b.height:this.spacing[3]+c,b.top=this.plotTop+c):(b.left=this.plotLeft+c,b.top=b.navigatorOptions.top||this.chartHeight-b.height-c-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(d&&"bottom"===d.verticalAlign&&d.enabled&&!d.floating?a.legendHeight+
e(d.margin,10):0)),g&&f&&(this.inverted?g.options.left=f.options.left=b.left:g.options.top=f.options.top=b.top,g.setAxisSize(),f.setAxisSize()))});q(p,"update",function(a){var b=a.options.navigator||{},e=a.options.scrollbar||{};this.navigator||this.scroller||!b.enabled&&!e.enabled||(m(!0,this.options.navigator,b),m(!0,this.options.scrollbar,e),delete a.options.navigator,delete a.options.scrollbar)});q(p,"afterUpdate",function(){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||
(this.scroller=this.navigator=new B(this))});J(g.prototype,"addPoint",function(a,b,e,c,d){var g=this.options.turboThreshold;g&&this.xData.length>g&&f(b,!0)&&this.chart.navigator&&x(20,!0);a.call(this,b,e,c,d)});q(p,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)});q(g,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)});p.prototype.callbacks.push(function(a){var b=a.navigator;b&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),
b.render(a.min,a.max))})})(K);(function(a){function B(a){this.init(a)}var q=a.addEvent,D=a.Axis,p=a.Chart,G=a.css,C=a.createElement,z=a.defaultOptions,A=a.defined,n=a.destroyObjectProperties,y=a.discardElement,x=a.each,F=a.extend,d=a.fireEvent,c=a.isNumber,k=a.merge,b=a.pick,f=a.pInt,r=a.splat,m=a.wrap;F(z,{rangeSelector:{verticalAlign:"top",buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",
x:0,y:0},labelStyle:{color:"#666666"}}});z.lang=k(z.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});B.prototype={clickButton:function(a,d){var e=this,g=e.chart,f=e.buttonOptions[a],l=g.xAxis[0],k=g.scroller&&g.scroller.getUnionExtremes()||l||{},m=k.dataMin,h=k.dataMax,t,w=l&&Math.round(Math.min(l.max,b(h,l.max))),n=f.type,p,k=f._range,z,L,E,y=f.dataGrouping;if(null!==m&&null!==h){g.fixedRange=k;y&&(this.forcedDataGrouping=!0,D.prototype.setDataGrouping.call(l||{chart:this.chart},
y,!1),this.frozenStates=f.preserveDataGrouping);if("month"===n||"year"===n)l?(n={range:f,max:w,chart:g,dataMin:m,dataMax:h},t=l.minFromRange.call(n),c(n.newMax)&&(w=n.newMax)):k=f;else if(k)t=Math.max(w-k,m),w=Math.min(t+k,h);else if("ytd"===n)if(l)void 0===h&&(m=Number.MAX_VALUE,h=Number.MIN_VALUE,x(g.series,function(a){a=a.xData;m=Math.min(a[0],m);h=Math.max(a[a.length-1],h)}),d=!1),w=e.getYTDExtremes(h,m,g.time.useUTC),t=z=w.min,w=w.max;else{q(g,"beforeRender",function(){e.clickButton(a)});return}else"all"===
n&&l&&(t=m,w=h);t+=f._offsetMin;w+=f._offsetMax;e.setSelected(a);l?l.setExtremes(t,w,b(d,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:f}):(p=r(g.options.xAxis)[0],E=p.range,p.range=k,L=p.min,p.min=z,q(g,"load",function(){p.range=E;p.min=L}))}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",
text:"All"}],init:function(a){var b=this,e=a.options.rangeSelector,c=e.buttons||[].concat(b.defaultButtons),f=e.selected,k=function(){var a=b.minInput,e=b.maxInput;a&&a.blur&&d(a,"blur");e&&e.blur&&d(e,"blur")};b.chart=a;b.options=e;b.buttons=[];a.extraTopMargin=e.height;b.buttonOptions=c;this.unMouseDown=q(a.container,"mousedown",k);this.unResize=q(a,"resize",k);x(c,b.computeButtonRange);void 0!==f&&c[f]&&this.clickButton(f,!1);q(a,"load",function(){a.xAxis&&a.xAxis[0]&&q(a.xAxis[0],"setExtremes",
function(e){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==e.trigger&&"updatedData"!==e.trigger&&b.forcedDataGrouping&&!b.frozenStates&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this,b=this.chart,d=b.xAxis[0],f=Math.round(d.max-d.min),k=!d.hasVisibleSeries,m=b.scroller&&b.scroller.getUnionExtremes()||d,n=m.dataMin,p=m.dataMax,b=a.getYTDExtremes(p,n,b.time.useUTC),h=b.min,t=b.max,w=a.selected,q=c(w),r=a.options.allButtonsEnabled,z=a.buttons;x(a.buttonOptions,function(b,
e){var c=b._range,g=b.type,l=b.count||1,u=z[e],m=0;b=b._offsetMax-b._offsetMin;e=e===w;var v=c>p-n,I=c<d.minRange,x=!1,L=!1,c=c===f;("month"===g||"year"===g)&&f+36E5>=864E5*{month:28,year:365}[g]*l-b&&f-36E5<=864E5*{month:31,year:366}[g]*l+b?c=!0:"ytd"===g?(c=t-h+b===f,x=!e):"all"===g&&(c=d.max-d.min>=p-n,L=!e&&q&&c);g=!r&&(v||I||L||k);l=e&&c||c&&!q&&!x||e&&a.frozenStates;g?m=3:l&&(q=!0,m=2);u.state!==m&&u.setState(m)})},computeButtonRange:function(a){var c=a.type,e=a.count||1,d={millisecond:1,second:1E3,
minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[c])a._range=d[c]*e;else if("month"===c||"year"===c)a._range=864E5*{month:30,year:365}[c]*e;a._offsetMin=b(a.offsetMin,0);a._offsetMax=b(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,e=this.chart.time,d=this[a+"Input"];A(b)&&(d.previousValue=d.HCTime,d.HCTime=b);d.value=e.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",d.HCTime);this[a+"DateBox"].attr({text:e.dateFormat(c.inputDateFormat||
"%b %e, %Y",d.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];G(this[a+"Input"],{left:b.translateX+c.x+"px",top:b.translateY+"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})},hideInput:function(a){G(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(a){function b(){var a=t.value,b=(p.inputDateParser||Date.parse)(a),g=d.xAxis[0],l=d.scroller&&d.scroller.xAxis?d.scroller.xAxis:g,k=l.dataMin,l=l.dataMax;
b!==t.previousValue&&(t.previousValue=b,c(b)||(b=a.split("-"),b=Date.UTC(f(b[0]),f(b[1])-1,f(b[2]))),c(b)&&(d.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),h?b>e.maxInput.HCTime?b=void 0:b<k&&(b=k):b<e.minInput.HCTime?b=void 0:b>l&&(b=l),void 0!==b&&g.setExtremes(h?b:g.min,h?g.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var e=this,d=e.chart,m=d.renderer.style||{},n=d.renderer,p=d.options.rangeSelector,q=e.div,h="min"===a,t,w,r=this.inputGroup;this[a+"Label"]=w=n.label(z.lang[h?"rangeSelectorFrom":
"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(r);r.offset+=w.width+5;this[a+"DateBox"]=n=n.label("",r.offset).addClass("highcharts-range-input").attr({padding:2,width:p.inputBoxWidth||90,height:p.inputBoxHeight||17,"text-align":"center",stroke:p.inputBoxBorderColor||"#cccccc","stroke-width":1}).on("click",function(){e.showInput(a);e[a+"Input"].focus()}).add(r);r.offset+=n.width+(h?10:0);this[a+"Input"]=t=C("input",{name:a,className:"highcharts-range-selector",
type:"text"},{top:d.plotTop+"px"},q);w.css(k(m,p.labelStyle));n.css(k({color:"#333333"},m,p.inputStyle));G(t,F({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:m.fontSize,fontFamily:m.fontFamily,top:"-9999em"},p.inputStyle));t.onfocus=function(){e.showInput(a)};t.onblur=function(){e.hideInput(a)};t.onchange=b;t.onkeypress=function(a){13===a.keyCode&&b()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a="top"===b.verticalAlign?a.plotTop-
a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}},getYTDExtremes:function(a,b,c){var e=this.chart.time,d=new e.Date(a),f=e.get("FullYear",d);c=c?e.Date.UTC(f,0,1):+new e.Date(f,0,1);b=Math.max(b||0,c);d=d.getTime();return{max:Math.min(a||d,d),min:b}},render:function(a,c){var e=this,d=e.chart,f=d.renderer,l=d.container,k=d.options,m=k.exporting&&!1!==k.exporting.enabled&&k.navigation&&k.navigation.buttonOptions,h=z.lang,t=e.div,n=k.rangeSelector,p=b(k.chart.style&&
k.chart.style.zIndex,0)+1,k=n.floating,q=e.buttons,t=e.inputGroup,r=n.buttonTheme,L=n.buttonPosition,E=n.inputPosition,y=n.inputEnabled,A=r&&r.states,B=d.plotLeft,F,N=e.buttonGroup,D;D=e.rendered;var G=e.options.verticalAlign,K=d.legend,T=K&&K.options,U=L.y,S=E.y,V=D||!1,W=V?"animate":"attr",R=0,P=0,Q;if(!1!==n.enabled){D||(e.group=D=f.g("range-selector-group").attr({zIndex:7}).add(),e.buttonGroup=N=f.g("range-selector-buttons").add(D),e.zoomText=f.text(h.rangeSelectorZoom,0,15).css(n.labelStyle).add(N),
x(e.buttonOptions,function(a,b){q[b]=f.button(a.text,0,0,function(){var c=a.events&&a.events.click,d;c&&(d=c.call(a));!1!==d&&e.clickButton(b);e.isActive=!0},r,A&&A.hover,A&&A.select,A&&A.disabled).attr({"text-align":"center"}).add(N)}),!1!==y&&(e.div=t=C("div",null,{position:"relative",height:0,zIndex:p}),l.parentNode.insertBefore(t,l),e.inputGroup=t=f.g("input-group").add(D),t.offset=0,e.drawInput("min"),e.drawInput("max")));e.zoomText[W]({x:b(B+L.x,B)});F=b(B+L.x,B)+e.zoomText.getBBox().width+
5;x(e.buttonOptions,function(a,c){q[c][W]({x:F});F+=q[c].width+b(n.buttonSpacing,5)});B=d.plotLeft-d.spacing[3];e.updateButtonStates();m&&this.titleCollision(d)&&"top"===G&&"right"===L.align&&L.y+N.getBBox().height-12<(m.y||0)+m.height&&(R=-40);"left"===L.align?Q=L.x-d.spacing[3]:"right"===L.align&&(Q=L.x+R-d.spacing[1]);N.align({y:L.y,width:N.getBBox().width,align:L.align,x:Q},!0,d.spacingBox);e.group.placed=V;e.buttonGroup.placed=V;!1!==y&&(R=m&&this.titleCollision(d)&&"top"===G&&"right"===E.align&&
E.y-t.getBBox().height-12<(m.y||0)+m.height+d.spacing[0]?-40:0,"left"===E.align?Q=B:"right"===E.align&&(Q=-Math.max(d.axisOffset[1],-R)),t.align({y:E.y,width:t.getBBox().width,align:E.align,x:E.x+Q-2},!0,d.spacingBox),l=t.alignAttr.translateX+t.alignOptions.x-R+t.getBBox().x+2,m=t.alignOptions.width,h=N.alignAttr.translateX+N.getBBox().x,Q=N.getBBox().width+20,(E.align===L.align||h+Q>l&&l+m>h&&U<S+t.getBBox().height)&&t.attr({translateX:t.alignAttr.translateX+(d.axisOffset[1]>=-R?0:-R),translateY:t.alignAttr.translateY+
N.getBBox().height+10}),e.setInputValue("min",a),e.setInputValue("max",c),e.inputGroup.placed=V);e.group.align({verticalAlign:G},!0,d.spacingBox);a=e.group.getBBox().height+20;c=e.group.alignAttr.translateY;"bottom"===G&&(K=T&&"bottom"===T.verticalAlign&&T.enabled&&!T.floating?K.legendHeight+b(T.margin,10):0,a=a+K-20,P=c-a-(k?0:n.y)-10);if("top"===G)k&&(P=0),d.titleOffset&&(P=d.titleOffset+d.options.title.margin),P+=d.margin[0]-d.spacing[0]||0;else if("middle"===G)if(S===U)P=0>S?c+void 0:c;else if(S||
U)P=0>S||0>U?P-Math.min(S,U):c-a+NaN;e.group.translate(n.x,n.y+Math.floor(P));!1!==y&&(e.minInput.style.marginTop=e.group.translateY+"px",e.maxInput.style.marginTop=e.group.translateY+"px");e.rendered=!0}},getHeight:function(){var a=this.options,b=this.group,c=a.y,d=a.buttonPosition.y,a=a.inputPosition.y,b=b?b.getBBox(!0).height+13+c:0,c=Math.min(a,d);if(0>a&&0>d||0<a&&0<d)b+=Math.abs(c);return b},titleCollision:function(a){return!(a.options.title.text||a.options.subtitle.text)},update:function(a){var b=
this.chart;k(!0,b.options.rangeSelector,a);this.destroy();this.init(b);b.rangeSelector.render()},destroy:function(){var b=this,c=b.minInput,d=b.maxInput;b.unMouseDown();b.unResize();n(b.buttons);c&&(c.onfocus=c.onblur=c.onchange=null);d&&(d.onfocus=d.onblur=d.onchange=null);a.objectEach(b,function(a,c){a&&"chart"!==c&&(a.destroy?a.destroy():a.nodeType&&y(this[c]));a!==B.prototype[c]&&(b[c]=null)},this)}};D.prototype.toFixedRange=function(a,d,f,g){var e=this.chart&&this.chart.fixedRange;a=b(f,this.translate(a,
!0,!this.horiz));d=b(g,this.translate(d,!0,!this.horiz));f=e&&(d-a)/e;.7<f&&1.3>f&&(g?a=d-e:d=a+e);c(a)&&c(d)||(a=d=void 0);return{min:a,max:d}};D.prototype.minFromRange=function(){var a=this.range,d={month:"Month",year:"FullYear"}[a.type],f,g=this.max,k,m,n=function(a,b){var c=new Date(a),e=c["get"+d]();c["set"+d](e+b);e===c["get"+d]()&&c.setDate(0);return c.getTime()-a};c(a)?(f=g-a,m=a):(f=g+n(g,-a.count),this.chart&&(this.chart.fixedRange=g-f));k=b(this.dataMin,Number.MIN_VALUE);c(f)||(f=k);f<=
k&&(f=k,void 0===m&&(m=n(f,a.count)),this.newMax=Math.min(f+m,this.dataMax));c(g)||(f=void 0);return f};q(p,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new B(this))});m(p.prototype,"render",function(a,b,c){var d=this.axes,e=this.rangeSelector;e&&(x(d,function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),e.render(),d=e.options.verticalAlign,e.options.floating||("bottom"===d?this.extraBottomMargin=!0:"middle"!==d&&(this.extraTopMargin=!0)));a.call(this,
b,c)});q(p,"update",function(a){var b=a.options.rangeSelector;a=this.rangeSelector;var c=this.extraBottomMargin,d=this.extraTopMargin;b&&b.enabled&&!A(a)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new B(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(a.render(),b=b&&b.verticalAlign||a.options&&a.options.verticalAlign,a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=!0)),this.extraBottomMargin!==c||this.extraTopMargin!==d)&&(this.isDirtyBox=
!0)});m(p.prototype,"redraw",function(a,b,c){var d=this.rangeSelector;d&&!d.options.floating&&(d.render(),d=d.options.verticalAlign,"bottom"===d?this.extraBottomMargin=!0:"middle"!==d&&(this.extraTopMargin=!0));a.call(this,b,c)});q(p,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))});p.prototype.callbacks.push(function(a){function b(){d=a.xAxis[0].getExtremes();c(d.min)&&e.render(d.min,d.max)}
var d,e=a.rangeSelector,f,k;e&&(k=q(a.xAxis[0],"afterSetExtremes",function(a){e.render(a.min,a.max)}),f=q(a,"redraw",b),b());q(a,"destroy",function(){e&&(f(),k())})});a.RangeSelector=B})(K);(function(a){var B=a.addEvent,q=a.arrayMax,D=a.arrayMin,p=a.Axis,G=a.Chart,C=a.defined,z=a.each,A=a.extend,n=a.format,y=a.grep,x=a.inArray,F=a.isNumber,d=a.isString,c=a.map,k=a.merge,b=a.pick,f=a.Point,r=a.Renderer,m=a.Series,e=a.splat,l=a.SVGRenderer,u=a.VMLRenderer,g=a.wrap,v=m.prototype,J=v.init,K=v.processData,
H=f.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(f,g,l){var h=d(f)||f.nodeName,m=arguments[h?1:0],t=m.series,n=a.getOptions(),p,q=b(m.navigator&&m.navigator.enabled,n.navigator.enabled,!0),w=q?{startOnTick:!1,endOnTick:!1}:null,r={marker:{enabled:!1,radius:2}},u={shadow:!1,borderWidth:0};m.xAxis=c(e(m.xAxis||{}),function(a,b){return k({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},n.xAxis,n.xAxis&&n.xAxis[b],a,{type:"datetime",
categories:null},w)});m.yAxis=c(e(m.yAxis||{}),function(a,c){p=b(a.opposite,!0);return k({labels:{y:-2},opposite:p,showLastLabel:!(!a.categories&&"category"!==a.type),title:{text:null}},n.yAxis,n.yAxis&&n.yAxis[c],a)});m.series=null;m=k({chart:{panning:!0,pinchType:"x"},navigator:{enabled:q},scrollbar:{enabled:b(n.scrollbar.enabled,!0)},rangeSelector:{enabled:b(n.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:b(n.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1},plotOptions:{line:r,
spline:r,area:r,areaspline:r,arearange:r,areasplinerange:r,column:u,columnrange:u,candlestick:u,ohlc:u}},m,{isStock:!0});m.series=t;return h?new G(f,m,l):new G(m,g)};g(p.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled)?(15===d.x&&(d.x=0),void 0===d.align&&(d.align="right"),b[c]=this,"right"):a.apply(this,[].slice.call(arguments,
1))});B(p,"destroy",function(){var a=this.chart,b=this.options&&this.options.top+","+this.options.height;b&&a._labelPanes&&a._labelPanes[b]===this&&delete a._labelPanes[b]});g(p.prototype,"getPlotLinePath",function(e,f,g,k,l,m){var h=this,n=this.isLinked&&!this.series?this.linkedParent.series:this.series,t=h.chart,p=t.renderer,q=h.left,r=h.top,w,u,v,y,A=[],I=[],B,D;if("xAxis"!==h.coll&&"yAxis"!==h.coll)return e.apply(this,[].slice.call(arguments,1));I=function(a){var b="xAxis"===a?"yAxis":"xAxis";
a=h.options[b];return F(a)?[t[b][a]]:d(a)?[t.get(a)]:c(n,function(a){return a[b]})}(h.coll);z(h.isXAxis?t.yAxis:t.xAxis,function(a){if(C(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=C(a.options[b])?t[b][a.options[b]]:t[b][0];h===b&&I.push(a)}});B=I.length?[]:[h.isXAxis?t.yAxis[0]:t.xAxis[0]];z(I,function(b){-1!==x(b,B)||a.find(B,function(a){return a.pos===b.pos&&a.len===b.len})||B.push(b)});D=b(m,h.translate(f,null,null,k));F(D)&&(h.horiz?z(B,function(a){var b;
u=a.pos;y=u+a.len;w=v=Math.round(D+h.transB);"pass"!==l&&(w<q||w>q+h.width)&&(l?w=v=Math.min(Math.max(q,w),q+h.width):b=!0);b||A.push("M",w,u,"L",v,y)}):z(B,function(a){var b;w=a.pos;v=w+a.len;u=y=Math.round(r+h.height-D);"pass"!==l&&(u<r||u>r+h.height)&&(l?u=y=Math.min(Math.max(r,u),h.top+h.height):b=!0);b||A.push("M",w,u,"L",v,y)}));return 0<A.length?p.crispPolyLine(A,g||1):null});l.prototype.crispPolyLine=function(a,b){var c;for(c=0;c<a.length;c+=6)a[c+1]===a[c+4]&&(a[c+1]=a[c+4]=Math.round(a[c+
1])-b%2/2),a[c+2]===a[c+5]&&(a[c+2]=a[c+5]=Math.round(a[c+2])+b%2/2);return a};r===u&&(u.prototype.crispPolyLine=l.prototype.crispPolyLine);g(p.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});B(p,"afterDrawCrosshair",function(a){var c,d;if(C(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var e=this.chart,f=this.options.crosshair.label,h=this.horiz;c=this.opposite;d=this.left;var g=this.top,k=this.crossLabel,l=f.format,
m="",p="inside"===this.options.tickPosition,q=!1!==this.crosshair.snap,r=0,u=a.e||this.cross&&this.cross.e,v=a.point;a=this.lin2log;var x,y;this.isLog?(x=a(this.min),y=a(this.max)):(x=this.min,y=this.max);a=h?"center":c?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";k||(k=this.crossLabel=e.renderer.label(null,null,null,f.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:f.align||
a,padding:b(f.padding,8),r:b(f.borderRadius,3),zIndex:2}).add(this.labelGroup),k.attr({fill:f.backgroundColor||this.series[0]&&this.series[0].color||"#666666",stroke:f.borderColor||"","stroke-width":f.borderWidth||0}).css(A({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},f.style)));h?(a=q?v.plotX+d:u.chartX,g+=c?0:this.height):(a=c?this.width+d:0,g=q?v.plotY+g:u.chartY);l||f.formatter||(this.isDatetimeAxis&&(m="%b %d, %Y"),l="{value"+(m?":"+m:"")+"}");m=q?v[this.isXAxis?"x":
"y"]:this.toValue(h?u.chartX:u.chartY);k.attr({text:l?n(l,{value:m},e.time):f.formatter.call(this,m),x:a,y:g,visibility:m<x||m>y?"hidden":"visible"});f=k.getBBox();if(h){if(p&&!c||!p&&c)g=k.y-f.height}else g=k.y-f.height/2;h?(c=d-f.x,d=d+this.width-f.x):(c="left"===this.labelAlign?d:0,d="right"===this.labelAlign?d+this.width:e.chartWidth);k.translateX<c&&(r=c-k.translateX);k.translateX+f.width>=d&&(r=-(k.translateX+f.width-d));k.attr({x:a+r,y:g,anchorX:h?a:this.opposite?0:e.chartWidth,anchorY:h?this.opposite?
e.chartHeight:0:g+f.height/2})}});v.init=function(){J.apply(this,arguments);this.setCompare(this.options.compare)};v.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;if(void 0!==b&&void 0!==d)return b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};v.processData=function(){var a,b=-1,c,d,e=!0===this.options.compareStart?0:1,f,g;K.apply(this,
arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,f=d.length,this.pointArrayMap&&(b=x("close",this.pointArrayMap),-1===b&&(b=x(this.pointValKey||"y",this.pointArrayMap))),a=0;a<f-e;a++)if(g=d[a]&&-1<b?d[a][b]:d[a],F(g)&&c[a+e]>=this.xAxis.min&&0!==g){this.compareValue=g;break}};g(v,"getExtremes",function(a){var b;a.apply(this,[].slice.call(arguments,1));this.modifyValue&&(b=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],this.dataMin=D(b),
this.dataMax=q(b))});p.prototype.setCompare=function(a,c){this.isXAxis||(z(this.series,function(b){b.setCompare(a)}),b(c,!0)&&this.chart.redraw())};f.prototype.tooltipFormatter=function(c){c=c.replace("{point.change}",(0<this.change?"+":"")+a.numberFormat(this.change,b(this.series.tooltipOptions.changeDecimals,2)));return H.apply(this,[c])};g(m.prototype,"render",function(a){var b;this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(b=this.yAxis.len-(this.xAxis.axisLine?
Math.floor(this.xAxis.axisLine.strokeWidth()/2):0),!this.clipBox&&this.animate?(this.clipBox=k(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=b):this.chart[this.sharedClipKey]?this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:b}):this.clipBox&&(this.clipBox.width=this.xAxis.len,this.clipBox.height=b));a.call(this)});g(G.prototype,"getSelectedPoints",function(a){var b=a.call(this);z(this.series,function(a){a.hasGroupedData&&(b=b.concat(y(a.points||[],function(a){return a.selected})))});
return b});B(G,"update",function(a){a=a.options;"scrollbar"in a&&this.navigator&&(k(!0,this.options.scrollbar,a.scrollbar),this.navigator.update({},!1),delete a.scrollbar)})})(K)});
//# sourceMappingURL=stock.js.map