/*
  Highcharts JS v7.0.1 (2018-12-19)
 Timeline series

 (c) 2010-2018 Highsoft AS
 Author: Daniel Studencki

 License: www.highcharts.com/license
*/
(function(l){"object"===typeof module&&module.exports?module.exports=l:"function"===typeof define&&define.amd?define(function(){return l}):l("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(l){(function(k){var l=k.addEvent,q=k.extend,r=k.defined,p=k.merge,m=k.pick,t=k.Point,n=k.Series,u=k.seriesType,v=k.wrap;u("timeline","line",{colorByPoint:!0,stickyTracking:!1,ignoreHiddenPoint:!0,legendType:"point",lineWidth:0,tooltip:{headerFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf \x3c/span\x3e\x3cspan style\x3d"font-weight: bold;"\x3e{point.point.date}\x3c/span\x3e\x3cbr/\x3e',
pointFormat:"{point.description}"},states:{hover:{lineWidthPlus:5,halo:{size:0}}},dataLabels:{enabled:!0,allowOverlap:!0,connectorWidth:1,connectorColor:"#000000",backgroundColor:"#ffffff",formatter:function(){return this.series.chart.styledMode?"\x3cspan\x3e\u25cf \x3c/span\x3e\x3cspan\x3e"+(this.point.date||"")+"\x3c/span\x3e\x3cbr/\x3e"+(this.point.label||""):'\x3cspan style\x3d"color:'+this.point.color+'"\x3e\u25cf \x3c/span\x3e\x3cspan style\x3d"font-weight: bold;" \x3e '+(this.point.date||"")+
"\x3c/span\x3e\x3cbr/\x3e"+(this.point.label||"")},borderWidth:1,borderColor:"#666666",distance:100,alternate:!0,verticalAlign:"middle",color:"#333333"},marker:{enabledThreshold:0,symbol:"square",height:15}},{requireSorting:!1,trackerGroups:["markerGroup","dataLabelsGroup"],drawLegendSymbol:k.LegendSymbolMixin.drawRectangle,drawTracker:k.TrackerMixin.drawTrackerPoint,init:function(){var a=this;n.prototype.init.apply(a,arguments);l(a,"drawDataLabels",function(){a.options.dataLabels.useHTML&&a.points.forEach(function(a){a.visible&&
a.dataLabel&&delete a.dataLabel.text.oldTextWidth});a.distributeDL()});l(a,"afterDrawDataLabels",function(){var c=a.options,b=c.dataLabels,d=a.hasRendered||0,e=m(b.defer,!!c.animation),f=a.connectorsGroup,g,f=a.plotGroup("connectorsGroup","data-labels-connectors",e&&!d?"hidden":"visible",b.zIndex||5);a.points.forEach(function(a){if(g=a.dataLabel)return v(g,"animate",function(a,b){this.targetPosition&&(this.targetPosition=b);return a.apply(this,Array.prototype.slice.call(arguments,1))}),g.targetPosition||
(g.targetPosition={}),a.connector?a.alignConnector():a.drawConnector()});e&&(f.attr({opacity:+d}),d||l(a,"afterAnimate",function(){a.visible&&f.show(!0);f[c.animation?"animate":"attr"]({opacity:1},{duration:200})}))})},alignDataLabel:function(a,c){var b=this.chart.inverted,d=this.visibilityMap.filter(function(a){return a}),e=this.visiblePointsCount,f=d.indexOf(a),d=this.options.dataLabels,g=a.userDLOptions||{},f=d.alternate?f&&f!==e-1?2:1.5:1,h,e=Math.floor(this.xAxis.len/e),k=c.padding;a.visible&&
(h=Math.abs(g.x||a.options.dataLabels.x),b?(b=2*(h-k)-a.itemHeight/2,b={width:b,textOverflow:c.width/b*c.height/2>e*f?"ellipsis":"none"}):b={width:g.width||d.width||e*f-2*k},c.css(b),this.chart.styledMode||c.shadow({}));n.prototype.alignDataLabel.apply(this,arguments)},processData:function(){var a=this,c=[],b,d=0,e;a.visibilityMap=a.getVisibilityMap();a.visibilityMap.forEach(function(a){a&&d++});a.visiblePointsCount=d;b=a.xAxis.options.max/d;for(e=1;e<=d;e++)c.push(b*e-b/2);a.visibilityMap.forEach(function(b,
d){b||c.splice(d,0,null===a.yData[d]?null:-99)});a.xData=c;a.yData=c.map(function(a){return r(a)?1:null});n.prototype.processData.call(this,arguments)},generatePoints:function(){var a=this;n.prototype.generatePoints.apply(a);a.points.forEach(function(c,b){c.applyOptions({x:a.xData[b]})})},getVisibilityMap:function(){return(this.data.length?this.data:this.userOptions.data).map(function(a){return a&&!1!==a.visible&&!a.isNull?a:!1})},distributeDL:function(){var a=this,c=a.options.dataLabels,b,d,e={},
f=1,g=c.distance;a.points.forEach(function(h){h.visible&&!h.isNull&&(b=h.options,d=h.options.dataLabels,a.hasRendered||(h.userDLOptions=p({},d)),e[a.chart.inverted?"x":"y"]=c.alternate&&f%2?-g:g,b.dataLabels=p(e,h.userDLOptions),f++)})},markerAttribs:function(a,c){var b=this.options.marker,d=a.marker||{},e=d.symbol||b.symbol,f=m(d.width,b.width,this.xAxis.len/this.visiblePointsCount),g=m(d.height,b.height),h=0;c&&(b=b.states[c]||{},c=d.states&&d.states[c]||{},h=m(c.radius,b.radius,h+(b.radiusPlus||
0)));a.hasImage=e&&0===e.indexOf("url");return{x:Math.floor(a.plotX)-f/2-h/2,y:a.plotY-g/2-h/2,width:f+h,height:g+h}},bindAxes:function(){n.prototype.bindAxes.call(this);q(this.xAxis.options,{gridLineWidth:0,lineWidth:0,min:0,dataMin:0,minPadding:0,max:100,dataMax:100,maxPadding:0,title:null,tickPositions:[]});q(this.yAxis.options,{gridLineWidth:0,min:.5,dataMin:.5,minPadding:0,max:1.5,dataMax:1.5,maxPadding:0,title:null,labels:{enabled:!1}})}},{init:function(){var a=t.prototype.init.apply(this,arguments);
a.name=m(a.name,a.date,"Event");a.y=1;return a},setVisible:function(a,c){var b=this,d=b.series,e=d.chart,f=d.options.ignoreHiddenPoint;c=m(c,f);a!==b.visible&&(b.visible=b.options.visible=a=void 0===a?!b.visible:a,d.options.data[d.data.indexOf(b)]=b.options,["graphic","dataLabel","connector"].forEach(function(c){if(b[c])b[c][a?"show":"hide"](!0)}),b.legendItem&&e.legend.colorizeItem(b,a),a||"hover"!==b.state||b.setState(""),f&&(d.isDirty=!0),c&&e.redraw())},setState:function(){var a=n.prototype.pointClass.prototype.setState;
this.isNull||a.apply(this,arguments)},getConnectorPath:function(){var a=this.series.chart,c=this.series.xAxis.len,b=a.inverted,d=b?"x2":"y2",e=this.dataLabel,f=e.targetPosition,g={x1:this.plotX,y1:this.plotY,x2:this.plotX,y2:f.y||e.y},h=g[d]<this.series.yAxis.len/2;b&&(g={x1:this.plotY,y1:c-this.plotX,x2:f.x||e.x,y2:c-this.plotX});h&&(g[d]+=e[b?"width":"height"]);return a.renderer.crispLine(["M",g.x1,g.y1,"L",g.x2,g.y2],e.options.connectorWidth||1)},drawConnector:function(){var a=this.series,c=this.dataLabel.options=
p({},a.options.dataLabels,this.options.dataLabels);this.connector=a.chart.renderer.path(this.getConnectorPath()).add(a.connectorsGroup);a.chart.styledMode||this.connector.attr({stroke:c.connectorColor,"stroke-width":c.connectorWidth,opacity:this.dataLabel.opacity})},alignConnector:function(){var a=this.connector,c=0<a.getBBox().y;a[c?"animate":"attr"]({d:this.getConnectorPath()})}});l(k.Chart,"afterHideOverlappingLabels",function(){var a,c;this.series.forEach(function(b){b.points&&b.points.forEach(function(b){a=
b.dataLabel;c=b.connector;a&&a.targetPosition&&c&&c.attr({opacity:a.targetPosition.opacity||a.newOpacity})})})})})(l)});
//# sourceMappingURL=timeline.js.map
