gantt.js
39.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
Highcharts JS v6.2.0 (2018-10-17)
Gantt series
(c) 2016 Lars A. V. Cabrera
--- WORK IN PROGRESS ---
License: www.highcharts.com/license
*/
(function(B){"object"===typeof module&&module.exports?module.exports=B:"function"===typeof define&&define.amd?define(function(){return B}):B(Highcharts)})(function(B){(function(a){var v=a.addEvent,m=a.PlotLineOrBand,u=a.merge,q={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:void 0,rotation:0,style:{fontSize:"10px"}}};v(a.Axis,"afterSetOptions",function(){var a=this.options,m=a.currentDateIndicator;m&&("object"===typeof m?(m.label&&m.label.format&&(m.label.formatter=
void 0),m=u(q,m)):m=u(q),m.value=new Date,a.plotLines||(a.plotLines=[]),a.plotLines.push(m))});v(m,"render",function(){var m=this.options,q,p;m.currentDateIndicator&&m.label&&(q=m.label.format,p=m.label.formatter,m.value=new Date,m.label.text="function"===typeof p?p(this):a.dateFormat(q,new Date),this.label&&this.label.attr({text:m.label.text}))})})(B);(function(a){var v=function(e){return Array.prototype.slice.call(e,1)},m=a.dateFormat,u=a.defined,q=a.each,r=a.isArray,w=a.isNumber,p=function(e){return a.isObject(e,
!0)},y=a.merge,k=a.pick,d=a.wrap,l=a.Axis,n=a.Tick,f={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};l.prototype.isNavigatorAxis=function(){return/highcharts-navigator-[xy]axis/.test(this.options.className)};l.prototype.isOuterAxis=function(){var e=this,c=-1,b=!0;q(e.chart.axes,function(h,f){h.side!==e.side||h.isNavigatorAxis()||(h===e?c=f:0<=c&&f>c&&(b=!1))});return b};l.prototype.getMaxLabelDimensions=function(e,c){var b={width:0,height:0};q(c,function(c){c=e[c];var h;p(c)&&
(h=p(c.label)?c.label:{},c=h.getBBox?h.getBBox().height:0,h=w(h.textPxLength)?h.textPxLength:0,b.height=Math.max(c,b.height),b.width=Math.max(h,b.width))});return b};a.dateFormats={W:function(e){e=new Date(e);var c;e.setHours(0,0,0,0);e.setDate(e.getDate()-(e.getDay()||7));c=new Date(e.getFullYear(),0,1);return Math.ceil(((e-c)/864E5+1)/7)},E:function(e){return m("%a",e,!0).charAt(0)}};d(l.prototype,"autoLabelAlign",function(e){return this.chart.isStock?"left":e.apply(this,v(arguments))});d(n.prototype,
"getLabelPosition",function(e,c,b,h,t,a,k,l){var g=this.axis,d=g.reversed,x=g.chart,n=g.options,C=n&&p(n.grid)?n.grid:{},n=a.align,m=f[g.side],A=g.tickPositions,H=this.pos-k,L=w(A[l+1])?A[l+1]-k:g.max+k,F=g.tickSize("tick",!0),A=r(F)?F[0]:0,F=F&&F[1]/2,I;!0===C.enabled?("top"===m?(C=g.top+g.offset,I=C-A):"bottom"===m?(I=x.chartHeight-g.bottom+g.offset,C=I+A):(C=g.top+g.len-g.translate(d?L:H),I=g.top+g.len-g.translate(d?H:L)),"right"===m?(m=x.chartWidth-g.right+g.offset,d=m+A):"left"===m?(d=g.left+
g.offset,m=d-A):(m=Math.round(g.left+g.translate(d?L:H))-F,d=Math.round(g.left+g.translate(d?H:L))-F),this.slotWidth=d-m,d={x:"left"===n?m:"right"===n?d:m+(d-m)/2,y:I+(C-I)/2},x=x.renderer.fontMetrics(a.style.fontSize,h.element),n=h.getBBox().height,a.useHTML?d.y+=x.b+-(n/2):(n=Math.round(n/x.h),d.y+=(x.b-(x.h-x.f))/2+-((n-1)*x.h/2)),d.x+=g.horiz&&a.x||0):d=e.apply(this,v(arguments));return d});d(l.prototype,"tickSize",function(e){var c=this.maxLabelDimensions,b=this.options,h=b&&p(b.grid)?b.grid:
{},b=e.apply(this,v(arguments));!0===h.enabled&&(h=2*Math.abs(this.defaultLeftAxisOptions.labels.x),c=h+(this.horiz?c.height:c.width),r(b)?b[0]=c:b=[c]);return b});d(l.prototype,"getTitlePosition",function(e){var c=this.options;if(!0===(c&&p(c.grid)?c.grid:{}).enabled){var b=this.axisTitle,h=b&&b.getBBox().width,a=this.horiz,g=this.left,d=this.top,l=this.width,n=this.height,m=c.title,c=this.opposite,q=this.offset,E=this.tickSize()||[0],r=m.x||0,z=m.y||0,A=k(m.margin,a?5:10),b=this.chart.renderer.fontMetrics(m.style&&
m.style.fontSize,b).f,E=(a?d+n:g)+E[0]/2*(c?-1:1)*(a?1:-1)+(this.side===f.bottom?b:0);return{x:a?g-h/2-A+r:E+(c?l:0)+q+r,y:a?E-(c?n:0)+(c?b:-b)/2+q+z:d-A+z}}return e.apply(this,v(arguments))});d(l.prototype,"unsquish",function(e){var c=this.options;return!0===(c&&p(c.grid)?c.grid:{}).enabled&&this.categories?this.tickInterval:e.apply(this,v(arguments))});a.addEvent(l,"afterSetOptions",function(e){var c=this.options;e=e.userOptions;var b,h=c&&p(c.grid)?c.grid:{};!0===h.enabled&&(b=y(!0,{className:"highcharts-grid-axis "+
(e.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M","%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"13px"}},title:{text:null,reserveSpace:!1,rotation:0},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},e),"xAxis"===this.coll&&(u(e.linkedTo)&&!u(e.tickPixelInterval)&&(b.tickPixelInterval=
350),u(e.tickPixelInterval)||!u(e.linkedTo)||u(e.tickPositioner)||u(e.tickInterval)||(b.tickPositioner=function(c,e){var h=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(h){var f,g,t,d,k=b.units;for(d=0;d<k.length;d++)if(k[d][0]===h.unitName){f=d;break}if(k[f][1])return k[f+1]&&(t=k[f+1][0],g=(k[f+1][1]||[1])[0]),h=a.timeUnits[t],this.tickInterval=h*g,this.getTimeTicks({unitRange:h,count:g,unitName:t},c,e,this.options.startOfWeek)}})),y(!0,this.options,
b),this.horiz&&(c.minPadding=k(e.minPadding,0),c.maxPadding=k(e.maxPadding,0)),w(c.grid.borderWidth)&&(c.tickWidth=c.lineWidth=h.borderWidth))});d(l.prototype,"setAxisTranslation",function(e){var c=this.options,b=c&&p(c.grid)?c.grid:{},h=this.tickPositions&&this.tickPositions.info,f=this.userOptions.labels||{};this.horiz&&(!0===b.enabled&&q(this.series,function(b){b.options.pointRange=0}),h&&(!1===c.dateTimeLabelFormats[h.unitName].range||1<h.count)&&!u(f.align)&&(c.labels.align="left",u(f.x)||(c.labels.x=
3)));e.apply(this,v(arguments))});d(l.prototype,"trimTicks",function(e){var c=this.options,b=c&&p(c.grid)?c.grid:{},h=this.categories,f=this.tickPositions,a=f[0],d=f[f.length-1],k=this.linkedParent&&this.linkedParent.min||this.min,l=this.linkedParent&&this.linkedParent.max||this.max,n=this.tickInterval,m=a>k,q=d<l,a=a<k&&a+n>k,d=d>l&&d-n<l;!0!==b.enabled||h||!this.horiz&&!this.isLinked||(!m&&!a||c.startOnTick||(f[0]=k),!q&&!d||c.endOnTick||(f[f.length-1]=l));e.apply(this,v(arguments))});d(l.prototype,
"render",function(e){var c=this.options,b=c&&p(c.grid)?c.grid:{},h,a,d,k=this.chart.renderer,l=this.horiz;if(!0===b.enabled){if(b=2*Math.abs(this.defaultLeftAxisOptions.labels.x),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),b=this.maxLabelDimensions.width+b,c=c.lineWidth,this.rightWall&&this.rightWall.destroy(),e.apply(this),e=this.axisGroup.getBBox(),this.isOuterAxis()&&this.axisLine&&(l&&(b=e.height-1),c)){e=this.getLinePath(c);a=e.indexOf("M")+1;d=e.indexOf("L")+
1;c=e.indexOf("M")+2;h=e.indexOf("L")+2;if(this.side===f.top||this.side===f.left)b=-b;l?(e[c]+=b,e[h]+=b):(e[a]+=b,e[d]+=b);this.axisLineExtra?this.axisLineExtra.animate({d:e}):this.axisLineExtra=k.path(e).attr({zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup);this.axisLine[this.showAxis?"show":"hide"](!0)}}else e.apply(this)});d(l.prototype,"init",function(e,c,b){function f(b){var c=b.options,e=25/11,f=b.chart.renderer.fontMetrics(c.labels.style.fontSize);c.labels||(c.labels={});c.labels.align=
k(c.labels.align,"center");b.categories||(c.showLastLabel=!1);b.horiz&&(c.tickLength=t.cellHeight||f.h*e);b.labelRotation=0;c.labels.rotation=0}var t=b&&p(b.grid)?b.grid:{},g,n,m;if(t.enabled)if(u(t.borderColor)&&(b.tickColor=b.lineColor=t.borderColor),r(t.columns))for(n=0,m=t.columns.length;m--;)g=y(b,t.columns[m],{type:"category"}),delete g.grid.columns,g=new l(c,g),g.isColumn=!0,g.columnIndex=n,d(g,"labelFormatter",function(b){var c=this.axis,e=c.tickPositions,f=this.value,h=f===e[0],e=f===e[e.length-
1],d=a.find(c.series[0].options.data,function(b){return b[c.isXAxis?"x":"y"]===f});this.isFirst=h;this.isLast=e;this.point=d;return b.call(this)}),n++;else e.apply(this,v(arguments)),f(this);else e.apply(this,v(arguments))})})(B);(function(a){var v=a.Chart,m=a.each,u=a.pick;a.addEvent(a.Axis,"afterSetOptions",function(){this.horiz||!a.isNumber(this.options.staticScale)||this.chart.options.chart.height||(this.staticScale=this.options.staticScale)});v.prototype.adjustHeight=function(){"adjustHeight"!==
this.redrawTrigger&&(m(this.axes||[],function(q){var r=q.chart,v=!!r.initiatedScale&&r.options.animation,p=q.options.staticScale,y;q.staticScale&&a.defined(q.min)&&(y=u(q.unitLength,q.max+q.tickInterval-q.min)*p,y=Math.max(y,p),p=y-r.plotHeight,1<=Math.abs(p)&&(r.plotHeight=y,r.redrawTrigger="adjustHeight",r.setSize(void 0,r.chartHeight+p,v)),m(q.series,function(a){(a=a.sharedClipKey&&r[a.sharedClipKey])&&a.attr({height:r.plotHeight})}))}),this.initiatedScale=!0);this.redrawTrigger=null};a.addEvent(v,
"render",v.prototype.adjustHeight)})(B);var M=function(a){var v=a.each,m=a.extend,u=a.isNumber,q=a.keys,r=a.map,w=a.pick,p=a.reduce,y=function(d,k){var l=p(d,function(f,e){var c=w(e.parent,"");void 0===f[c]&&(f[c]=[]);f[c].push(e);return f},{});d=q(l);v(d,function(f,e){var c=l[f];""!==f&&-1===a.inArray(f,k)&&(v(c,function(b){e[""].push(b)}),delete e[f])});return l},k=function(a,l,n,f,e,c){var b=0,h=0,d=c&&c.after,g=c&&c.before;l={data:f,depth:n-1,id:a,level:n,parent:l};var x,q;"function"===typeof g&&
g(l,c);g=r(e[a]||[],function(f){var d=k(f.id,a,n+1,f,e,c),g=f.start;f=!0===f.milestone?g:f.end;x=!u(x)||g<x?g:x;q=!u(q)||f>q?f:q;b=b+1+d.descendants;h=Math.max(d.height+1,h);return d});f&&(f.start=w(f.start,x),f.end=w(f.end,q));m(l,{children:g,descendants:b,height:h});"function"===typeof d&&d(l,c);return l};return{getListOfParents:y,getNode:k,getTree:function(a,l){var d=r(a,function(f){return f.id});a=y(a,d);return k("",null,1,null,a,l)}}}(B),N=function(a){var v=a.each,m=a.extend,u=a.isArray,q=a.isObject,
r=a.isNumber,w=a.merge,p=a.pick,y=a.reduce;return{getColor:function(a,d){var k=d.mapOptionsToLevel,n=d.parentColorIndex,f=d.series,e=d.colors,c=f.points,b,h;a&&(c=c[a.i],k=k[a.level]||{},(a=c&&k.colorByPoint)&&(b=c.index%(e?e.length:f.chart.options.chart.colorCount)),h=p(c&&c.options.colorIndex,k&&k.colorIndex,b,n,d.colorIndex));return{color:void 0,colorIndex:h}},getLevelOptions:function(a){var d=null,k,n,f,e;if(q(a))for(d={},f=r(a.from)?a.from:1,e=a.levels,n={},k=q(a.defaults)?a.defaults:{},u(e)&&
(n=y(e,function(c,b){var e,a;q(b)&&r(b.level)&&(a=w({},b),e="boolean"===typeof a.levelIsConstant?a.levelIsConstant:k.levelIsConstant,delete a.levelIsConstant,delete a.level,b=b.level+(e?0:f-1),q(c[b])?m(c[b],a):c[b]=a);return c},{})),e=r(a.to)?a.to:1,a=0;a<=e;a++)d[a]=w({},k,q(n[a])?n[a]:{});return d},setTreeValues:function d(a,n){var f=n.before,e=n.idRoot,c=n.mapIdToNode[e],b=n.points[a.i],h=b&&b.options||{},t=0,g=[];m(a,{levelDynamic:a.level-(("boolean"===typeof n.levelIsConstant?n.levelIsConstant:
1)?0:c.level),name:p(b&&b.name,""),visible:e===a.id||("boolean"===typeof n.visible?n.visible:!1)});"function"===typeof f&&(a=f(a,n));v(a.children,function(b,c){var e=m({},n);m(e,{index:c,siblings:a.children.length,visible:a.visible});b=d(b,e);g.push(b);b.visible&&(t+=b.val)});a.visible=0<t||a.visible;f=p(h.value,t);m(a,{children:g,childrenTotal:t,isLeaf:a.visible&&!t,val:f});return a},updateRootId:function(a){var d;q(a)&&(d=q(a.options)?a.options:{},d=p(a.rootNode,d.rootId,""),q(a.userOptions)&&(a.userOptions.rootId=
d),a.rootNode=d);return d}}}(B);(function(a){function v(){return Array.prototype.slice.call(arguments,1)}function m(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,q(this.pointArrayMap,["y"]))}var u=a.addEvent,q=a.pick,r=a.wrap,w=a.each,p=a.extend,y=a.isArray,k=a.fireEvent,d=a.Axis,l=a.Series;p(d.prototype,{isInBreak:function(a,f){var e=a.repeat||Infinity,c=a.from,b=a.to-a.from;f=f>=c?(f-c)%e:e-(c-f)%e;return a.inclusive?f<=b:f<b&&0!==f},isInAnyBreak:function(a,f){var e=
this.options.breaks,c=e&&e.length,b,h,d;if(c){for(;c--;)this.isInBreak(e[c],a)&&(b=!0,h||(h=q(e[c].showPoints,this.isXAxis?!1:!0)));d=b&&f?b&&!h:b}return d}});u(d,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});u(d,"afterSetTickPositions",function(){if(this.isBroken){var a=this.tickPositions,f=this.tickPositions.info,e=[],c;for(c=0;c<a.length;c++)this.isInAnyBreak(a[c])||e.push(a[c]);this.tickPositions=e;this.tickPositions.info=f}});u(d,"afterSetOptions",
function(){this.isBroken&&(this.options.ordinal=!1)});d.prototype.setBreaks=function(a,f){function e(c){var a=c,e,f;for(f=0;f<b.breakArray.length;f++)if(e=b.breakArray[f],e.to<=c)a-=e.len;else if(e.from>=c)break;else if(b.isInBreak(e,c)){a-=c-e.from;break}return a}function c(c){var a,e;for(e=0;e<b.breakArray.length&&!(a=b.breakArray[e],a.from>=c);e++)a.to<c?c+=a.len:b.isInBreak(a,c)&&(c+=a.len);return c}var b=this,h=y(a)&&!!a.length;b.isDirty=b.isBroken!==h;b.isBroken=h;b.options.breaks=b.userOptions.breaks=
a;b.forceRedraw=!0;h||b.val2lin!==e||(delete b.val2lin,delete b.lin2val);h&&(b.userOptions.ordinal=!1,b.val2lin=e,b.lin2val=c,b.setExtremes=function(b,c,a,e,f){if(this.isBroken){for(;this.isInAnyBreak(b);)b-=this.closestPointRange;for(;this.isInAnyBreak(c);)c-=this.closestPointRange}d.prototype.setExtremes.call(this,b,c,a,e,f)},b.setAxisTranslation=function(c){d.prototype.setAxisTranslation.call(this,c);this.unitLength=null;if(this.isBroken){c=b.options.breaks;var a=[],e=[],f=0,h,l,t=b.userMin||b.min,
n=b.userMax||b.max,m=q(b.pointRangePadding,0),p,A;w(c,function(c){l=c.repeat||Infinity;b.isInBreak(c,t)&&(t+=c.to%l-t%l);b.isInBreak(c,n)&&(n-=n%l-c.from%l)});w(c,function(b){p=b.from;for(l=b.repeat||Infinity;p-l>t;)p-=l;for(;p<t;)p+=l;for(A=p;A<n;A+=l)a.push({value:A,move:"in"}),a.push({value:A+(b.to-b.from),move:"out",size:b.breakSize})});a.sort(function(b,c){return b.value===c.value?("in"===b.move?0:1)-("in"===c.move?0:1):b.value-c.value});h=0;p=t;w(a,function(b){h+="in"===b.move?1:-1;1===h&&"in"===
b.move&&(p=b.value);0===h&&(e.push({from:p,to:b.value,len:b.value-p-(b.size||0)}),f+=b.value-p-(b.size||0))});b.breakArray=e;b.unitLength=n-t-f+m;k(b,"afterBreaks");b.staticScale?b.transA=b.staticScale:b.unitLength&&(b.transA*=(n-b.min+m)/b.unitLength);m&&(b.minPixelPadding=b.transA*b.minPointOffset);b.min=t;b.max=n}});q(f,!0)&&this.chart.redraw()};r(l.prototype,"generatePoints",function(a){a.apply(this,v(arguments));var f=this.xAxis,e=this.yAxis,c=this.points,b,h=c.length,d=this.options.connectNulls,
k;if(f&&e&&(f.options.breaks||e.options.breaks))for(;h--;)b=c[h],k=null===b.y&&!1===d,k||!f.isInAnyBreak(b.x,!0)&&!e.isInAnyBreak(b.y,!0)||(c.splice(h,1),this.data[h]&&this.data[h].destroyElements())});a.Series.prototype.drawBreaks=function(a,f){var e=this,c=e.points,b,h,d,g;a&&w(f,function(f){b=a.breakArray||[];h=a.isXAxis?a.min:q(e.options.threshold,a.min);w(c,function(c){g=q(c["stack"+f.toUpperCase()],c[f]);w(b,function(b){d=!1;if(h<b.from&&g>b.to||h>b.from&&g<b.from)d="pointBreak";else if(h<b.from&&
g>b.from&&g<b.to||h>b.from&&g>b.to&&g<b.from)d="pointInBreak";d&&k(a,d,{point:c,brk:b})})})})};a.Series.prototype.gappedPath=function(){var d=this.currentDataGrouping,f=d&&d.totalRange,d=this.options.gapSize,e=this.points.slice(),c=e.length-1,b=this.yAxis;if(d&&0<c)for("value"!==this.options.gapUnit&&(d*=this.closestPointRange),f&&f>d&&(d=f);c--;)e[c+1].x-e[c].x>d&&(f=(e[c].x+e[c+1].x)/2,e.splice(c+1,0,{isNull:!0,x:f}),this.options.stacking&&(f=b.stacks[this.stackKey][f]=new a.StackItem(b,b.options.stackLabels,
!1,f,this.stack),f.total=0));return this.getGraphPath(e)};r(a.seriesTypes.column.prototype,"drawPoints",m);r(a.Series.prototype,"drawPoints",m)})(B);(function(a,v,m){var u=function(b){return Array.prototype.slice.call(b,1)},q=a.defined,r=a.each,w=a.extend,p=a.find,y=a.fireEvent,k=m.getLevelOptions,d=a.map,l=a.merge,n=a.inArray,f=a.isNumber,e=function(b){return a.isObject(b,!0)},c=a.isString,b=a.keys,h=a.pick,t=a.reduce,g=a.wrap;m=a.Axis;var x=a.Tick,C=function(b,c){var a=!1;r(b,function(b,e,f){a||
(a=c(b,e,f))});return a},D=function(b,c){var a,e;for(a in c)c.hasOwnProperty(a)&&(e=c[a],g(b,a,e))},G=function(b,c){var a=b.collapseStart;b=b.collapseEnd;b>=c&&(a-=.5);return{from:a,to:b,showPoints:!1}},K=function(c){return t(b(c.mapOfPosToGridNode),function(b,a){a=+a;c.min<=a&&c.max>=a&&!c.isInAnyBreak(a)&&b.push(a);return b},[])},E=function(b,c){var a=b.options.breaks||[],e=G(c,b.max);return C(a,function(b){return b.from===e.from&&b.to===e.to})},J=function(b,c){var a=b.options.breaks||[];b=G(c,
b.max);a.push(b);return a},z=function(b,c){var a=b.options.breaks||[],e=G(c,b.max);return t(a,function(b,c){c.to===e.to&&c.from===e.from||b.push(c);return b},[])},A=function(b,c){var e=b.labelIcon,f=!e,h=c.renderer,d=c.xy,k=c.options,g=k.width,l=k.height,t=d.x-g/2-k.padding,d=d.y-l/2,m=c.collapsed?90:180,n=c.show&&a.isNumber(d);f&&(b.labelIcon=e=h.path(h.symbols[k.type](k.x,k.y,g,l)).addClass("highcharts-label-icon").add(c.group));n||e.attr({y:-9999});e[f?"attr":"animate"]({translateX:t,translateY:d,
rotation:m})},H=function(b,a,f){var d=[],h=[],k={},g={},l=-1,t="boolean"===typeof a?a:!1;b=v.getTree(b,{after:function(b){b=g[b.pos];var c=0,a=0;r(b.children,function(b){a+=b.descendants+1;c=Math.max(b.height+1,c)});b.descendants=a;b.height=c;b.collapsed&&h.push(b)},before:function(b){var a=e(b.data)?b.data:{},f=c(a.name)?a.name:"",h=k[b.parent],h=e(h)?g[h.pos]:null,m=function(b){return b.name===f},n;t&&e(h)&&(n=p(h.children,m))?(m=n.pos,n.nodes.push(b)):m=l++;g[m]||(g[m]=n={depth:h?h.depth+1:0,name:f,
nodes:[b],children:[],pos:m},-1!==m&&d.push(f),e(h)&&h.children.push(n));c(b.id)&&(k[b.id]=b);!0===a.collapsed&&(n.collapsed=!0);b.pos=m}});g=function(b,c){var a=function(b,f,h){var d=f+(-1===f?0:c-1),k=(d-f)/2,g=f+k;r(b.nodes,function(b){var c=b.data;e(c)&&(c.y=f+c.seriesIndex,delete c.seriesIndex);b.pos=g});h[g]=b;b.pos=g;b.tickmarkOffset=k+.5;b.collapseStart=d+.5;r(b.children,function(b){a(b,d+1,h);d=b.collapseEnd-.5});b.collapseEnd=d+.5;return h};return a(b["-1"],-1,{})}(g,f);return{categories:d,
mapOfIdToNode:k,mapOfPosToGridNode:g,collapsedNodes:h,tree:b}};D(m.prototype,{init:function(b,c,e){var f=this,h,g="treegrid"===e.type;g&&(e=l({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10,padding:5}},uniqueNames:!1},e,{reversed:!0,grid:{columns:void 0}}));b.apply(f,[c,e]);g&&(a.addEvent(f.chart,"beforeRender",function(){var b=f.options&&f.options.labels;f.updateYNames();r(f.series,function(b){b.yData=
d(b.options.data,function(b){return b.y})});f.mapOptionsToLevel=k({defaults:b,from:1,levels:b.levels,to:f.tree.height});h=a.addEvent(f,"foundExtremes",function(){r(f.collapsedNodes,function(b){b=J(f,b);f.setBreaks(b,!1)});h()})}),f.hasNames=!0,f.options.showLastLabel=!0)},getMaxLabelDimensions:function(b){var c=this.options,a=c&&c.labels,c=a&&f(a.indentation)?c.labels.indentation:0,a=b.apply(this,u(arguments)),e;"treegrid"===this.options.type&&(e=this.mapOfPosToGridNode[-1].height,a.width+=c*(e-1));
return a},generateTick:function(b,c){var a=e(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},f=this.ticks,h=f[c],d,k;"treegrid"===this.options.type?(k=this.mapOfPosToGridNode[c],(a=a[k.depth])&&(d={labels:a}),h?(h.parameters.category=k.name,h.options=d,h.addLabel()):f[c]=new x(this,c,null,void 0,{category:k.name,tickmarkOffset:k.tickmarkOffset,options:d})):b.apply(this,u(arguments))},setTickInterval:function(b){var c=this.options;"treegrid"===c.type?(this.min=h(this.userMin,c.min,this.dataMin),
this.max=h(this.userMax,c.max,this.dataMax),y(this,"foundExtremes"),this.setAxisTranslation(!0),this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=K(this)):b.apply(this,u(arguments))}});D(x.prototype,{getLabelPosition:function(b,c,a,d,k,g,l,t,m){var n=h(this.options&&this.options.labels,g);g=this.pos;var x=this.axis,A="treegrid"===x.options.type;b=b.apply(this,[c,a,d,k,n,l,t,m]);A&&(c=n&&e(n.symbol)?n.symbol:{},n=n&&f(n.indentation)?n.indentation:0,g=(g=(x=x.mapOfPosToGridNode)&&x[g])&&
g.depth||1,b.x+=c.width+2*c.padding+(g-1)*n);return b},renderLabel:function(b){var c=this,f=c.pos,d=c.axis,k=c.label,g=d.mapOfPosToGridNode,l=d.options,t=h(c.options&&c.options.labels,l&&l.labels),m=t&&e(t.symbol)?t.symbol:{},x=(g=g&&g[f])&&g.depth,l="treegrid"===l.type,p=!(!k||!k.element),f=-1<n(f,d.tickPositions);l&&g&&p&&k.addClass("highcharts-treegrid-node-level-"+x);b.apply(c,u(arguments));l&&g&&p&&0<g.descendants&&(d=E(d,g),A(c,{collapsed:d,group:k.parentGroup,options:m,renderer:k.renderer,
show:f,xy:k.xy}),m="highcharts-treegrid-node-"+(d?"expanded":"collapsed"),k.addClass("highcharts-treegrid-node-"+(d?"collapsed":"expanded")).removeClass(m),r([k,c.labelIcon],function(b){b.attachedTreeGridEvents||(a.addEvent(b.element,"mouseover",function(){k.addClass("highcharts-treegrid-node-active")}),a.addEvent(b.element,"mouseout",function(){var b=k;q(t.style);b.removeClass("highcharts-treegrid-node-active")}),a.addEvent(b.element,"click",function(){c.toggleCollapse()}),b.attachedTreeGridEvents=
!0)}))}});w(x.prototype,{collapse:function(b){var c=this.axis,a=J(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(a,h(b,!0))},expand:function(b){var c=this.axis,a=z(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(a,h(b,!0))},toggleCollapse:function(b){var c=this.axis,a;a=c.mapOfPosToGridNode[this.pos];a=E(c,a)?z(c,a):J(c,a);c.setBreaks(a,h(b,!0))}});m.prototype.updateYNames=function(){var b=this.options,c=b.uniqueNames,a=!this.isXAxis,f=this.series,h=0;"treegrid"===b.type&&a&&(b=t(f,function(b,a){a.visible&&
(r(a.options.data,function(c){e(c)&&(c.seriesIndex=h,b.push(c))}),!0===c&&h++);return b},[]),b=H(b,c,!0===c?h:1),this.categories=b.categories,this.mapOfPosToGridNode=b.mapOfPosToGridNode,this.collapsedNodes=b.collapsedNodes,this.hasNames=!0,this.tree=b.tree)};m.prototype.utils={getNode:v.getNode}})(B,M,N);M=function(a){function v(a,d,l){l=l||0;var k=a.length-1;d-=1e-7;for(var f,e;l<=k;)if(f=k+l>>1,e=d-a[f].xMin,0<e)l=f+1;else if(0>e)k=f-1;else return f;return 0<l?l-1:0}function m(a,d){for(var k=v(a,
d.x+1)+1;k--;){var m;if(m=a[k].xMax>=d.x)m=a[k],m=d.x<=m.xMax&&d.x>=m.xMin&&d.y<=m.yMax&&d.y>=m.yMin;if(m)return k}return-1}function u(a){var d=[];if(a.length){d.push("M",a[0].start.x,a[0].start.y);for(var k=0;k<a.length;++k)d.push("L",a[k].end.x,a[k].end.y)}return d}function q(a,d){a.yMin=w(a.yMin,d.yMin);a.yMax=r(a.yMax,d.yMax);a.xMin=w(a.xMin,d.xMin);a.xMax=r(a.xMax,d.xMax)}var r=Math.min,w=Math.max,p=Math.abs,y=a.pick;return{straight:function(a,d){return{path:["M",a.x,a.y,"L",d.x,d.y],obstacles:[{start:a,
end:d}]}},simpleConnect:a.extend(function(a,d,l){function k(b,c,a,e,f){b={x:b.x,y:b.y};b[c]=a[e||c]+(f||0);return b}function f(b,c,a){var e=p(c[a]-b[a+"Min"])>p(c[a]-b[a+"Max"]);return k(c,a,b,a+(e?"Max":"Min"),e?1:-1)}var e=[],c,b=y(l.startDirectionX,p(d.x-a.x)>p(d.y-a.y))?"x":"y",h=l.chartObstacles,t=m(h,a);l=m(h,d);var g;-1<l?(c=h[l],l=f(c,d,b),c={start:l,end:d},g=l):g=d;-1<t&&(h=h[t],l=f(h,a,b),e.push({start:a,end:l}),l[b]>a[b]===l[b]>g[b]&&(b="y"===b?"x":"y",d=a[b]<d[b],e.push({start:l,end:k(l,
b,h,b+(d?"Max":"Min"),d?1:-1)}),b="y"===b?"x":"y"));a=e.length?e[e.length-1].end:a;l=k(a,b,g);e.push({start:a,end:l});b=k(l,"y"===b?"x":"y",g);e.push({start:l,end:b});e.push(c);return{path:u(e),obstacles:e}},{requiresObstacles:!0}),fastAvoid:a.extend(function(a,d,l){function k(b,a,c){var e,f,h,d,g,k=b.x<a.x?1:-1;b.x<a.x?(e=b,f=a):(e=a,f=b);b.y<a.y?(d=b,h=a):(d=a,h=b);for(g=0>k?r(v(z,f.x),z.length-1):0;z[g]&&(0<k&&z[g].xMin<=f.x||0>k&&z[g].xMax>=e.x);){if(z[g].xMin<=f.x&&z[g].xMax>=e.x&&z[g].yMin<=
h.y&&z[g].yMax>=d.y)return c?{y:b.y,x:b.x<a.x?z[g].xMin-1:z[g].xMax+1,obstacle:z[g]}:{x:b.x,y:b.y<a.y?z[g].yMin-1:z[g].yMax+1,obstacle:z[g]};g+=k}return a}function f(b,a,c,e,f){var h=f.soft,d=f.hard,g=e?"x":"y",l={x:a.x,y:a.y},m={x:a.x,y:a.y};f=b[g+"Max"]>=h[g+"Max"];var h=b[g+"Min"]<=h[g+"Min"],t=b[g+"Max"]>=d[g+"Max"],d=b[g+"Min"]<=d[g+"Min"],n=p(b[g+"Min"]-a[g]),x=p(b[g+"Max"]-a[g]);c=10>p(n-x)?a[g]<c[g]:x<n;m[g]=b[g+"Min"];l[g]=b[g+"Max"];b=k(a,m,e)[g]!==m[g];a=k(a,l,e)[g]!==l[g];c=b?a?c:!0:a?
!1:c;c=h?f?c:!0:f?!1:c;return d?t?c:!0:t?!1:c}function e(b,a,c){if(b.x===a.x&&b.y===a.y)return[];var h=c?"x":"y",d,g,t,n,x=l.obstacleOptions.margin;d={soft:{xMin:G,xMax:K,yMin:E,yMax:J},hard:l.hardBounds};g=m(z,b);-1<g?(g=z[g],d=f(g,b,a,c,d),q(g,l.hardBounds),n=c?{y:b.y,x:g[d?"xMax":"xMin"]+(d?1:-1)}:{x:b.x,y:g[d?"yMax":"yMin"]+(d?1:-1)},t=m(z,n),-1<t&&(t=z[t],q(t,l.hardBounds),n[h]=d?w(g[h+"Max"]-x+1,(t[h+"Min"]+g[h+"Max"])/2):r(g[h+"Min"]+x-1,(t[h+"Max"]+g[h+"Min"])/2),b.x===n.x&&b.y===n.y?(C&&
(n[h]=d?w(g[h+"Max"],t[h+"Max"])+1:r(g[h+"Min"],t[h+"Min"])-1),C=!C):C=!1),b=[{start:b,end:n}]):(h=k(b,{x:c?a.x:b.x,y:c?b.y:a.y},c),b=[{start:b,end:{x:h.x,y:h.y}}],h[c?"x":"y"]!==a[c?"x":"y"]&&(d=f(h.obstacle,h,a,!c,d),q(h.obstacle,l.hardBounds),d={x:c?h.x:h.obstacle[d?"xMax":"xMin"]+(d?1:-1),y:c?h.obstacle[d?"yMax":"yMin"]+(d?1:-1):h.y},c=!c,b=b.concat(e({x:h.x,y:h.y},d,c))));return b=b.concat(e(b[b.length-1].end,a,!c))}function c(b,a,c){var e=r(b.xMax-a.x,a.x-b.xMin)<r(b.yMax-a.y,a.y-b.yMin);c=
f(b,a,c,e,{soft:l.hardBounds,hard:l.hardBounds});return e?{y:a.y,x:b[c?"xMax":"xMin"]+(c?1:-1)}:{x:a.x,y:b[c?"yMax":"yMin"]+(c?1:-1)}}var b=y(l.startDirectionX,p(d.x-a.x)>p(d.y-a.y)),h=b?"x":"y",t,g,x=[],C=!1,D=l.obstacleMetrics,G=r(a.x,d.x)-D.maxWidth-10,K=w(a.x,d.x)+D.maxWidth+10,E=r(a.y,d.y)-D.maxHeight-10,J=w(a.y,d.y)+D.maxHeight+10,z=l.chartObstacles;t=v(z,G);D=v(z,K);z=z.slice(t,D+1);-1<(D=m(z,d))&&(g=c(z[D],d,a),x.push({end:d,start:g}),d=g);for(;-1<(D=m(z,d));)t=0>d[h]-a[h],g={x:d.x,y:d.y},
g[h]=z[D][t?h+"Max":h+"Min"]+(t?1:-1),x.push({end:d,start:g}),d=g;a=e(a,d,b);a=a.concat(x.reverse());return{path:u(a),obstacles:a}},{requiresObstacles:!0})}}(B);(function(a){a.SVGRenderer.prototype.symbols.arrow=function(a,m,u,q){return["M",a,m+q/2,"L",a+u,m,"L",a,m+q/2,"L",a+u,m+q]};a.SVGRenderer.prototype.symbols["arrow-half"]=function(v,m,u,q){return a.SVGRenderer.prototype.symbols.arrow(v,m,u/2,q)};a.SVGRenderer.prototype.symbols["triangle-left"]=function(a,m,u,q){return["M",a+u,m,"L",a,m+q/2,
"L",a+u,m+q,"Z"]};a.SVGRenderer.prototype.symbols["arrow-filled"]=a.SVGRenderer.prototype.symbols["triangle-left"];a.SVGRenderer.prototype.symbols["triangle-left-half"]=function(v,m,u,q){return a.SVGRenderer.prototype.symbols["triangle-left"](v,m,u/2,q)};a.SVGRenderer.prototype.symbols["arrow-filled-half"]=a.SVGRenderer.prototype.symbols["triangle-left-half"]})(B);(function(a,v){function m(a){var b=a.shapeArgs;return b?{xMin:b.x,xMax:b.x+b.width,yMin:b.y,yMax:b.y+b.height}:(b=a.graphic&&a.graphic.getBBox())?
{xMin:a.plotX-b.width/2,xMax:a.plotX+b.width/2,yMin:a.plotY-b.height/2,yMax:a.plotY+b.height/2}:null}function u(a){for(var b=a.length,c=0,d,g,k=[],l=function(b,a,c){c=n(c,10);var f=b.yMax+c>a.yMin-c&&b.yMin-c<a.yMax+c,h=b.xMax+c>a.xMin-c&&b.xMin-c<a.xMax+c,d=f?b.xMin>a.xMax?b.xMin-a.xMax:a.xMin-b.xMax:Infinity,g=h?b.yMin>a.yMax?b.yMin-a.yMax:a.yMin-b.yMax:Infinity;return h&&f?c?l(b,a,Math.floor(c/2)):Infinity:e(d,g)};c<b;++c)for(d=c+1;d<b;++d)g=l(a[c],a[d]),80>g&&k.push(g);k.push(80);return f(Math.floor(k.sort(function(b,
a){return b-a})[Math.floor(k.length/10)]/2-1),1)}function q(a,b,e){this.init(a,b,e)}function r(a){this.init(a)}var w=a.defined,p=a.deg2rad,y=a.extend,k=a.each,d=a.addEvent,l=a.merge,n=a.pick,f=Math.max,e=Math.min;y(a.defaultOptions,{pathfinder:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});q.prototype={init:function(a,b,e){this.fromPoint=a;this.toPoint=b;this.options=e;
this.chart=a.series.chart;this.pathfinder=this.chart.pathfinder},renderPath:function(a,b,e){var c=this.chart,f=c.pathfinder,d=!c.options.chart.forExport&&!1!==e,h=this.graphics&&this.graphics.path;f.group||(f.group=c.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(c.seriesGroup));f.group.translate(c.plotLeft,c.plotTop);h&&h.renderer||(h=c.renderer.path().add(f.group));h.attr(b);h[d?"animate":"attr"]({d:a},e);this.graphics=this.graphics||{};this.graphics.path=h},addMarker:function(a,
b,e){var c=this.fromPoint.series.chart,f=c.pathfinder,c=c.renderer,d="start"===a?this.fromPoint:this.toPoint,h=d.getPathfinderAnchorPoint(b),k;b.enabled&&(e="start"===a?{x:e[4],y:e[5]}:{x:e[e.length-5],y:e[e.length-4]},e=d.getRadiansToVector(e,h),d=d.getMarkerVector(e,b.radius,h),h=-e/p,b.width&&b.height?(e=b.width,k=b.height):e=k=2*b.radius,this.graphics=this.graphics||{},d={x:d.x-e/2,y:d.y-k/2,width:e,height:k,rotation:h,rotationOriginX:d.x,rotationOriginY:d.y},this.graphics[a]?this.graphics[a].animate(d):
this.graphics[a]=c.symbol(b.symbol).addClass("highcharts-point-connecting-path-"+a+"-marker").attr(d).add(f.group))},getPath:function(c){var b=this.pathfinder,e=this.chart,f=b.algorithms[c.type],d=b.chartObstacles;if("function"!==typeof f)a.error('"'+c.type+'" is not a Pathfinder algorithm.');else return f.requiresObstacles&&!d&&(d=b.chartObstacles=b.getChartObstacles(c),e.options.pathfinder.algorithmMargin=c.algorithmMargin,b.chartObstacleMetrics=b.getObstacleMetrics(d)),f(this.fromPoint.getPathfinderAnchorPoint(c.startMarker),
this.toPoint.getPathfinderAnchorPoint(c.endMarker),l({chartObstacles:d,lineObstacles:b.lineObstacles||[],obstacleMetrics:b.chartObstacleMetrics,hardBounds:{xMin:0,xMax:e.plotWidth,yMin:0,yMax:e.plotHeight},obstacleOptions:{margin:c.algorithmMargin},startDirectionX:b.getAlgorithmStartDirection(c.startMarker)},c))},render:function(){var a=this.fromPoint,b=a.series,d=b.chart,k=d.pathfinder,g,d=l(d.options.pathfinder,b.options.pathfinder,a.options.pathfinder,this.options),m={};m.class="highcharts-point-connecting-path highcharts-color-"+
a.colorIndex;d=l(m,d);w(d.marker.radius)||(d.marker.radius=e(f(Math.ceil((d.algorithmMargin||8)/2)-1,1),5));a=this.getPath(d);g=a.path;a.obstacles&&(k.lineObstacles=k.lineObstacles||[],k.lineObstacles=k.lineObstacles.concat(a.obstacles));this.renderPath(g,m,b.options.animation);this.addMarker("start",l(d.marker,d.startMarker),g);this.addMarker("end",l(d.marker,d.endMarker),g)},destroy:function(){this.graphics&&(a.objectEach(this.graphics,function(a){a.destroy()}),delete this.graphics)}};r.prototype=
{algorithms:v,init:function(a){this.chart=a;this.connections=[];d(a,"redraw",function(){this.pathfinder.update()})},update:function(c){var b=this.chart,e=this,f=e.connections;e.connections=[];k(b.series,function(c){c.visible&&k(c.points,function(c){var f,d=c.options&&c.options.connect&&a.splat(c.options.connect);c.visible&&!1!==c.isInside&&d&&k(d,function(d){f=b.get("string"===typeof d?d:d.to);f instanceof a.Point&&f.series.visible&&f.visible&&!1!==f.isInside&&e.connections.push(new q(c,f,"string"===
typeof d?{}:d))})})});for(var d=0,l,m,n=f.length,p=e.connections.length;d<n;++d){m=!1;for(l=0;l<p;++l)if(f[d].fromPoint===e.connections[l].fromPoint&&f[d].toPoint===e.connections[l].toPoint){e.connections[l].graphics=f[d].graphics;m=!0;break}m||f[d].destroy()}delete this.chartObstacles;delete this.lineObstacles;e.renderConnections(c)},renderConnections:function(a){a?k(this.chart.series,function(b){var a=function(){var a=b.chart.pathfinder;k(a&&a.connections||[],function(a){a.fromPoint&&a.fromPoint.series===
b&&a.render()});b.pathfinderRemoveRenderEvent&&(b.pathfinderRemoveRenderEvent(),delete b.pathfinderRemoveRenderEvent)};!1===b.options.animation?a():b.pathfinderRemoveRenderEvent=d(b,"afterAnimate",a)}):k(this.connections,function(b){b.render()})},getChartObstacles:function(a){for(var b=[],c=this.chart.series,e=n(a.algorithmMargin,0),f,d=0,l=c.length;d<l;++d)if(c[d].visible)for(var p=0,q=c[d].points.length,r;p<q;++p)r=c[d].points[p],r.visible&&(r=m(r))&&b.push({xMin:r.xMin-e,xMax:r.xMax+e,yMin:r.yMin-
e,yMax:r.yMax+e});b=b.sort(function(b,a){return b.xMin-a.xMin});w(a.algorithmMargin)||(f=a.algorithmMargin=u(b),k(b,function(b){b.xMin-=f;b.xMax+=f;b.yMin-=f;b.yMax+=f}));return b},getObstacleMetrics:function(a){for(var b=0,c=0,e,f,d=a.length;d--;)e=a[d].xMax-a[d].xMin,f=a[d].yMax-a[d].yMin,b<e&&(b=e),c<f&&(c=f);return{maxHeight:c,maxWidth:b}},getAlgorithmStartDirection:function(a){var b="top"!==a.verticalAlign&&"bottom"!==a.verticalAlign;return"left"!==a.align&&"right"!==a.align?b?void 0:!1:b?!0:
void 0}};a.Connection=q;a.Pathfinder=r;y(a.Point.prototype,{getPathfinderAnchorPoint:function(a){var b=m(this),c,e;switch(a.align){case "right":c="xMax";break;case "left":c="xMin"}switch(a.verticalAlign){case "top":e="yMin";break;case "bottom":e="yMax"}return{x:c?b[c]:(b.xMin+b.xMax)/2,y:e?b[e]:(b.yMin+b.yMax)/2}},getRadiansToVector:function(a,b){w(b)||(b=m(this),b={x:(b.xMin+b.xMax)/2,y:(b.yMin+b.yMax)/2});return Math.atan2(b.y-a.y,a.x-b.x)},getMarkerVector:function(a,b,e){for(var c=2*Math.PI,d=
m(this),f=d.xMax-d.xMin,h=d.yMax-d.yMin,k=Math.atan2(h,f),l=!1,f=f/2,n=h/2,p=d.xMin+f,d=d.yMin+n,q=p,r=d,u={},v=1,w=1;a<-Math.PI;)a+=c;for(;a>Math.PI;)a-=c;c=Math.tan(a);a>-k&&a<=k?(w=-1,l=!0):a>k&&a<=Math.PI-k?w=-1:a>Math.PI-k||a<=-(Math.PI-k)?(v=-1,l=!0):v=-1;l?(q+=v*f,r+=w*f*c):(q+=h/(2*c)*v,r+=w*n);e.x!==p&&(q=e.x);e.y!==d&&(r=e.y);u.x=q+b*Math.cos(a);u.y=r-b*Math.sin(a);return u}});a.Chart.prototype.callbacks.push(function(a){!1!==a.options.pathfinder.enabled&&(this.pathfinder=new r(this),this.pathfinder.update(!0))})})(B,
M);(function(a){var v=a.addEvent,m=a.defined,u=a.seriesTypes.column,q=a.each,r=a.isNumber,w=a.isObject,p=a.merge,y=a.pick,k=a.seriesType,d=a.Axis,l=a.Point,n=a.Series;k("xrange","column",{colorByPoint:!0,dataLabels:{verticalAlign:"middle",inside:!0,formatter:function(){var a=this.point.partialFill;w(a)&&(a=a.amount);m(a)||(a=0);return 100*a+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 0.85em"\x3e{point.x} - {point.x2}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.yCategory}\x3c/b\x3e\x3cbr/\x3e'},
borderRadius:3,pointRange:0},{type:"xrange",parallelArrays:["x","x2","y"],requireSorting:!1,animate:a.seriesTypes.line.prototype.animate,cropShoulder:1,getExtremesFromAll:!0,autoIncrement:a.noop,getColumnMetrics:function(){function a(){q(c.series,function(a){var b=a.xAxis;a.xAxis=a.yAxis;a.yAxis=b})}var e,c=this.chart;a();e=u.prototype.getColumnMetrics.call(this);a();return e},cropData:function(a,e,c,b){e=n.prototype.cropData.call(this,this.x2Data,e,c,b);e.xData=a.slice(e.start,e.end);return e},translatePoint:function(a){var e=
this.xAxis,c=this.yAxis,b=this.columnMetrics,d=this.options,f=d.minPointLength||0,g=a.plotX,k=y(a.x2,a.x+(a.len||0)),l=e.translate(k,0,0,0,1),k=Math.abs(l-g),n=this.chart.inverted,q=y(d.borderWidth,1)%2/2,u=b.offset,v=Math.round(b.width);f&&(f-=k,0>f&&(f=0),g-=f/2,l+=f/2);g=Math.max(g,-10);l=Math.min(Math.max(l,-10),e.len+10);m(a.options.pointWidth)&&(u-=(Math.ceil(a.options.pointWidth)-v)/2,v=Math.ceil(a.options.pointWidth));d.pointPlacement&&r(a.plotY)&&c.categories&&(a.plotY=c.translate(a.y,0,
1,0,1,d.pointPlacement));a.shapeArgs={x:Math.floor(Math.min(g,l))+q,y:Math.floor(a.plotY+u)+q,width:Math.round(Math.abs(l-g)),height:v,r:this.options.borderRadius};d=a.shapeArgs.x;f=d+a.shapeArgs.width;0>d||f>e.len?(d=Math.min(e.len,Math.max(0,d)),f=Math.max(0,Math.min(f,e.len)),e=f-d,a.dlBox=p(a.shapeArgs,{x:d,width:f-d,centerX:e?e/2:null})):a.dlBox=null;a.tooltipPos[0]+=n?0:k/2;a.tooltipPos[1]-=n?-k/2:b.width/2;if(e=a.partialFill)w(e)&&(e=e.amount),r(e)||(e=0),b=a.shapeArgs,a.partShapeArgs={x:b.x,
y:b.y,width:b.width,height:b.height,r:this.options.borderRadius},a.clipRectArgs={x:b.x,y:b.y,width:Math.max(Math.round(k*e+(a.plotX-g)),0),height:b.height};c.categories&&(a.category=c.categories[a.y])},translate:function(){u.prototype.translate.apply(this,arguments);q(this.points,function(a){this.translatePoint(a)},this)},drawPoint:function(a,e){var c=this.chart.renderer,b=a.graphic,d=a.shapeType,f=a.shapeArgs,k=a.partShapeArgs,l=a.clipRectArgs;if(a.isNull)b&&(a.graphic=b.destroy());else{if(b)a.graphicOriginal[e](p(f));
else a.graphic=b=c.g("point").addClass(a.getClassName()).add(a.group||this.group),a.graphicOriginal=c[d](f).addClass(a.getClassName()).addClass("highcharts-partfill-original").add(b);k&&(a.graphicOverlay?(a.graphicOverlay[e](p(k)),a.clipRect.animate(p(l))):(a.clipRect=c.clipRect(l.x,l.y,l.width,l.height),a.graphicOverlay=c[d](k).addClass("highcharts-partfill-overlay").add(b).clip(a.clipRect)))}},drawPoints:function(){var a=this,d=a.getAnimationVerb();q(a.points,function(c){a.drawPoint(c,d)})},getAnimationVerb:function(){return this.chart.pointCount<
(this.options.animationLimit||250)?"animate":"attr"}},{applyOptions:function(){var a,d=l.prototype.applyOptions.apply(this,arguments);a=d.series;if(a.options.colorByPoint&&!d.options.color){var c=a.options.colors||a.chart.options.colors;a=d.y%(c?c.length:a.chart.options.chart.colorCount);d.options.colorIndex||(d.colorIndex=a)}return d},init:function(){l.prototype.init.apply(this,arguments);this.y||(this.y=0);return this},setState:function(){l.prototype.setState.apply(this,arguments);this.series.drawPoint(this,
this.series.getAnimationVerb())},getLabelConfig:function(){var a=l.prototype.getLabelConfig.call(this),d=this.series.yAxis.categories;a.x2=this.x2;a.yCategory=this.yCategory=d&&d[this.y];return a},tooltipDateKeys:["x","x2"],isValid:function(){return"number"===typeof this.x&&"number"===typeof this.x2}});v(d,"afterGetSeriesExtremes",function(){var a=this.series,d,c;this.isXAxis&&(d=y(this.dataMax,-Number.MAX_VALUE),q(a,function(a){a.x2Data&&q(a.x2Data,function(a){a>d&&(d=a,c=!0)})}),c&&(this.dataMax=
d))})})(B);(function(a){var v=a.dateFormat,m=a.isObject,u=a.isNumber,q=a.merge,r=a.pick,w=a.seriesType,p=a.stop,y=a.seriesTypes.xrange;w("gantt","xrange",{grouping:!1,dataLabels:{enabled:!0,formatter:function(){var a=this.point.partialFill;m(a)&&(a=a.amount);if(u(a)&&0<a)return 100*a+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"color:{point.color};text-align:right"\x3e{series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:null,pointFormatter:function(){var k=this.series,d=k.chart.tooltip,l=k.xAxis,
m=l.options.dateTimeLabelFormats,f=l.options.startOfWeek,e=k.tooltipOptions,c=e.xDateFormat,b=this.end?this.end-this.start:0,k=this.options.milestone,l="\x3cb\x3e"+(this.name||this.category)+"\x3c/b\x3e";if(e.pointFormat)return this.tooltipFormatter(e.pointFormat);c||(c=a.splat(d.getDateFormat(b,this.start,f,m))[0]);d=v(c,this.start);m=v(c,this.end);l+="\x3cbr/\x3e";return k?l+('\x3cspan style\x3d"font-size: 0.8em"\x3eDate '+d+"\x3c/span\x3e\x3cbr/\x3e"):l+('\x3cspan style\x3d"font-size: 0.8em"\x3eStart: '+
d+"\x3c/span\x3e\x3cbr/\x3e")+('\x3cspan style\x3d"font-size: 0.8em"\x3eEnd: '+m+"\x3c/span\x3e\x3cbr/\x3e")}},pathfinder:{type:"simpleConnect",animation:{reversed:!0},startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:!1,align:"right"}}},{keyboardMoveVertical:!1,translatePoint:function(a){var d,k;y.prototype.translatePoint.call(this,a);a.options.milestone&&(d=a.shapeArgs,k=d.height,a.shapeArgs={x:d.x-k/2,y:d.y,width:k,height:k})},drawPoint:function(a,
d){var k=this.chart.renderer,m=a.shapeArgs,f=a.plotY,e=a.graphic;a.options.milestone?u(f)&&null!==a.y?(m=k.symbols.diamond(m.x,m.y,m.width,m.height),e?(p(e),e[d]({d:m})):a.graphic=k.path(m).addClass(a.getClassName(),!0).add(a.group||this.group)):e&&(a.graphic=e.destroy()):y.prototype.drawPoint.call(this,a,d)},setData:a.Series.prototype.setData,setGanttPointAliases:function(a){function d(d,k){void 0!==k&&(a[d]=k)}d("x",r(a.start,a.x));d("x2",r(a.end,a.x2));d("partialFill",r(a.completed,a.partialFill));
d("connect",r(a.dependency,a.connect))}},q(y.prototype.pointClass.prototype,{applyOptions:function(a,d){var k=this.series;a=q(a);k.setGanttPointAliases(a);return a=y.prototype.pointClass.prototype.applyOptions.call(this,a,d)}}))})(B);(function(a){var v=a.each,m=a.map,u=a.merge,q=a.splat,r=a.Chart;a.ganttChart=function(w,p,y){var k="string"===typeof w||w.nodeName,d=p.series,l=a.getOptions(),n;p=arguments[k?1:0];a.isArray(p.xAxis)||(p.xAxis=[p.xAxis||{},{}]);p.xAxis=m(p.xAxis,function(a,d){1===d&&(n=
0);return u(l.xAxis,{grid:{enabled:!0},opposite:!0,linkedTo:n},a,{type:"datetime"})});p.yAxis=m(q(p.yAxis||{}),function(a){return u(l.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:a.categories?a.type:"treegrid"},a)});p.series=null;p=u({chart:{type:"gantt"},title:{text:null},legend:{enabled:!1}},p);p.series=d;v(p.series,function(d){v(d.data,function(d){a.seriesTypes.gantt.prototype.setGanttPointAliases(d)})});return k?new r(w,p,y):new r(p,p)}})(B)});
//# sourceMappingURL=gantt.js.map