diff --git a/demo/script.js b/demo/script.js index 1c7a9fb..73ef83d 100755 --- a/demo/script.js +++ b/demo/script.js @@ -16,8 +16,8 @@ const ONE_HOUR = 60 * 60 * 1000, SIX_MONTHS = 6 * ONE_MONTH; var data = [], - start = new Date('2016-04-14T04:25:27.663Z'), - today = new Date('2016-05-03T04:00:00Z'); + start = new Date('2016-04-02T20:14:22.691Z'), + today = new Date('2016-05-02T17:59:06.134Z'); for (var x in json) { //json lives in external file for testing data[x] = {}; @@ -103,7 +103,6 @@ $('#datepicker').datepicker('setDate', today); $('#datepicker').on('changeDate', zoomFilter); $( document.body ).on( 'click', '.dropdown-menu li', function( event ) { - var $target = $( event.currentTarget ); $target.closest( '.dropdown' ) .find( '[data-bind="label"]' ).text( $target.text() ) @@ -113,7 +112,6 @@ $( document.body ).on( 'click', '.dropdown-menu li', function( event ) { zoomFilter(); return false; - }); function countNames(data) { @@ -175,5 +173,4 @@ $('#reset-button').click(function() { 'container': '#pf-timeline', 'placement': 'top' }); - }); diff --git a/dist/timeline.css b/dist/timeline.css index ce64d85..5d9b098 100644 --- a/dist/timeline.css +++ b/dist/timeline.css @@ -1,2 +1,2 @@ -.pf-timeline__zoom-area{fill:transparent;cursor:pointer}.pf-timeline__y-tick{stroke:#000;fill:none;stroke-width:1px}.pf-timeline__axes{fill:#fafafa}.pf-timeline__x-axis{position:absolute;z-index:50;stroke:#d1d1d1;fill:none;stroke-width:1px;shape-rendering:crispEdges}.pf-timeline__x-axis text{stroke:none;fill:#000;font-family:Open Sans;font-size:12px}.pf-timeline__label{font-weight:400}text.pf-timeline__drop{text-rendering:auto;font-size:10px;font-family:FontAwesome;opacity:.7;stroke:none;cursor:pointer}text.pf-timeline__drop:hover{font-size:21px;font-weight:700;paint-order:stroke}text.pf-timeline__event-group{font-size:18px}.pf-timeline__grid{stroke:#d1d1d1;cursor:all-scroll;shape-rendering:crispEdges}.pf-timeline__timestamp text{fill:#fff}.pf-timeline__timestamp rect{fill:#000;opacity:.7}.pf-timeline__marker{pointer-events:none}.pf-timeline__brush .extent{stroke:none;fill:#0088ce;fill-opacity:.25;shape-rendering:crispEdges}.pf-timeline__graph-body .pf-timeline__line{height:20px;padding:10px}.pf-timeline__zoom{position:absolute}.pf-timeline__context .pf-timeline__bar{fill:#bbb;shape-rendering:crispEdges}.pf-timeline__slider{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.pf-timeline__grid-stripes rect{fill:#fafafa;shape-rendering:crispEdges}.pf-timeline__grid-stripes line{stroke:#d1d1d1;stroke-width:1px;shape-rendering:crispEdges} +.timeline-pf-zoom-area{fill:transparent;cursor:pointer}.timeline-pf-y-tick{stroke:#000;fill:none;stroke-width:1px}.timeline-pf-axes{fill:#fafafa}.timeline-pf-x-axis{position:absolute;z-index:50;stroke:#d1d1d1;fill:none;stroke-width:1px;shape-rendering:crispEdges}.timeline-pf-x-axis text{stroke:none;fill:#000;font-family:Open Sans;font-size:12px}.timeline-pf-label{font-weight:400}text.timeline-pf-drop{text-rendering:auto;font-size:10px;font-family:FontAwesome;opacity:.7;stroke:none;cursor:pointer}text.timeline-pf-drop:hover{font-size:21px;font-weight:700;paint-order:stroke}text.timeline-pf-event-group{font-size:18px}.timeline-pf-grid{stroke:#d1d1d1;cursor:all-scroll;shape-rendering:crispEdges}.timeline-pf-timestamp text{fill:#fff}.timeline-pf-timestamp rect{fill:#000;opacity:.7}.timeline-pf-marker{pointer-events:none}.timeline-pf-brush .extent{stroke:none;fill:#0088ce;fill-opacity:.25;shape-rendering:crispEdges}.timeline-pf-graph-body .timeline-pf-line{height:20px;padding:10px}.timeline-pf-zoom{position:absolute}.timeline-pf-context .timeline-pf-bar{fill:#bbb;shape-rendering:crispEdges}.timeline-pf-slider{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.timeline-pf-grid-stripes rect{fill:#fafafa;shape-rendering:crispEdges}.timeline-pf-grid-stripes line{stroke:#d1d1d1;stroke-width:1px;shape-rendering:crispEdges} /*# sourceMappingURL=timeline.css.map*/ \ No newline at end of file diff --git a/dist/timeline.js b/dist/timeline.js index accfee8..b3ea238 100644 --- a/dist/timeline.js +++ b/dist/timeline.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3")):"function"==typeof define&&define.amd?define(["d3"],e):"object"==typeof exports?exports.timeline=e(require("d3")):t.timeline=e(t.d3)}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var a=n[i]={exports:{},id:i,loaded:!1};return t[i].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(9),t.exports=n(13)},function(e,n){e.exports=t},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=n(1),r=i(a),o={start:new Date(0),end:new Date,minScale:0,maxScale:1/0,width:null,padding:{top:30,left:40,bottom:40,right:40},lineHeight:40,labelWidth:140,sliderWidth:30,contextHeight:50,locale:null,axisFormat:null,tickFormat:[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%b %d",function(t){return t.getMonth()&&t.getDate()}],["%b",function(t){return t.getMonth()}],["%Y",function(){return!0}]],eventHover:null,eventZoom:null,eventClick:null,eventLineColor:function(t,e){switch(e%5){case 0:return"#00659c";case 1:return"#0088ce";case 2:return"#3f9c35";case 3:return"#ec7a08";case 4:return"#cc0000"}},eventColor:null,eventShape:function(t){return t.hasOwnProperty("events")?"":""},eventPopover:function(t){var e="";if(t.hasOwnProperty("events"))e="Group of "+t.events.length+" events";else{for(var n in t.details)e=e+n.charAt(0).toUpperCase()+n.slice(1)+": "+t.details[n]+"
";e=e+"Date: "+t.date}return e},marker:!0,context:!0,slider:!0,eventGrouping:6e4};o.dateFormat=o.locale?o.locale.timeFormat("%a %x %I:%M %p"):r["default"].time.format("%a %x %I:%M %p"),t.exports=o},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(10),r=i(a);e["default"]=function(t,e,n,i){return function(a){var o=function(e,a){var o=t.selectAll(".pf-timeline__x-axis."+e).data([{}]);o.enter().append("g").classed("pf-timeline__x-axis",!0).classed(e,!0).call(r["default"](a,n)).attr("transform","translate(0,"+("focus"===e?i.height:i.height+i.ctxHeight+40)+")"),o.call(r["default"](a,n,i.width)),o.exit().remove()};o("focus",e.x),n.context&&o("context",e.ctx)}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e,n){var i={};for(var a in t)for(var r in t[a].data){var o=Math.floor(t[a].data[r].date/e)*e;i[o]=i[o]+1||1}for(var l in i){var s=new Date;s.setTime(+l),n.push({date:s,count:i[l]})}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=i(r);e["default"]=function(t,e,n,i,r){var l=t.append("g").classed("pf-timeline__context",!0).attr("width",n.width).attr("height",n.ctxHeight).attr("clip-path","url(#pf-timeline__context-brush-clipper)").attr("transform","translate("+(i.padding.left+i.labelWidth)+","+(i.padding.top+n.height+40)+")"),s=[],u=36e5,d=Math.ceil(u/(e.ctx.domain()[1]-e.ctx.domain()[0])*n.width);a(r,u,s),s.sort(function(t,e){return t.datee.date?1:0}),e.cty.domain([0,o["default"].max(s,function(t){return t.count})]),l.selectAll(".pf-timeline__bar").data(s).enter().append("rect").attr("class","pf-timeline__bar").attr("x",function(t){return e.ctx(t.date)}).attr("y",function(t){return e.cty(t.count)}).attr("width",d).attr("height",function(t){return n.ctxHeight-e.cty(t.count)}),l.append("g").attr("class","pf-timeline__brush")}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e,n){return function(i){var a=t.selectAll(".pf-timeline__drop-line").data(i);a.enter().append("g").classed("pf-timeline__drop-line",!0).attr("transform",function(t,i){return"translate(0, "+(e.y(i)+n.lineHeight/2)+")"}).attr("fill",n.eventLineColor),a.each(function(t){var i=d3.select(this).selectAll(".pf-timeline__drop").data(t.data);i.attr("transform",function(t){return"translate("+e.x(t.date)+")"});var a=i.enter().append("text").classed("pf-timeline__drop",!0).classed("pf-timeline__event-group",function(t){return t.hasOwnProperty("events")?!0:!1}).attr("transform",function(t){return"translate("+e.x(t.date)+")"}).attr("fill",n.eventColor).attr("text-anchor","middle").attr("data-toggle","popover").attr("data-html","true").attr("data-content",n.eventPopover).attr("dominant-baseline","central").text(n.eventShape);n.eventClick&&a.on("click",n.eventClick),n.eventHover&&a.on("mouseover",n.eventHover),i.exit().on("click",null).on("mouseover",null),i.exit().remove()}),a.exit().remove()}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),r=(i(a),n(3)),o=i(r),l=n(5),s=i(l),u=n(7),d=i(u),c=n(8),f=i(c);e["default"]=function(t,e,n,i){var a=t.append("defs");a.append("clipPath").attr("id","pf-timeline__drops-container-clipper").append("rect").attr("id","pf-timeline__drops-container-rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height),i.context&&a.append("clipPath").attr("id","pf-timeline__context-brush-clipper").append("polygon").attr("points","0,0 "+e.width+",0 "+(e.width+i.sliderWidth)+","+e.ctxHeight/2+" "+e.width+","+e.ctxHeight+" 0,"+e.ctxHeight+" "+-i.sliderWidth+","+e.ctxHeight/2);var r=a.append("pattern").attr("class","pf-timeline__grid-stripes").attr("id","pf-timeline__grid-stripes").attr("width",e.width).attr("height",2*i.lineHeight).attr("patternUnits","userSpaceOnUse");r.append("rect").attr("width",e.width).attr("height",i.lineHeight),r.append("line").attr("x1",0).attr("x2",e.width).attr("y1",i.lineHeight).attr("y2",i.lineHeight),r.append("line").attr("x1",0).attr("x2",e.width).attr("y1","1px").attr("y2","1px");var l=t.append("g").classed("pf-timeline__grid",!0).attr("fill","url(#pf-timeline__grid-stripes)").attr("transform","translate("+(i.padding.left+i.labelWidth)+", "+i.padding.top+")"),u=t.append("g").classed("pf-timeline__labels",!0).attr("transform","translate("+i.padding.left+", "+i.padding.top+")"),c=t.append("g").classed("pf-timeline__axes",!0).attr("transform","translate("+(i.padding.left+i.labelWidth)+", "+i.padding.top+")"),p=t.append("g").classed("pf-timeline__drops-container",!0).attr("clip-path","url(#pf-timeline__drops-container-clipper)").attr("transform","translate("+(i.padding.left+i.labelWidth)+", "+i.padding.top+")");if(i.marker){var h=t.append("g").classed("pf-timeline__timestamp",!0).attr("height",30).attr("transform","translate("+(i.padding.left+i.labelWidth)+", "+i.padding.top+")");f["default"](l,h,n,e,i.dateFormat)}var m=o["default"](c,n,i,e),g=d["default"](u,n,i),v=s["default"](p,n,i);return function(t){v(t),g(t),m(t)}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e,n){return function(i){var a=t.selectAll(".pf-timeline__label").data(i),r=function(t){for(var e=0,n=0;n=0?" ("+e+")":"")};a.text(o),a.enter().append("text").classed("pf-timeline__label",!0).attr("transform",function(t,i){return"translate("+(n.labelWidth-20)+" "+(e.y(i)+n.lineHeight/2)+")"}).attr("dominant-baseline","central").attr("text-anchor","end").text(o),a.exit().remove()}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),r=i(a);e["default"]=function(t,e,n,i,a){function o(){var e=r["default"].mouse(t[0][0])[0];l.attr("transform","translate("+e+")"),u.attr("transform","translate("+(e-75)+", -25)"),d.attr("transform","translate("+e+", -9)").text(a(n.x.invert(e)))}t.append("rect").attr("width",i.width).attr("height",i.height).on("mouseover",function(){l.style("display",null),d.style("display",null),u.style("display",null)}).on("mouseout",function(){l.style("display","none"),d.style("display","none"),u.style("display","none")}).on("mousemove",o);var l=t.append("line").classed("pf-timeline__marker",!0).attr("y1",0).attr("y2",i.height),s=n.x.domain(),u=e.append("rect").attr("height","24").attr("width","150").style("display","none"),d=e.append("text").text(a(s[1])).attr("transform","translate("+n.x.range()[1]+")").attr("text-anchor","middle")}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(){function t(t){t.each(function(e){var l=e;e=o(e,n.eventGrouping),n.lineHeight=e.length<=3?80:40,u["default"].select(this).select(".pf-timeline__chart").remove(),u["default"].select(this).selectAll(".pf-timeline__zoom").remove();var d=40,c=n.width||t.node().clientWidth,f=e.length*n.lineHeight,p={width:c-n.padding.right-n.padding.left-n.labelWidth-(n.slider?n.sliderWidth:0),height:f,ctxHeight:n.contextHeight,outer_height:f+n.padding.top+n.padding.bottom+(n.context?n.contextHeight+d:0)},h={x:s(p.width,[n.start,n.end]),y:a(e),ctx:s(p.width,[u["default"].min(r(e)),n.end]),cty:u["default"].scale.linear().range([p.ctxHeight,0])},g=u["default"].select(this).append("svg").classed("pf-timeline__chart",!0).attr({width:c,height:p.outer_height}),_=m["default"](g,p,h,n).bind(t);_(e),n.context&&v["default"](g,h,p,n,l),i.updateZoom(u["default"].select(this),p,h,n,e,_)})}var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l({},p["default"],e),i=new x["default"],a=function(t){return u["default"].scale.ordinal().domain(t.map(function(t){return t.name})).range(t.map(function(t,e){return e*n.lineHeight}))},s=function(t,e){return u["default"].time.scale().range([0,t]).domain(e)};return c["default"](t,n),t.Zoom=i,t}function r(t){for(var e=[],n=0;na[1]&&(e=a[1]),r=(i-l.x)/l.k,l.k=e,o=r*l.k+l.x,l.x+=i-o,this.interpolateZoom([l.x,0],l.k,n)}},{key:"interpolateZoom",value:function(t,e,n){var i=this;return s["default"].transition().duration(n).tween("zoom",function(){if(i.zoom){var n=function(){var n=s["default"].interpolate(i.zoom.translate(),t),a=s["default"].interpolate(i.zoom.scale(),e);return{v:function(t){i.zoom.scale(a(t)).translate(n(t)),i.zoom.event(i.grid)}}}();if("object"===("undefined"==typeof n?"undefined":r(n)))return n.v}})}},{key:"getRange",value:function(t){return t[1].getTime()-t[0].getTime()}},{key:"getScale",value:function(t,e){return t/e}},{key:"zoomFilter",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,i=e-t,a=this.dimensions.width,r=this.zoom.scaleExtent(),o=this.zoom.translate()[0],l=this.zoom.scale(),s=this.zoom.scale(),u=this.getRange(this.scales.x.domain()),d=void 0;s*=this.getScale(this.getRange(this.scales.x.domain()),i),sr[1]&&(s=r[1]),d=(this.scales.x.domain()[0]-t)*(a/u),o+=d,o*=s/l,this.interpolateZoom([o,0],s,n)}}]),t}();e["default"]=u},function(t,e,n){"use strict";function i(t,e){function n(n){return function(i){return arguments.length?(e[n]=i,t):e[n]}}for(var i in e)t[i]=n(i)}t.exports=i},function(t,e){}])}); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3")):"function"==typeof define&&define.amd?define(["d3"],e):"object"==typeof exports?exports.timeline=e(require("d3")):t.timeline=e(t.d3)}(this,function(t){return function(t){function e(a){if(n[a])return n[a].exports;var i=n[a]={exports:{},id:a,loaded:!1};return t[a].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(9),t.exports=n(13)},function(e,n){e.exports=t},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}var i=n(1),r=a(i),o={start:new Date(0),end:new Date,contextStart:null,contextEnd:null,minScale:0,maxScale:1/0,width:null,padding:{top:30,left:40,bottom:40,right:40},lineHeight:40,labelWidth:140,sliderWidth:30,contextHeight:50,locale:null,axisFormat:null,tickFormat:[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%b %d",function(t){return t.getMonth()&&t.getDate()}],["%b",function(t){return t.getMonth()}],["%Y",function(){return!0}]],eventHover:null,eventZoom:null,eventClick:null,eventLineColor:function(t,e){switch(e%5){case 0:return"#00659c";case 1:return"#0088ce";case 2:return"#3f9c35";case 3:return"#ec7a08";case 4:return"#cc0000"}},eventColor:null,eventShape:function(t){return t.hasOwnProperty("events")?"":""},eventPopover:function(t){var e="";if(t.hasOwnProperty("events"))e="Group of "+t.events.length+" events";else{for(var n in t.details)e=e+n.charAt(0).toUpperCase()+n.slice(1)+": "+t.details[n]+"
";e=e+"Date: "+t.date}return e},marker:!0,context:!0,slider:!0,eventGrouping:6e4};o.dateFormat=o.locale?o.locale.timeFormat("%a %x %I:%M %p"):r["default"].time.format("%a %x %I:%M %p"),t.exports=o},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(10),r=a(i);e["default"]=function(t,e,n,a){return function(i){var o=function(e,i){var o=t.selectAll(".timeline-pf-x-axis."+e).data([{}]);o.enter().append("g").classed("timeline-pf-x-axis",!0).classed(e,!0).call(r["default"](i,n)).attr("transform","translate(0,"+("focus"===e?a.height:a.height+a.ctxHeight+40)+")"),o.call(r["default"](i,n,a.width)),o.exit().remove()};o("focus",e.x),n.context&&o("context",e.ctx)}}},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,n){var a={};for(var i in t)for(var r in t[i].data){var o=Math.floor(t[i].data[r].date/e)*e;a[o]=a[o]+1||1}for(var l in a){var s=new Date;s.setTime(+l),n.push({date:s,count:a[l]})}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=a(r);e["default"]=function(t,e,n,a,r){var l=t.append("g").classed("timeline-pf-context",!0).attr("width",n.width).attr("height",n.ctxHeight).attr("clip-path","url(#timeline-pf-context-brush-clipper)").attr("transform","translate("+(a.padding.left+a.labelWidth)+","+(a.padding.top+n.height+40)+")"),s=[],d=36e5,u=Math.ceil(d/(e.ctx.domain()[1]-e.ctx.domain()[0])*n.width);i(r,d,s),s.sort(function(t,e){return t.datee.date?1:0}),e.cty.domain([0,o["default"].max(s,function(t){return t.count})]),l.selectAll(".timeline-pf-bar").data(s).enter().append("rect").attr("class","timeline-pf-bar").attr("x",function(t){return e.ctx(t.date)}).attr("y",function(t){return e.cty(t.count)}).attr("width",u).attr("height",function(t){return n.ctxHeight-e.cty(t.count)}),l.append("g").attr("class","timeline-pf-brush")}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e,n){return function(a){var i=t.selectAll(".timeline-pf-drop-line").data(a);i.enter().append("g").classed("timeline-pf-drop-line",!0).attr("transform",function(t,a){return"translate(0, "+(e.y(a)+n.lineHeight/2)+")"}).attr("fill",n.eventLineColor),i.each(function(t){var a=d3.select(this).selectAll(".timeline-pf-drop").data(t.data);a.attr("transform",function(t){return"translate("+e.x(t.date)+")"});var i=a.enter().append("text").classed("timeline-pf-drop",!0).classed("timeline-pf-event-group",function(t){return t.hasOwnProperty("events")?!0:!1}).attr("transform",function(t){return"translate("+e.x(t.date)+")"}).attr("fill",n.eventColor).attr("text-anchor","middle").attr("data-toggle","popover").attr("data-html","true").attr("data-content",n.eventPopover).attr("dominant-baseline","central").text(n.eventShape);n.eventClick&&i.on("click",n.eventClick),n.eventHover&&i.on("mouseover",n.eventHover),a.exit().on("click",null).on("mouseover",null),a.exit().remove()}),i.exit().remove()}}},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=(a(i),n(3)),o=a(r),l=n(5),s=a(l),d=n(7),u=a(d),c=n(8),f=a(c);e["default"]=function(t,e,n,a){var i=t.append("defs");i.append("clipPath").attr("id","timeline-pf-drops-container-clipper").append("rect").attr("id","timeline-pf-drops-container-rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height),a.context&&i.append("clipPath").attr("id","timeline-pf-context-brush-clipper").append("polygon").attr("points","0,0 "+e.width+",0 "+(e.width+a.sliderWidth)+","+e.ctxHeight/2+" "+e.width+","+e.ctxHeight+" 0,"+e.ctxHeight+" "+-a.sliderWidth+","+e.ctxHeight/2);var r=i.append("pattern").attr("class","timeline-pf-grid-stripes").attr("id","timeline-pf-grid-stripes").attr("width",e.width).attr("height",2*a.lineHeight).attr("patternUnits","userSpaceOnUse");r.append("rect").attr("width",e.width).attr("height",a.lineHeight),r.append("line").attr("x1",0).attr("x2",e.width).attr("y1",a.lineHeight).attr("y2",a.lineHeight),r.append("line").attr("x1",0).attr("x2",e.width).attr("y1","1px").attr("y2","1px");var l=t.append("g").classed("timeline-pf-grid",!0).attr("fill","url(#timeline-pf-grid-stripes)").attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")"),d=t.append("g").classed("timeline-pf-labels",!0).attr("transform","translate("+a.padding.left+", "+a.padding.top+")"),c=t.append("g").classed("timeline-pf-axes",!0).attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")"),p=t.append("g").classed("timeline-pf-drops-container",!0).attr("clip-path","url(#timeline-pf-drops-container-clipper)").attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")");if(a.marker){var h=t.append("g").classed("timeline-pf-timestamp",!0).attr("height",30).attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")");f["default"](l,h,n,e,a.dateFormat)}var m=o["default"](c,n,a,e),g=u["default"](d,n,a),v=s["default"](p,n,a);return function(t){v(t),g(t),m(t)}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e,n){return function(a){var i=t.selectAll(".timeline-pf-label").data(a),r=function(t){for(var e=0,n=0;n=0?" ("+e+")":"")};i.text(o),i.enter().append("text").classed("timeline-pf-label",!0).attr("transform",function(t,a){return"translate("+(n.labelWidth-20)+" "+(e.y(a)+n.lineHeight/2)+")"}).attr("dominant-baseline","central").attr("text-anchor","end").text(o),i.exit().remove()}}},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=a(i);e["default"]=function(t,e,n,a,i){function o(){var e=r["default"].mouse(t[0][0])[0];l.attr("transform","translate("+e+")"),d.attr("transform","translate("+(e-75)+", -25)"),u.attr("transform","translate("+e+", -9)").text(i(n.x.invert(e)))}t.append("rect").attr("width",a.width).attr("height",a.height).on("mouseover",function(){l.style("display",null),u.style("display",null),d.style("display",null)}).on("mouseout",function(){l.style("display","none"),u.style("display","none"),d.style("display","none")}).on("mousemove",o);var l=t.append("line").classed("timeline-pf-marker",!0).attr("y1",0).attr("y2",a.height),s=n.x.domain(),d=e.append("rect").attr("height","24").attr("width","150").style("display","none"),u=e.append("text").text(i(s[1])).attr("transform","translate("+n.x.range()[1]+")").attr("text-anchor","middle")}},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}function i(){function t(t){t.each(function(e){var l=e;e=o(e,n.eventGrouping),n.lineHeight=e.length<=3?80:40,n.contextStart=n.contextStart||d["default"].min(r(e)),n.contextEnd=n.contextEnd||n.end,d["default"].select(this).select(".timeline-pf-chart").remove(),d["default"].select(this).selectAll(".timeline-pf-zoom").remove();var u=40,c=n.width||t.node().clientWidth,f=e.length*n.lineHeight,p={width:c-n.padding.right-n.padding.left-n.labelWidth-(n.slider?n.sliderWidth:0),height:f,ctxHeight:n.contextHeight,outer_height:f+n.padding.top+n.padding.bottom+(n.context?n.contextHeight+u:0)},h={x:s(p.width,[n.start,n.end]),y:i(e),ctx:s(p.width,[n.contextStart,n.contextEnd]),cty:d["default"].scale.linear().range([p.ctxHeight,0])},g=d["default"].select(this).append("svg").classed("timeline-pf-chart",!0).attr({width:c,height:p.outer_height}),x=m["default"](g,p,h,n).bind(t);x(e),n.context&&v["default"](g,h,p,n,l),a.updateZoom(d["default"].select(this),p,h,n,e,x)})}var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l({},p["default"],e),a=new y["default"],i=function(t){return d["default"].scale.ordinal().domain(t.map(function(t){return t.name})).range(t.map(function(t,e){return e*n.lineHeight}))},s=function(t,e){return d["default"].time.scale().range([0,t]).domain(e)};return c["default"](t,n),t.Zoom=a,t}function r(t){for(var e=[],n=0;ni[1]&&(e=i[1]),r=(a-l.x)/l.k,l.k=e,o=r*l.k+l.x,l.x+=a-o,this.interpolateZoom([l.x,0],l.k,n)}},{key:"interpolateZoom",value:function(t,e,n){var a=this;return s["default"].transition().duration(n).tween("zoom",function(){if(a.zoom){var n=function(){var n=s["default"].interpolate(a.zoom.translate(),t),i=s["default"].interpolate(a.zoom.scale(),e);return{v:function(t){a.zoom.scale(i(t)).translate(n(t)),a.zoom.event(a.grid)}}}();if("object"===("undefined"==typeof n?"undefined":r(n)))return n.v}})}},{key:"getRange",value:function(t){return t[1].getTime()-t[0].getTime()}},{key:"getScale",value:function(t,e){return t/e}},{key:"zoomFilter",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,a=e-t,i=this.dimensions.width,r=this.zoom.scaleExtent(),o=this.zoom.translate()[0],l=this.zoom.scale(),s=this.zoom.scale(),d=this.getRange(this.scales.x.domain()),u=void 0;s*=this.getScale(this.getRange(this.scales.x.domain()),a),sr[1]&&(s=r[1]),u=(this.scales.x.domain()[0]-t)*(i/d),o+=u,o*=s/l,this.interpolateZoom([o,0],s,n)}}]),t}();e["default"]=d},function(t,e,n){"use strict";function a(t,e){function n(n){return function(a){return arguments.length?(e[n]=a,t):e[n]}}for(var a in e)t[a]=n(a)}t.exports=a},function(t,e){}])}); //# sourceMappingURL=timeline.js.map \ No newline at end of file diff --git a/dist/timeline.js.map b/dist/timeline.js.map index fd9715e..8ecae7b 100644 --- a/dist/timeline.js.map +++ b/dist/timeline.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///timeline.js","webpack:///webpack/bootstrap 36645c5ca9571bf50b98","webpack:///external \"d3\"","webpack:///./src/config.js","webpack:///./src/drawer/axes.js","webpack:///./src/drawer/context.js","webpack:///./src/drawer/drops.js","webpack:///./src/drawer/index.js","webpack:///./src/drawer/labels.js","webpack:///./src/drawer/marker.js","webpack:///./src/timeline.js","webpack:///./src/xAxis.js","webpack:///./src/zoom.js","webpack:///./~/configurable.js/configurable.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_d","_d2","config","start","Date","end","minScale","maxScale","Infinity","width","padding","top","left","bottom","right","lineHeight","labelWidth","sliderWidth","contextHeight","locale","axisFormat","tickFormat","d","getMilliseconds","getSeconds","getMinutes","getHours","getMonth","getDate","eventHover","eventZoom","eventClick","eventLineColor","i","eventColor","eventShape","hasOwnProperty","eventPopover","popover","events","length","details","charAt","toUpperCase","slice","date","marker","context","slider","eventGrouping","dateFormat","timeFormat","time","format","Object","defineProperty","value","_xAxis","_xAxis2","axesContainer","scales","configuration","dimensions","data","axis","scope","scale","selection","selectAll","enter","append","classed","attr","height","ctxHeight","exit","remove","x","ctx","countEvents","toRoundTo","counts","temp","j","rounded","Math","floor","k","tempDate","setTime","push","count","svg","contextContainer","roundTo","barWidth","ceil","domain","sort","a","b","cty","max","dropLines","idx","y","each","drop","drops","d3","select","shape","text","on","_axes","_axes2","_drops","_drops2","_labels","_labels2","_marker","_marker2","defs","pattern","gridContainer","labelsContainer","dropsContainer","stampContainer","axes","labels","container","undefined","name","moveMarker","pos","mouse","timeBox","timeStamp","invert","style","range","timeline","timelineGraph","ungroupedData","groupEvents","finalConfiguration","SCALEHEIGHT","outer_width","node","clientWidth","outer_height","xScale","yScale","min","getDates","linear","draw","_drawer2","bind","_context2","zoomInstance","updateZoom","arguments","_zoom2","ordinal","map","timeBounds","_configurable2","Zoom","toReturn","round","_extends","assign","target","source","key","prototype","_configurable","_config","_config2","_drawer","_context","_zoom","chart","tickFormatData","t","multi","numTicks","orient","ticks","_classCallCheck","instance","Constructor","TypeError","_typeof","Symbol","iterator","constructor","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","zoom","callback","_this","ONE_MINUTE","ONE_HOUR","ONE_DAY","ONE_WEEK","ONE_MONTH","grid","sliderScale","log","base","behavior","size","scaleExtent","brush","zoomIn","zoomClick","zoomOut","offsetHeight","offsetWidth","extent","brushed","requestAnimationFrame","property","empty","zoomFilter","factor","target_zoom","duration","center","translate0","l","view","translate","event","interpolateZoom","_this2","transition","tween","_ret","iTranslate","interpolate","iScale","v","Extent","getTime","oldRange","newRange","fromTime","toTime","curZoom","cur_width","getRange","startDiff","getScale","targetFunction","configure","item"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,OACA,kBAAAC,gBAAAC,IACAD,QAAA,MAAAJ,GACA,gBAAAC,SACAA,QAAA,SAAAD,EAAAG,QAAA,OAEAJ,EAAA,SAAAC,EAAAD,EAAA,KACCO,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAvBA,GAAAU,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASP,EAAQD,EAASQ,GAE/BA,EAAoB,GACpBP,EAAOD,QAAUQ,EAAoB,KAKhC,SAASP,EAAQD,GE9DvBC,EAAAD,QAAAM,GFoEM,SAASL,EAAQD,EAASQ,GAE/B,YAMA,SAASS,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAASF,GG5ExF,GAAAG,GAAAb,EAAA,GH0EKc,EAAML,EAAuBI,GGxE5BE,GACJC,MAAO,GAAIC,MAAK,GAChBC,IAAK,GAAID,MACTE,SAAU,EACVC,SAAUC,IACVC,MAAO,KACPC,SACEC,IAAK,GACLC,KAAM,GACNC,OAAQ,GACRC,MAAO,IAETC,WAAY,GACZ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AYD,EAAO,GAAGC,aZsoBtC9E,IAAK,WACLvH,MAAO,SYpoBDsM,EAAUC,GACjB,MAAOD,GAAWC,KZuoBjBhF,IAAK,aACLvH,MAAO,SYroBCwM,EAAUC,GAAwB,GAAhBrB,GAAgB1E,UAAA1H,OAAA,GAAA2F,SAAA+B,UAAA,GAAAA,UAAA,GAAL,IAClCtB,EAAQqH,EAASD,EACjBvP,EAAQzB,KAAK8E,WAAWrD,MACxB2N,EAASpP,KAAK+N,KAAKc,cACnBoB,EAAYjQ,KAAK+N,KAAKkC,YAAY,GAClCiB,EAAUlR,KAAK+N,KAAK7I,QACpByK,EAAc3P,KAAK+N,KAAK7I,QACxBiM,EAAYnR,KAAKoR,SAASpR,KAAK4E,OAAOiB,EAAEoB,UACxCoK,QAEJ1B,IAA4B3P,KAAKsR,SAAStR,KAAKoR,SAASpR,KAAK4E,OAAOiB,EAAEoB,UAAW2C,GAE7E+F,EAAcP,EAAO,GACvBO,EAAcP,EAAO,GACZO,EAAcP,EAAO,KAC9BO,EAAcP,EAAO,IAGvBiC,GAAarR,KAAK4E,OAAOiB,EAAEoB,SAAS,GAAK+J,IAAavP,EAAQ0P,GAE9DlB,GAAaoB,EAEbpB,GAA0BN,EAAcuB,EAExClR,KAAKmQ,iBAAiBF,EAAW,GAAIN,EAAaC,OZ2oB5C7B,IAGTpO,cYh1BoBoO,GZo1Bf,SAASnO,EAAQD,EAASQ,Gat1BhC,YAEA,SAAAwN,GAAA4D,EAAArQ,GAEA,QAAAsQ,GAAAC,GACA,gBAAAjN,GACA,MAAA0G,WAAA1H,QACAtC,EAAAuQ,GAAAjN,EAEA+M,GAHArQ,EAAAuQ,IAOA,OAAAA,KAAAvQ,GACAqQ,EAAAE,GAAAD,EAAAC,GAKA7R,EAAAD,QAAAgO,Gbk2BM,SAAS/N,EAAQD","file":"timeline.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"timeline\"] = factory(require(\"d3\"));\n\telse\n\t\troot[\"timeline\"] = factory(root[\"d3\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"timeline\"] = factory(require(\"d3\"));\n\telse\n\t\troot[\"timeline\"] = factory(root[\"d3\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(9);\n\tmodule.exports = __webpack_require__(13);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar config = {\n\t start: new Date(0),\n\t end: new Date(),\n\t minScale: 0,\n\t maxScale: Infinity,\n\t width: null,\n\t padding: {\n\t top: 30, //must be at least 24 for marker to display properly\n\t left: 40,\n\t bottom: 40,\n\t right: 40\n\t },\n\t lineHeight: 40,\n\t labelWidth: 140,\n\t sliderWidth: 30,\n\t contextHeight: 50,\n\t locale: null,\n\t axisFormat: null,\n\t tickFormat: [['.%L', function (d) {\n\t return d.getMilliseconds();\n\t }], [':%S', function (d) {\n\t return d.getSeconds();\n\t }], ['%I:%M', function (d) {\n\t return d.getMinutes();\n\t }], ['%I %p', function (d) {\n\t return d.getHours();\n\t }], ['%b %d', function (d) {\n\t return d.getMonth() && d.getDate();\n\t }], ['%b', function (d) {\n\t return d.getMonth();\n\t }], ['%Y', function () {\n\t return true;\n\t }]],\n\t eventHover: null,\n\t eventZoom: null,\n\t eventClick: null,\n\t eventLineColor: function eventLineColor(d, i) {\n\t switch (i % 5) {\n\t case 0:\n\t return \"#00659c\";\n\t case 1:\n\t return \"#0088ce\";\n\t case 2:\n\t return \"#3f9c35\";\n\t case 3:\n\t return \"#ec7a08\";\n\t case 4:\n\t return \"#cc0000\";\n\t }\n\t },\n\t eventColor: null,\n\t eventShape: function eventShape(d) {\n\t if (d.hasOwnProperty(\"events\")) {\n\t return '\\uF140';\n\t } else {\n\t return '\\uF111';\n\t }\n\t },\n\t eventPopover: function eventPopover(d) {\n\t var popover = '';\n\t if (d.hasOwnProperty(\"events\")) {\n\t popover = 'Group of ' + d.events.length + ' events';\n\t } else {\n\t for (var i in d.details) {\n\t popover = popover + i.charAt(0).toUpperCase() + i.slice(1) + ': ' + d.details[i] + '
';\n\t }\n\t popover = popover + 'Date: ' + d.date;\n\t }\n\t return popover;\n\t },\n\t marker: true,\n\t context: true,\n\t slider: true,\n\t eventGrouping: 60000 };\n\t\n\tconfig.dateFormat = config.locale ? config.locale.timeFormat('%a %x %I:%M %p') : _d2.default.time.format('%a %x %I:%M %p');\n\t\n\tmodule.exports = config;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _xAxis = __webpack_require__(10);\n\t\n\tvar _xAxis2 = _interopRequireDefault(_xAxis);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (axesContainer, scales, configuration, dimensions) {\n\t return function (data) {\n\t var axis = function axis(scope, scale) {\n\t var selection = axesContainer.selectAll('.pf-timeline__x-axis.' + scope).data([{}]);\n\t\n\t selection.enter().append('g').classed('pf-timeline__x-axis', true).classed(scope, true).call((0, _xAxis2.default)(scale, configuration)).attr('transform', 'translate(0,' + (scope === 'focus' ? dimensions.height : dimensions.height + dimensions.ctxHeight + 40) + ')');\n\t\n\t selection.call((0, _xAxis2.default)(scale, configuration, dimensions.width));\n\t\n\t selection.exit().remove();\n\t };\n\t\n\t axis('focus', scales.x);\n\t\n\t if (configuration.context) {\n\t axis('context', scales.ctx);\n\t }\n\t };\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (svg, scales, dimensions, configuration, data) {\n\t\n\t var contextContainer = svg.append(\"g\").classed('pf-timeline__context', true).attr('width', dimensions.width).attr('height', dimensions.ctxHeight).attr('clip-path', 'url(#pf-timeline__context-brush-clipper)').attr(\"transform\", 'translate(' + (configuration.padding.left + configuration.labelWidth) + ',' + (configuration.padding.top + dimensions.height + 40) + ')');\n\t\n\t var counts = [];\n\t var roundTo = 3600000; //one hour\n\t var barWidth = Math.ceil(roundTo / (scales.ctx.domain()[1] - scales.ctx.domain()[0]) * dimensions.width);\n\t\n\t countEvents(data, roundTo, counts);\n\t counts.sort(function (a, b) {\n\t if (a.date < b.date) {\n\t return -1;\n\t }\n\t if (a.date > b.date) {\n\t return 1;\n\t }\n\t return 0;\n\t });\n\t scales.cty.domain([0, _d2.default.max(counts, function (d) {\n\t return d.count;\n\t })]);\n\t\n\t contextContainer.selectAll(\".pf-timeline__bar\").data(counts).enter().append(\"rect\").attr(\"class\", \"pf-timeline__bar\").attr(\"x\", function (d) {\n\t return scales.ctx(d.date);\n\t }).attr(\"y\", function (d) {\n\t return scales.cty(d.count);\n\t }).attr(\"width\", barWidth).attr(\"height\", function (d) {\n\t return dimensions.ctxHeight - scales.cty(d.count);\n\t });\n\t\n\t contextContainer.append(\"g\").attr(\"class\", \"pf-timeline__brush\");\n\t};\n\t\n\tfunction countEvents(data, toRoundTo, counts) {\n\t var temp = {};\n\t for (var i in data) {\n\t for (var j in data[i].data) {\n\t var rounded = Math.floor(data[i].data[j].date / toRoundTo) * toRoundTo;\n\t temp[rounded] = temp[rounded] + 1 || 1;\n\t }\n\t }\n\t for (var k in temp) {\n\t var tempDate = new Date();\n\t tempDate.setTime(+k);\n\t counts.push({ 'date': tempDate, 'count': temp[k] });\n\t }\n\t};\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (svg, scales, configuration) {\n\t return function dropsSelector(data) {\n\t var dropLines = svg.selectAll('.pf-timeline__drop-line').data(data);\n\t\n\t dropLines.enter().append('g').classed('pf-timeline__drop-line', true).attr('transform', function (d, idx) {\n\t return 'translate(0, ' + (scales.y(idx) + configuration.lineHeight / 2) + ')';\n\t }).attr('fill', configuration.eventLineColor);\n\t\n\t dropLines.each(function dropLineDraw(drop) {\n\t\n\t var drops = d3.select(this).selectAll('.pf-timeline__drop').data(drop.data);\n\t\n\t drops.attr('transform', function (d) {\n\t return 'translate(' + scales.x(d.date) + ')';\n\t });\n\t\n\t var shape = drops.enter().append('text').classed('pf-timeline__drop', true).classed('pf-timeline__event-group', function (d) {\n\t return d.hasOwnProperty(\"events\") ? true : false;\n\t }).attr('transform', function (d) {\n\t return 'translate(' + scales.x(d.date) + ')';\n\t }).attr('fill', configuration.eventColor).attr('text-anchor', 'middle').attr('data-toggle', 'popover').attr('data-html', 'true').attr('data-content', configuration.eventPopover).attr('dominant-baseline', 'central').text(configuration.eventShape);\n\t\n\t if (configuration.eventClick) {\n\t shape.on('click', configuration.eventClick);\n\t }\n\t\n\t if (configuration.eventHover) {\n\t shape.on('mouseover', configuration.eventHover);\n\t }\n\t\n\t // unregister previous event handlers to prevent from memory leaks\n\t drops.exit().on('click', null).on('mouseover', null);\n\t\n\t drops.exit().remove();\n\t });\n\t\n\t dropLines.exit().remove();\n\t };\n\t};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tvar _axes = __webpack_require__(3);\n\t\n\tvar _axes2 = _interopRequireDefault(_axes);\n\t\n\tvar _drops = __webpack_require__(5);\n\t\n\tvar _drops2 = _interopRequireDefault(_drops);\n\t\n\tvar _labels = __webpack_require__(7);\n\t\n\tvar _labels2 = _interopRequireDefault(_labels);\n\t\n\tvar _marker = __webpack_require__(8);\n\t\n\tvar _marker2 = _interopRequireDefault(_marker);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (svg, dimensions, scales, configuration) {\n\t var defs = svg.append('defs');\n\t defs.append('clipPath').attr('id', 'pf-timeline__drops-container-clipper').append('rect').attr('id', 'pf-timeline__drops-container-rect').attr('x', 0).attr('y', 0).attr('width', dimensions.width).attr('height', dimensions.height);\n\t\n\t if (configuration.context) {\n\t defs.append('clipPath').attr('id', 'pf-timeline__context-brush-clipper').append('polygon').attr('points', '0,0 ' + dimensions.width + ',0 ' + (dimensions.width + configuration.sliderWidth) + ',' + dimensions.ctxHeight / 2 + ' ' + dimensions.width + ',' + dimensions.ctxHeight + ' 0,' + dimensions.ctxHeight + ' ' + -configuration.sliderWidth + ',' + dimensions.ctxHeight / 2);\n\t }\n\t\n\t var pattern = defs.append('pattern').attr('class', 'pf-timeline__grid-stripes').attr('id', 'pf-timeline__grid-stripes').attr('width', dimensions.width).attr('height', configuration.lineHeight * 2).attr('patternUnits', 'userSpaceOnUse');\n\t pattern.append('rect').attr('width', dimensions.width).attr('height', configuration.lineHeight);\n\t pattern.append('line').attr('x1', 0).attr('x2', dimensions.width).attr('y1', configuration.lineHeight).attr('y2', configuration.lineHeight);\n\t pattern.append('line').attr('x1', 0).attr('x2', dimensions.width).attr('y1', '1px').attr('y2', '1px');\n\t\n\t var gridContainer = svg.append('g').classed('pf-timeline__grid', true).attr('fill', 'url(#pf-timeline__grid-stripes)').attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var labelsContainer = svg.append('g').classed('pf-timeline__labels', true).attr('transform', 'translate(' + configuration.padding.left + ', ' + configuration.padding.top + ')');\n\t\n\t var axesContainer = svg.append('g').classed('pf-timeline__axes', true).attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var dropsContainer = svg.append('g').classed('pf-timeline__drops-container', true).attr('clip-path', 'url(#pf-timeline__drops-container-clipper)').attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t if (configuration.marker) {\n\t var stampContainer = svg.append('g').classed('pf-timeline__timestamp', true).attr('height', 30).attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t (0, _marker2.default)(gridContainer, stampContainer, scales, dimensions, configuration.dateFormat);\n\t }\n\t\n\t var axes = (0, _axes2.default)(axesContainer, scales, configuration, dimensions);\n\t var labels = (0, _labels2.default)(labelsContainer, scales, configuration);\n\t var drops = (0, _drops2.default)(dropsContainer, scales, configuration);\n\t\n\t return function (data) {\n\t drops(data);\n\t labels(data);\n\t axes(data);\n\t };\n\t};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (container, scales, config) {\n\t return function (data) {\n\t var labels = container.selectAll('.pf-timeline__label').data(data);\n\t\n\t var countEvents = function countEvents(data) {\n\t var count = 0;\n\t for (var i = 0; i < data.length; i++) {\n\t if (data[i].hasOwnProperty(\"events\")) {\n\t count += data[i].events.length;\n\t } else {\n\t count++;\n\t }\n\t }\n\t return count;\n\t };\n\t var text = function text(d) {\n\t var count = countEvents(d.data);\n\t if (d.name === undefined || d.name === '') {\n\t return count + ' Events';\n\t }\n\t return d.name + (count >= 0 ? ' (' + count + ')' : '');\n\t };\n\t\n\t labels.text(text);\n\t\n\t labels.enter().append('text').classed('pf-timeline__label', true).attr('transform', function (d, idx) {\n\t return 'translate(' + (config.labelWidth - 20) + ' ' + (scales.y(idx) + config.lineHeight / 2) + ')';\n\t }).attr('dominant-baseline', 'central').attr('text-anchor', 'end').text(text);\n\t\n\t labels.exit().remove();\n\t };\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (gridContainer, stampContainer, scales, dimensions, dateFormat) {\n\t gridContainer.append('rect').attr('width', dimensions.width).attr('height', dimensions.height).on(\"mouseover\", function () {\n\t marker.style(\"display\", null);\n\t timeStamp.style(\"display\", null);\n\t timeBox.style(\"display\", null);\n\t }).on(\"mouseout\", function () {\n\t marker.style(\"display\", \"none\");\n\t timeStamp.style(\"display\", \"none\");\n\t timeBox.style(\"display\", \"none\");\n\t }).on('mousemove', moveMarker);\n\t\n\t var marker = gridContainer.append('line').classed('pf-timeline__marker', true).attr('y1', 0).attr('y2', dimensions.height);\n\t\n\t var domain = scales.x.domain();\n\t\n\t var timeBox = stampContainer.append('rect').attr('height', '24').attr('width', '150').style('display', 'none');\n\t\n\t var timeStamp = stampContainer.append('text').text(dateFormat(domain[1])).attr('transform', 'translate(' + scales.x.range()[1] + ')').attr('text-anchor', 'middle');\n\t\n\t function moveMarker() {\n\t var pos = _d2.default.mouse(gridContainer[0][0])[0];\n\t marker.attr('transform', 'translate(' + pos + ')');\n\t timeBox.attr('transform', 'translate(' + (pos - 75) + ', -25)');\n\t timeStamp.attr('transform', 'translate(' + pos + ', -9)').text(dateFormat(scales.x.invert(pos)));\n\t }\n\t};\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tvar _configurable = __webpack_require__(12);\n\t\n\tvar _configurable2 = _interopRequireDefault(_configurable);\n\t\n\tvar _config = __webpack_require__(2);\n\t\n\tvar _config2 = _interopRequireDefault(_config);\n\t\n\tvar _drawer = __webpack_require__(6);\n\t\n\tvar _drawer2 = _interopRequireDefault(_drawer);\n\t\n\tvar _context = __webpack_require__(4);\n\t\n\tvar _context2 = _interopRequireDefault(_context);\n\t\n\tvar _zoom = __webpack_require__(11);\n\t\n\tvar _zoom2 = _interopRequireDefault(_zoom);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction timeline() {\n\t var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t var finalConfiguration = _extends({}, _config2.default, config);\n\t var zoomInstance = new _zoom2.default();\n\t\n\t var yScale = function yScale(data) {\n\t return _d2.default.scale.ordinal().domain(data.map(function (d) {\n\t return d.name;\n\t })).range(data.map(function (d, i) {\n\t return i * finalConfiguration.lineHeight;\n\t }));\n\t };\n\t\n\t var xScale = function xScale(width, timeBounds) {\n\t return _d2.default.time.scale().range([0, width]).domain(timeBounds);\n\t };\n\t\n\t function timelineGraph(selection) {\n\t selection.each(function selector(data) {\n\t\n\t var ungroupedData = data;\n\t data = groupEvents(data, finalConfiguration.eventGrouping);\n\t\n\t finalConfiguration.lineHeight = data.length <= 3 ? 80 : 40;\n\t\n\t _d2.default.select(this).select('.pf-timeline__chart').remove();\n\t _d2.default.select(this).selectAll('.pf-timeline__zoom').remove();\n\t\n\t var SCALEHEIGHT = 40;\n\t var outer_width = finalConfiguration.width || selection.node().clientWidth;\n\t var height = data.length * finalConfiguration.lineHeight;\n\t\n\t var dimensions = {\n\t width: outer_width - finalConfiguration.padding.right - finalConfiguration.padding.left - finalConfiguration.labelWidth - (finalConfiguration.slider ? finalConfiguration.sliderWidth : 0),\n\t height: height,\n\t ctxHeight: finalConfiguration.contextHeight,\n\t outer_height: height + finalConfiguration.padding.top + finalConfiguration.padding.bottom + (finalConfiguration.context ? finalConfiguration.contextHeight + SCALEHEIGHT : 0)\n\t };\n\t var scales = {\n\t x: xScale(dimensions.width, [finalConfiguration.start, finalConfiguration.end]),\n\t y: yScale(data),\n\t ctx: xScale(dimensions.width, [_d2.default.min(getDates(data)), finalConfiguration.end]),\n\t cty: _d2.default.scale.linear().range([dimensions.ctxHeight, 0])\n\t };\n\t\n\t var svg = _d2.default.select(this).append('svg').classed('pf-timeline__chart', true).attr({\n\t width: outer_width,\n\t height: dimensions.outer_height\n\t });\n\t var draw = (0, _drawer2.default)(svg, dimensions, scales, finalConfiguration).bind(selection);\n\t\n\t draw(data);\n\t\n\t if (finalConfiguration.context) {\n\t (0, _context2.default)(svg, scales, dimensions, finalConfiguration, ungroupedData);\n\t }\n\t\n\t zoomInstance.updateZoom(_d2.default.select(this), dimensions, scales, finalConfiguration, data, draw);\n\t });\n\t }\n\t\n\t (0, _configurable2.default)(timelineGraph, finalConfiguration);\n\t timelineGraph.Zoom = zoomInstance;\n\t return timelineGraph;\n\t}\n\t\n\t_d2.default.chart = _d2.default.chart || {};\n\t_d2.default.chart.timeline = timeline;\n\t\n\tmodule.exports = timeline;\n\t\n\tfunction getDates(data) {\n\t var toReturn = [];\n\t for (var i = 0; i < data.length; i++) {\n\t for (var j = 0; j < data[i].data.length; j++) {\n\t toReturn.push(data[i].data[j].date);\n\t }\n\t }\n\t return toReturn;\n\t}\n\t\n\tfunction groupEvents(data, toRoundTo) {\n\t var rounded = void 0,\n\t temp = {},\n\t toReturn = [];\n\t\n\t for (var i = 0; i < data.length; i++) {\n\t toReturn[i] = {};\n\t toReturn[i].name = data[i].name;\n\t toReturn[i].data = [];\n\t for (var j = 0; j < data[i].data.length; j++) {\n\t rounded = Math.round(data[i].data[j].date / toRoundTo) * toRoundTo;\n\t if (temp[rounded] === undefined) {\n\t temp[rounded] = [];\n\t }\n\t temp[rounded].push(data[i].data[j]);\n\t }\n\t for (var k in temp) {\n\t if (temp[k].length === 1) {\n\t toReturn[i].data.push(temp[k][0]);\n\t } else {\n\t var tempDate = new Date();\n\t tempDate.setTime(+k);\n\t toReturn[i].data.push({ 'date': tempDate, 'events': temp[k] });\n\t }\n\t }\n\t temp = {};\n\t }\n\t return toReturn;\n\t}\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (xScale, configuration, width) {\n\t var tickFormatData = configuration.tickFormat.map(function (t) {\n\t return t.slice(0);\n\t });\n\t var tickFormat = configuration.locale ? configuration.locale.timeFormat.multi(tickFormatData) : _d2.default.time.format.multi(tickFormatData);\n\t var numTicks = Math.round(width / 70);\n\t var axis = _d2.default.svg.axis().scale(xScale).orient('bottom').ticks(numTicks).tickFormat(tickFormat);\n\t\n\t if (typeof configuration.axisFormat === 'function') {\n\t configuration.axisFormat(axis);\n\t }\n\t\n\t return axis;\n\t};\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar zoom = function () {\n\t function zoom() {\n\t _classCallCheck(this, zoom);\n\t }\n\t\n\t _createClass(zoom, [{\n\t key: 'updateZoom',\n\t value: function updateZoom(container, dimensions, scales, configuration, data, callback) {\n\t var _this = this;\n\t\n\t this.ONE_MINUTE = 60 * 1000;\n\t this.ONE_HOUR = this.ONE_MINUTE * 60;\n\t this.ONE_DAY = this.ONE_HOUR * 24;\n\t this.ONE_WEEK = this.ONE_DAY * 7;\n\t this.ONE_MONTH = this.ONE_DAY * 30;\n\t\n\t this.grid = _d2.default.select('.pf-timeline__grid');\n\t this.dimensions = dimensions;\n\t this.scales = scales;\n\t this.configuration = configuration;\n\t this.data = data;\n\t this.callback = callback;\n\t this.sliderScale = _d2.default.scale.log().domain([configuration.minScale, configuration.maxScale]).range([configuration.minScale, configuration.maxScale]).base(2);\n\t this.zoom = _d2.default.behavior.zoom().size([dimensions.width, dimensions.height]).scaleExtent([configuration.minScale, configuration.maxScale]).x(scales.x);\n\t this.brush = null;\n\t\n\t if (configuration.slider) {\n\t var zoomIn = container.append('button').attr('type', 'button').attr('class', 'btn btn-default pf-timeline__zoom pf-timeline__zoom-in').attr('id', 'pf-timeline__zoom-in').style('top', configuration.padding.top + 'px').style('right', configuration.padding.right + 'px').on('click', function () {\n\t _this.zoomClick();\n\t });\n\t zoomIn.append('i').attr('class', 'fa fa-plus').attr('id', 'pf-timeline__zoom-in-icon');\n\t\n\t var zoomOut = container.append('button').attr('type', 'button').attr('class', 'btn btn-default pf-timeline__zoom').attr('id', 'pf-timeline__zoom-out').style('top', configuration.padding.top + dimensions.height - 26 + 'px').style('right', configuration.padding.right + 'px').on('click', function () {\n\t _this.zoomClick();\n\t });\n\t zoomOut.append('i').attr('class', 'fa fa-minus').attr('id', 'pf-timeline__zoom-out-icon');\n\t\n\t var zoomSlider = container.append('input').attr('type', 'range').attr('class', 'pf-timeline__zoom pf-timeline__slider').attr('id', 'pf-timeline__slider').style('width', dimensions.height - zoomIn.node().offsetHeight * 2 + 'px').style('top', configuration.padding.top + (dimensions.height - zoomIn.node().offsetHeight * 2) / 2 + zoomIn.node().offsetHeight - 7 + 'px').style('right', configuration.padding.right - (dimensions.height - zoomIn.node().offsetHeight) / 2 + zoomIn.node().offsetWidth + 'px').attr('value', this.sliderScale(this.zoom.scale())).attr('min', configuration.minScale).attr('max', configuration.maxScale).attr('step', 0.1).on('input', function () {\n\t _this.zoomClick();\n\t });\n\t }\n\t\n\t if (configuration.context) {\n\t this.brush = _d2.default.svg.brush().x(scales.ctx).extent(scales.x.domain()).on(\"brush\", function () {\n\t _this.brushed();\n\t });\n\t\n\t container.select('.pf-timeline__brush').call(this.brush).selectAll(\"rect\").attr(\"height\", dimensions.ctxHeight);\n\t }\n\t\n\t if (configuration.eventZoom) {\n\t this.zoom.on('zoomend', configuration.eventZoom);\n\t }\n\t\n\t this.zoom.on('zoom', function () {\n\t requestAnimationFrame(function () {\n\t return callback(data);\n\t });\n\t if (configuration.slider) {\n\t container.select('#pf-timeline__slider').property('value', _this.sliderScale(_this.zoom.scale()));\n\t }\n\t if (configuration.context) {\n\t _this.brush.extent(_this.scales.x.domain());\n\t container.select('.pf-timeline__brush').call(_this.brush);\n\t }\n\t });\n\t return this.grid.call(this.zoom).on(\"dblclick.zoom\", null);\n\t }\n\t }, {\n\t key: 'brushed',\n\t value: function brushed() {\n\t if (this.brush.empty() !== true) {\n\t var extent = this.brush.extent();\n\t this.zoomFilter(extent[0], extent[1], 0);\n\t }\n\t }\n\t }, {\n\t key: 'zoomClick',\n\t value: function zoomClick() {\n\t var factor = 0.5,\n\t target_zoom = 1,\n\t duration = 0,\n\t center = this.dimensions.width / 2,\n\t extent = this.zoom.scaleExtent(),\n\t translate0 = void 0,\n\t l = void 0,\n\t view = {\n\t x: this.zoom.translate()[0],\n\t k: this.zoom.scale()\n\t };\n\t switch (_d2.default.event.target.id) {\n\t case 'pf-timeline__zoom-in-icon':\n\t case 'pf-timeline__zoom-in':\n\t target_zoom = this.zoom.scale() * (1 + factor);\n\t duration = 100;\n\t break;\n\t case 'pf-timeline__zoom-out-icon':\n\t case 'pf-timeline__zoom-out':\n\t target_zoom = this.zoom.scale() * (1 + factor * -1);\n\t duration = 100;\n\t break;\n\t case 'pf-timeline__slider':\n\t target_zoom = this.sliderScale.invert(_d2.default.event.target.value);\n\t break;\n\t default:\n\t target_zoom = this.zoom.scale();\n\t }\n\t\n\t if (target_zoom < extent[0]) {\n\t target_zoom = extent[0];\n\t } else if (target_zoom > extent[1]) {\n\t target_zoom = extent[1];\n\t }\n\t\n\t translate0 = (center - view.x) / view.k;\n\t view.k = target_zoom;\n\t l = translate0 * view.k + view.x;\n\t\n\t view.x += center - l;\n\t this.interpolateZoom([view.x, 0], view.k, duration);\n\t }\n\t }, {\n\t key: 'interpolateZoom',\n\t value: function interpolateZoom(translate, scale, duration) {\n\t var _this2 = this;\n\t\n\t return _d2.default.transition().duration(duration).tween(\"zoom\", function () {\n\t if (_this2.zoom) {\n\t var _ret = function () {\n\t var iTranslate = _d2.default.interpolate(_this2.zoom.translate(), translate),\n\t iScale = _d2.default.interpolate(_this2.zoom.scale(), scale);\n\t return {\n\t v: function v(t) {\n\t _this2.zoom.scale(iScale(t)).translate(iTranslate(t));\n\t _this2.zoom.event(_this2.grid);\n\t }\n\t };\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t }\n\t });\n\t }\n\t }, {\n\t key: 'getRange',\n\t value: function getRange(Extent) {\n\t return Extent[1].getTime() - Extent[0].getTime();\n\t }\n\t }, {\n\t key: 'getScale',\n\t value: function getScale(oldRange, newRange) {\n\t return oldRange / newRange;\n\t }\n\t }, {\n\t key: 'zoomFilter',\n\t value: function zoomFilter(fromTime, toTime) {\n\t var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n\t\n\t var range = toTime - fromTime,\n\t width = this.dimensions.width,\n\t extent = this.zoom.scaleExtent(),\n\t translate = this.zoom.translate()[0],\n\t curZoom = this.zoom.scale(),\n\t target_zoom = this.zoom.scale(),\n\t cur_width = this.getRange(this.scales.x.domain()),\n\t startDiff = void 0;\n\t\n\t target_zoom = target_zoom * this.getScale(this.getRange(this.scales.x.domain()), range); // new scale is ratio between old and new date ranges\n\t\n\t if (target_zoom < extent[0]) {\n\t target_zoom = extent[0];\n\t } else if (target_zoom > extent[1]) {\n\t target_zoom = extent[1];\n\t }\n\t\n\t startDiff = (this.scales.x.domain()[0] - fromTime) * (width / cur_width); // difference between leftmost dates in px\n\t\n\t translate += startDiff;\n\t\n\t translate = translate * (target_zoom / curZoom); // scale translate value (in px) to new zoom scale\n\t\n\t this.interpolateZoom([translate, 0], target_zoom, duration);\n\t }\n\t }]);\n\t\n\t return zoom;\n\t}();\n\t\n\texports.default = zoom;\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction configurable(targetFunction, config) {\n\t\n\t function configure(item) {\n\t return function(value) {\n\t if (!arguments.length) return config[item];\n\t config[item] = value;\n\t\n\t return targetFunction;\n\t };\n\t }\n\t\n\t for (var item in config) {\n\t targetFunction[item] = configure(item);\n\t }\n\t}\n\t\n\tif(true) {\n\t module.exports = configurable;\n\t} else if ('function' == typeof define && define.amd) {\n\t define([], configurable);\n\t} else {\n\t window.configurable = configurable;\n\t}\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** timeline.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 36645c5ca9571bf50b98\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"d3\"\n ** module id = 1\n ** module chunks = 0\n **/","import d3 from 'd3';\n\nconst config = {\n start: new Date(0),\n end: new Date(),\n minScale: 0,\n maxScale: Infinity,\n width: null,\n padding: {\n top: 30, //must be at least 24 for marker to display properly\n left: 40,\n bottom: 40,\n right: 40\n },\n lineHeight: 40,\n labelWidth: 140,\n sliderWidth: 30,\n contextHeight: 50,\n locale: null,\n axisFormat: null,\n tickFormat: [\n ['.%L', (d) => d.getMilliseconds()],\n [':%S', (d) => d.getSeconds()],\n ['%I:%M', (d) => d.getMinutes()],\n ['%I %p', (d) => d.getHours()],\n ['%b %d', (d) => d.getMonth() && d.getDate()],\n ['%b', (d) => d.getMonth()],\n ['%Y', () => true]\n ],\n eventHover: null,\n eventZoom: null,\n eventClick: null,\n eventLineColor: (d, i) => {\n switch (i % 5) {\n case 0:\n return \"#00659c\";\n case 1:\n return \"#0088ce\";\n case 2:\n return \"#3f9c35\";\n case 3:\n return \"#ec7a08\";\n case 4:\n return \"#cc0000\";\n }\n },\n eventColor: null,\n eventShape: (d) => {\n if(d.hasOwnProperty(\"events\")) {\n return '\\uf140';\n } else {\n return '\\uf111';\n }\n },\n eventPopover: (d) => {\n var popover = '';\n if(d.hasOwnProperty(\"events\")) {\n popover = `Group of ${d.events.length} events`\n } else {\n for (var i in d.details) {\n popover = popover + i.charAt(0).toUpperCase() + i.slice(1) + ': ' + d.details[i] + '
';\n }\n popover = popover + 'Date: ' + d.date;\n }\n return popover;\n },\n marker: true,\n context: true,\n slider: true,\n eventGrouping: 60000, //one minute\n};\n\nconfig.dateFormat = config.locale ? config.locale.timeFormat('%a %x %I:%M %p') : d3.time.format('%a %x %I:%M %p');\n\nmodule.exports = config;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/config.js\n **/","import xAxis from '../xAxis';\n\nexport default (axesContainer, scales, configuration, dimensions) => data => {\n const axis = (scope, scale) => {\n const selection = axesContainer.selectAll(`.pf-timeline__x-axis.${scope}`).data([{}]);\n\n selection.enter()\n .append('g')\n .classed('pf-timeline__x-axis', true)\n .classed(scope, true)\n .call(xAxis(scale, configuration))\n .attr('transform', `translate(0,${scope === 'focus' ? dimensions.height : dimensions.height + dimensions.ctxHeight + 40})`);\n\n selection.call(xAxis(scale, configuration, dimensions.width));\n\n selection.exit().remove();\n };\n\n axis('focus', scales.x);\n\n if (configuration.context) {\n axis('context', scales.ctx);\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/axes.js\n **/","import d3 from 'd3';\n\nexport default (svg, scales, dimensions, configuration, data) => {\n\n const contextContainer = svg.append(\"g\")\n .classed('pf-timeline__context', true)\n .attr('width', dimensions.width)\n .attr('height', dimensions.ctxHeight)\n .attr('clip-path', 'url(#pf-timeline__context-brush-clipper)')\n .attr(\"transform\", `translate(${configuration.padding.left + configuration.labelWidth},${configuration.padding.top + dimensions.height + 40})`);\n\n let counts = [];\n let roundTo = 3600000;//one hour\n let barWidth = Math.ceil((roundTo / (scales.ctx.domain()[1] - scales.ctx.domain()[0])) * dimensions.width);\n\n countEvents(data, roundTo, counts);\n counts.sort((a,b) => {\n if(a.date < b.date) {\n return -1;\n }\n if(a.date > b.date) {\n return 1;\n }\n return 0;\n });\n scales.cty.domain([0, d3.max(counts, (d) => {return d.count;})]);\n\n contextContainer.selectAll(\".pf-timeline__bar\")\n .data(counts)\n .enter().append(\"rect\")\n .attr(\"class\", \"pf-timeline__bar\")\n .attr(\"x\", d => {return scales.ctx(d.date); })\n .attr(\"y\", d => {return scales.cty(d.count); })\n .attr(\"width\", barWidth)\n .attr(\"height\", d => { return dimensions.ctxHeight - scales.cty(d.count); });\n\n contextContainer.append(\"g\")\n .attr(\"class\", \"pf-timeline__brush\");\n\n};\n\nfunction countEvents(data, toRoundTo, counts) {\n let temp = {};\n for(let i in data) {\n for (let j in data[i].data) {\n let rounded = Math.floor(data[i].data[j].date / toRoundTo) * toRoundTo;\n temp[rounded] = temp[rounded] + 1 || 1;\n }\n }\n for(let k in temp) {\n let tempDate = new Date();\n tempDate.setTime(+k);\n counts.push({'date': tempDate, 'count': temp[k]});\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/context.js\n **/","export default (svg, scales, configuration) => function dropsSelector(data) {\n const dropLines = svg.selectAll('.pf-timeline__drop-line').data(data);\n\n dropLines.enter()\n .append('g')\n .classed('pf-timeline__drop-line', true)\n .attr('transform', (d, idx) => `translate(0, ${scales.y(idx) + (configuration.lineHeight/2)})`)\n .attr('fill', configuration.eventLineColor);\n\n dropLines.each(function dropLineDraw(drop) {\n\n const drops = d3.select(this).selectAll('.pf-timeline__drop').data(drop.data);\n\n drops.attr('transform', (d) => `translate(${scales.x(d.date)})`);\n\n const shape = drops.enter()\n .append('text')\n .classed('pf-timeline__drop', true)\n .classed('pf-timeline__event-group', (d) => {return d.hasOwnProperty(\"events\") ? true : false})\n .attr('transform', (d) => `translate(${scales.x(d.date)})`)\n .attr('fill', configuration.eventColor)\n .attr('text-anchor', 'middle')\n .attr('data-toggle', 'popover')\n .attr('data-html', 'true')\n .attr('data-content', configuration.eventPopover)\n .attr('dominant-baseline', 'central')\n .text(configuration.eventShape);\n\n if (configuration.eventClick) {\n shape.on('click', configuration.eventClick);\n }\n\n if (configuration.eventHover) {\n shape.on('mouseover', configuration.eventHover);\n }\n\n // unregister previous event handlers to prevent from memory leaks\n drops.exit()\n .on('click', null)\n .on('mouseover', null);\n\n drops.exit().remove();\n });\n\n dropLines.exit().remove();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/drops.js\n **/","import d3 from 'd3';\nimport axesFactory from './axes';\nimport dropsFactory from './drops';\nimport labelsFactory from './labels';\nimport markerFactory from './marker';\n\nexport default (svg, dimensions, scales, configuration) => {\n const defs = svg.append('defs');\n defs.append('clipPath')\n .attr('id', 'pf-timeline__drops-container-clipper')\n .append('rect')\n .attr('id', 'pf-timeline__drops-container-rect')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', dimensions.width)\n .attr('height', dimensions.height);\n\n if(configuration.context) {\n defs.append('clipPath')\n .attr('id', 'pf-timeline__context-brush-clipper')\n .append('polygon')\n .attr('points', `0,0 ${dimensions.width},0 ${dimensions.width + configuration.sliderWidth},${dimensions.ctxHeight/2} ${dimensions.width},${dimensions.ctxHeight} 0,${dimensions.ctxHeight} ${-configuration.sliderWidth},${dimensions.ctxHeight/2}`);\n }\n\n const pattern = defs.append('pattern')\n .attr('class', 'pf-timeline__grid-stripes')\n .attr('id', 'pf-timeline__grid-stripes')\n .attr('width', dimensions.width)\n .attr('height', (configuration.lineHeight) * 2)\n .attr('patternUnits', 'userSpaceOnUse');\n pattern.append('rect')\n .attr('width', dimensions.width)\n .attr('height', configuration.lineHeight);\n pattern.append('line')\n .attr('x1', 0)\n .attr('x2', dimensions.width)\n .attr('y1', configuration.lineHeight)\n .attr('y2', configuration.lineHeight);\n pattern.append('line')\n .attr('x1', 0)\n .attr('x2', dimensions.width)\n .attr('y1', '1px')\n .attr('y2', '1px');\n\n const gridContainer = svg.append('g')\n .classed('pf-timeline__grid', true)\n .attr('fill', 'url(#pf-timeline__grid-stripes)')\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const labelsContainer = svg.append('g')\n .classed('pf-timeline__labels', true)\n .attr('transform', `translate(${configuration.padding.left}, ${configuration.padding.top})`);\n\n const axesContainer = svg.append('g')\n .classed('pf-timeline__axes', true)\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const dropsContainer = svg.append('g')\n .classed('pf-timeline__drops-container', true)\n .attr('clip-path', 'url(#pf-timeline__drops-container-clipper)')\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n if (configuration.marker) {\n const stampContainer = svg.append('g')\n .classed('pf-timeline__timestamp', true)\n .attr('height', 30)\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n markerFactory(gridContainer, stampContainer, scales, dimensions, configuration.dateFormat);\n }\n\n const axes = axesFactory(axesContainer, scales, configuration, dimensions);\n const labels = labelsFactory(labelsContainer, scales, configuration);\n const drops = dropsFactory(dropsContainer, scales, configuration);\n\n\n return data => {\n drops(data);\n labels(data);\n axes(data);\n };\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/index.js\n **/","export default (container, scales, config) => data => {\n const labels = container.selectAll('.pf-timeline__label').data(data);\n\n const countEvents = data => {\n let count = 0;\n for (let i = 0; i < data.length; i++) {\n if (data[i].hasOwnProperty(\"events\")) {\n count += data[i].events.length;\n } else {\n count++;\n }\n }\n return count\n }\n const text = d => {\n const count = countEvents(d.data);\n if (d.name === undefined || d.name ===''){\n return `${count} Events`;\n }\n return d.name + (count >= 0 ? ` (${count})` : '');\n };\n\n labels.text(text);\n\n labels.enter()\n .append('text')\n .classed('pf-timeline__label', true)\n .attr('transform', (d, idx) => `translate(${config.labelWidth - 20} ${scales.y(idx) + (config.lineHeight/2)})`)\n .attr('dominant-baseline', 'central')\n .attr('text-anchor', 'end')\n .text(text);\n\n labels.exit().remove();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/labels.js\n **/","import d3 from 'd3';\n\nexport default (gridContainer, stampContainer, scales, dimensions, dateFormat) => {\n gridContainer.append('rect')\n .attr('width', dimensions.width)\n .attr('height', dimensions.height)\n .on(\"mouseover\", function() {\n marker.style(\"display\", null);\n timeStamp.style(\"display\", null);\n timeBox.style(\"display\", null);\n })\n .on(\"mouseout\", function() {\n marker.style(\"display\", \"none\");\n timeStamp.style(\"display\", \"none\");\n timeBox.style(\"display\", \"none\");\n })\n .on('mousemove', moveMarker);\n\n\n var marker = gridContainer.append('line')\n .classed('pf-timeline__marker', true)\n .attr('y1', 0)\n .attr('y2', dimensions.height);\n\n const domain = scales.x.domain();\n\n var timeBox = stampContainer.append('rect')\n .attr('height', '24')\n .attr('width', '150')\n .style('display', 'none');\n\n var timeStamp = stampContainer.append('text')\n .text(dateFormat(domain[1]))\n .attr('transform', `translate(${scales.x.range()[1]})`)\n .attr('text-anchor', 'middle');\n\n function moveMarker() {\n var pos = d3.mouse(gridContainer[0][0])[0]\n marker.attr('transform', `translate(${pos})`);\n timeBox.attr('transform', `translate(${pos - 75}, -25)`);\n timeStamp.attr('transform', `translate(${pos}, -9)`)\n .text(dateFormat(scales.x.invert(pos)));\n\n }\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/marker.js\n **/","import d3 from 'd3';\n\nimport configurable from 'configurable.js';\nimport defaultConfig from './config';\nimport drawer from './drawer';\nimport context from './drawer/context';\nimport Zoom from './zoom';\n\n\nfunction timeline(config = {}) {\n const finalConfiguration = {...defaultConfig, ...config};\n let zoomInstance = new Zoom();\n\n const yScale = (data) => {\n return d3.scale.ordinal()\n .domain(data.map((d) => d.name))\n .range(data.map((d, i) => i * finalConfiguration.lineHeight));\n };\n\n const xScale = (width, timeBounds) => {\n return d3.time.scale()\n .range([0, width])\n .domain(timeBounds);\n };\n\n function timelineGraph(selection) {\n selection.each(function selector(data) {\n\n let ungroupedData = data;\n data = groupEvents(data, finalConfiguration.eventGrouping);\n\n finalConfiguration.lineHeight = (data.length <= 3) ? 80 : 40;\n\n d3.select(this).select('.pf-timeline__chart').remove();\n d3.select(this).selectAll('.pf-timeline__zoom').remove();\n\n const SCALEHEIGHT = 40;\n let outer_width = finalConfiguration.width || selection.node().clientWidth;\n const height = data.length * finalConfiguration.lineHeight;\n\n const dimensions = {\n width: outer_width - finalConfiguration.padding.right - finalConfiguration.padding.left - finalConfiguration.labelWidth - ((finalConfiguration.slider) ? finalConfiguration.sliderWidth : 0),\n height,\n ctxHeight: finalConfiguration.contextHeight,\n outer_height: height + finalConfiguration.padding.top + finalConfiguration.padding.bottom + ((finalConfiguration.context) ? finalConfiguration.contextHeight + SCALEHEIGHT: 0)\n };\n const scales = {\n x: xScale(dimensions.width, [finalConfiguration.start, finalConfiguration.end]),\n y: yScale(data),\n ctx: xScale(dimensions.width, [d3.min(getDates(data)), finalConfiguration.end]),\n cty: d3.scale.linear().range([dimensions.ctxHeight, 0])\n };\n\n const svg = d3.select(this).append('svg')\n .classed('pf-timeline__chart', true)\n .attr({\n width: outer_width,\n height: dimensions.outer_height,\n });\n const draw = drawer(svg, dimensions, scales, finalConfiguration).bind(selection);\n\n draw(data);\n\n if (finalConfiguration.context) {\n context(svg, scales, dimensions, finalConfiguration, ungroupedData);\n }\n\n zoomInstance.updateZoom(d3.select(this), dimensions, scales, finalConfiguration, data, draw);\n\n });\n }\n\n configurable(timelineGraph, finalConfiguration);\n timelineGraph.Zoom = zoomInstance;\n return timelineGraph;\n}\n\nd3.chart = d3.chart || {};\nd3.chart.timeline = timeline;\n\nmodule.exports = timeline;\n\nfunction getDates(data) {\n let toReturn = [];\n for (let i = 0; i < data.length; i++){\n for (let j = 0; j < data[i].data.length; j++){\n toReturn.push(data[i].data[j].date);\n }\n }\n return toReturn;\n}\n\nfunction groupEvents(data, toRoundTo) {\n let rounded,\n temp = {},\n toReturn = [];\n\n for (let i = 0; i < data.length; i++) {\n toReturn[i] = {};\n toReturn[i].name = data[i].name;\n toReturn[i].data = [];\n for (let j = 0; j < data[i].data.length; j++) {\n rounded = Math.round(data[i].data[j].date / toRoundTo) * toRoundTo;\n if (temp[rounded] === undefined) {\n temp[rounded] = [];\n }\n temp[rounded].push(data[i].data[j]);\n }\n for (let k in temp) {\n if (temp[k].length === 1) {\n toReturn[i].data.push(temp[k][0]);\n } else {\n let tempDate = new Date();\n tempDate.setTime(+k);\n toReturn[i].data.push({'date': tempDate,'events': temp[k]});\n }\n }\n temp = {};\n }\n return toReturn;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/timeline.js\n **/","import d3 from 'd3';\n\nexport default function(xScale, configuration, width) {\n const tickFormatData = configuration.tickFormat.map(t => t.slice(0));\n const tickFormat = configuration.locale ? configuration.locale.timeFormat.multi(tickFormatData) : d3.time.format.multi(tickFormatData);\n let numTicks = Math.round(width / 70);\n const axis = d3.svg.axis()\n .scale(xScale)\n .orient('bottom')\n .ticks(numTicks)\n .tickFormat(tickFormat);\n\n if (typeof configuration.axisFormat === 'function') {\n configuration.axisFormat(axis);\n }\n\n return axis;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/xAxis.js\n **/","import d3 from 'd3';\n\nexport default class zoom {\n\n constructor() {\n }\n\n updateZoom(container, dimensions, scales, configuration, data, callback) {\n this.ONE_MINUTE = 60 * 1000;\n this.ONE_HOUR = this.ONE_MINUTE * 60;\n this.ONE_DAY = this.ONE_HOUR * 24;\n this.ONE_WEEK = this.ONE_DAY * 7;\n this.ONE_MONTH = this.ONE_DAY * 30;\n\n this.grid = d3.select('.pf-timeline__grid');\n this.dimensions = dimensions;\n this.scales = scales;\n this.configuration = configuration;\n this.data = data;\n this.callback = callback;\n this.sliderScale = d3.scale.log()\n .domain([configuration.minScale, configuration.maxScale])\n .range([configuration.minScale, configuration.maxScale])\n .base(2);\n this.zoom = d3.behavior.zoom()\n .size([dimensions.width, dimensions.height])\n .scaleExtent([configuration.minScale, configuration.maxScale])\n .x(scales.x);\n this.brush = null;\n\n if (configuration.slider) {\n const zoomIn = container.append('button')\n .attr('type', 'button')\n .attr('class', 'btn btn-default pf-timeline__zoom pf-timeline__zoom-in')\n .attr('id', 'pf-timeline__zoom-in')\n .style('top', `${configuration.padding.top}px`)\n .style('right', `${configuration.padding.right}px`)\n .on('click', () => {this.zoomClick()});\n zoomIn.append('i')\n .attr('class', 'fa fa-plus')\n .attr('id', 'pf-timeline__zoom-in-icon');\n\n const zoomOut = container.append('button')\n .attr('type', 'button')\n .attr('class', 'btn btn-default pf-timeline__zoom')\n .attr('id', 'pf-timeline__zoom-out')\n .style('top', `${configuration.padding.top + dimensions.height - 26}px`)\n .style('right', `${configuration.padding.right}px`)\n .on('click', () => {this.zoomClick()});\n zoomOut.append('i')\n .attr('class', 'fa fa-minus')\n .attr('id', 'pf-timeline__zoom-out-icon');\n\n const zoomSlider = container.append('input')\n .attr('type', 'range')\n .attr('class', 'pf-timeline__zoom pf-timeline__slider')\n .attr('id', 'pf-timeline__slider')\n .style('width', `${dimensions.height - (zoomIn.node().offsetHeight * 2)}px`)\n .style('top', `${configuration.padding.top + ((dimensions.height - (zoomIn.node().offsetHeight) * 2) / 2) + zoomIn.node().offsetHeight - 7}px`)\n .style('right', `${configuration.padding.right - (dimensions.height - zoomIn.node().offsetHeight) / 2 + zoomIn.node().offsetWidth}px`)\n .attr('value', this.sliderScale(this.zoom.scale()))\n .attr('min', configuration.minScale)\n .attr('max', configuration.maxScale)\n .attr('step', 0.1)\n .on('input', () => {this.zoomClick()});\n }\n\n if(configuration.context) {\n this.brush = d3.svg.brush()\n .x(scales.ctx)\n .extent(scales.x.domain())\n .on(\"brush\", () => {this.brushed()});\n\n container.select('.pf-timeline__brush')\n .call(this.brush)\n .selectAll(\"rect\")\n .attr(\"height\", dimensions.ctxHeight);\n }\n\n\n if (configuration.eventZoom) {\n this.zoom.on('zoomend', configuration.eventZoom);\n }\n\n this.zoom.on('zoom', () => {\n requestAnimationFrame(() => callback(data));\n if(configuration.slider) {\n container.select('#pf-timeline__slider').property('value', this.sliderScale(this.zoom.scale()));\n }\n if(configuration.context) {\n this.brush.extent(this.scales.x.domain());\n container.select('.pf-timeline__brush').call(this.brush);\n }\n });\n return this.grid.call(this.zoom)\n .on(\"dblclick.zoom\", null);\n }\n\n brushed() {\n if(this.brush.empty() !== true) {\n let extent = this.brush.extent();\n this.zoomFilter(extent[0], extent[1], 0);\n }\n }\n\n zoomClick() {\n let factor = 0.5,\n target_zoom = 1,\n duration = 0,\n center = this.dimensions.width / 2,\n extent = this.zoom.scaleExtent(),\n translate0,\n l,\n view = {\n x: this.zoom.translate()[0],\n k: this.zoom.scale()\n };\n switch (d3.event.target.id) {\n case 'pf-timeline__zoom-in-icon':\n case 'pf-timeline__zoom-in':\n target_zoom = this.zoom.scale() * (1 + factor);\n duration = 100;\n break;\n case 'pf-timeline__zoom-out-icon':\n case 'pf-timeline__zoom-out':\n target_zoom = this.zoom.scale() * (1 + factor * -1);\n duration = 100;\n break;\n case 'pf-timeline__slider':\n target_zoom = this.sliderScale.invert(d3.event.target.value);\n break;\n default:\n target_zoom = this.zoom.scale();\n }\n\n if (target_zoom < extent[0]) {\n target_zoom = extent[0];\n } else if (target_zoom > extent[1]) {\n target_zoom = extent[1];\n }\n\n translate0 = (center - view.x) / view.k;\n view.k = target_zoom;\n l = translate0 * view.k + view.x;\n\n view.x += center - l;\n this.interpolateZoom([view.x, 0], view.k, duration);\n }\n\n interpolateZoom(translate, scale, duration) {\n return d3.transition().duration(duration).tween(\"zoom\", () => {\n if(this.zoom) {\n let iTranslate = d3.interpolate(this.zoom.translate(), translate),\n iScale = d3.interpolate(this.zoom.scale(), scale);\n return (t) => {\n this.zoom\n .scale(iScale(t))\n .translate(iTranslate(t));\n this.zoom.event(this.grid);\n };\n }\n });\n }\n\n getRange(Extent) {\n return Extent[1].getTime() - Extent[0].getTime();\n }\n\n getScale(oldRange, newRange) {\n return oldRange / newRange;\n }\n\n zoomFilter(fromTime, toTime, duration = 100) {\n let range = toTime - fromTime,\n width = this.dimensions.width,\n extent = this.zoom.scaleExtent(),\n translate = this.zoom.translate()[0],\n curZoom = this.zoom.scale(),\n target_zoom = this.zoom.scale(),\n cur_width = this.getRange(this.scales.x.domain()),\n startDiff;\n\n target_zoom = target_zoom * this.getScale(this.getRange(this.scales.x.domain()), range); // new scale is ratio between old and new date ranges\n\n if (target_zoom < extent[0]) {\n target_zoom = extent[0];\n } else if (target_zoom > extent[1]) {\n target_zoom = extent[1];\n }\n\n startDiff = (this.scales.x.domain()[0] - fromTime) * (width / cur_width); // difference between leftmost dates in px\n\n translate += startDiff;\n\n translate = translate * (target_zoom / curZoom); // scale translate value (in px) to new zoom scale\n\n this.interpolateZoom([translate, 0], target_zoom, duration)\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/zoom.js\n **/","'use strict';\n\nfunction configurable(targetFunction, config) {\n\n function configure(item) {\n return function(value) {\n if (!arguments.length) return config[item];\n config[item] = value;\n\n return targetFunction;\n };\n }\n\n for (var item in config) {\n targetFunction[item] = configure(item);\n }\n}\n\nif('object' == typeof exports && 'undefined' != typeof module) {\n module.exports = configurable;\n} else if ('function' == typeof define && define.amd) {\n define([], configurable);\n} else {\n window.configurable = configurable;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/configurable.js/configurable.js\n ** module id = 12\n ** module chunks = 0\n **/"],"sourceRoot":""} +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///timeline.js","webpack:///webpack/bootstrap 389ab85ab9172d6884c7","webpack:///external \"d3\"","webpack:///./src/config.js","webpack:///./src/drawer/axes.js","webpack:///./src/drawer/context.js","webpack:///./src/drawer/drops.js","webpack:///./src/drawer/index.js","webpack:///./src/drawer/labels.js","webpack:///./src/drawer/marker.js","webpack:///./src/timeline.js","webpack:///./src/xAxis.js","webpack:///./src/zoom.js","webpack:///./~/configurable.js/configurable.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_d","_d2","config","start","Date","end","contextStart","contextEnd","minScale","maxScale","Infinity","width","padding","top","left","bottom","right","lineHeight","labelWidth","sliderWidth","contextHeight","locale","axisFormat","tickFormat","d","getMilliseconds","getSeconds","getMinutes","getHours","getMonth","getDate","eventHover","eventZoom","eventClick","eventLineColor","i","eventColor","eventShape","hasOwnProperty","eventPopover","popover","events","length","details","charAt","toUpperCase","slice","date","marker","context","slider","eventGrouping","dateFormat","timeFormat","time","format","Object","defineProperty","value","_xAxis","_xAxis2","axesContainer","scales","configuration","dimensions","data","axis","scope","scale","selection","selectAll","enter","append","classed","attr","height","ctxHeight","exit","remove","x","ctx","countEvents","toRoundTo","counts","temp","j","rounded","Math","floor","k","tempDate","setTime","push","count","svg","contextContainer","roundTo","barWidth","ceil","domain","sort","a","b","cty","max","dropLines","idx","y","each","drop","drops","d3","select","shape","text","on","_axes","_axes2","_drops","_drops2","_labels","_labels2","_marker","_marker2","defs","pattern","gridContainer","labelsContainer","dropsContainer","stampContainer","axes","labels","container","undefined","name","moveMarker","pos","mouse","timeBox","timeStamp","invert","style","range","timeline","timelineGraph","ungroupedData","groupEvents","finalConfiguration","min","getDates","SCALEHEIGHT","outer_width","node","clientWidth","outer_height","xScale","yScale","linear","draw","_drawer2","bind","_context2","zoomInstance","updateZoom","arguments","_zoom2","ordinal","map","timeBounds","_configurable2","Zoom","toReturn","round","_extends","assign","target","source","key","prototype","_configurable","_config","_config2","_drawer","_context","_zoom","chart","tickFormatData","t","multi","numTicks","orient","ticks","_classCallCheck","instance","Constructor","TypeError","_typeof","Symbol","iterator","constructor","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","zoom","callback","_this","ONE_MINUTE","ONE_HOUR","ONE_DAY","ONE_WEEK","ONE_MONTH","grid","sliderScale","log","base","behavior","size","scaleExtent","brush","zoomIn","zoomClick","zoomOut","zoomSlider","offsetHeight","offsetWidth","extent","brushed","requestAnimationFrame","property","empty","zoomFilter","factor","target_zoom","duration","center","translate0","l","view","translate","event","interpolateZoom","_this2","transition","tween","_ret","iTranslate","interpolate","iScale","v","Extent","getTime","oldRange","newRange","fromTime","toTime","curZoom","cur_width","getRange","startDiff","getScale","targetFunction","configure","item"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,OACA,kBAAAC,gBAAAC,IACAD,QAAA,MAAAJ,GACA,gBAAAC,SACAA,QAAA,SAAAD,EAAAG,QAAA,OAEAJ,EAAA,SAAAC,EAAAD,EAAA,KACCO,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAvBA,GAAAU,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASP,EAAQD,EAASQ,GAE/BA,EAAoB,GACpBP,EAAOD,QAAUQ,EAAoB,KAKhC,SAASP,EAAQD,GE9DvBC,EAAAD,QAAAM,GFoEM,SAASL,EAAQD,EAASQ,GAE/B,YAMA,SAASS,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAASF,GG5ExF,GAAAG,GAAAb,EAAA,GH0EKc,EAAML,EAAu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r1BoBsO,GZy1Bf,SAASrO,EAAQD,EAASQ,Ga31BhC,YAEA,SAAA0N,GAAA6D,EAAAxQ,GAEA,QAAAyQ,GAAAC,GACA,gBAAAlN,GACA,MAAA0G,WAAA1H,QACAxC,EAAA0Q,GAAAlN,EAEAgN,GAHAxQ,EAAA0Q,IAOA,OAAAA,KAAA1Q,GACAwQ,EAAAE,GAAAD,EAAAC,GAKAhS,EAAAD,QAAAkO,Gbu2BM,SAASjO,EAAQD","file":"timeline.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"timeline\"] = factory(require(\"d3\"));\n\telse\n\t\troot[\"timeline\"] = factory(root[\"d3\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"timeline\"] = factory(require(\"d3\"));\n\telse\n\t\troot[\"timeline\"] = factory(root[\"d3\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(9);\n\tmodule.exports = __webpack_require__(13);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar config = {\n\t start: new Date(0),\n\t end: new Date(),\n\t contextStart: null,\n\t contextEnd: null,\n\t minScale: 0,\n\t maxScale: Infinity,\n\t width: null,\n\t padding: {\n\t top: 30, //must be at least 24 for marker to display properly\n\t left: 40,\n\t bottom: 40,\n\t right: 40\n\t },\n\t lineHeight: 40,\n\t labelWidth: 140,\n\t sliderWidth: 30,\n\t contextHeight: 50,\n\t locale: null,\n\t axisFormat: null,\n\t tickFormat: [['.%L', function (d) {\n\t return d.getMilliseconds();\n\t }], [':%S', function (d) {\n\t return d.getSeconds();\n\t }], ['%I:%M', function (d) {\n\t return d.getMinutes();\n\t }], ['%I %p', function (d) {\n\t return d.getHours();\n\t }], ['%b %d', function (d) {\n\t return d.getMonth() && d.getDate();\n\t }], ['%b', function (d) {\n\t return d.getMonth();\n\t }], ['%Y', function () {\n\t return true;\n\t }]],\n\t eventHover: null,\n\t eventZoom: null,\n\t eventClick: null,\n\t eventLineColor: function eventLineColor(d, i) {\n\t switch (i % 5) {\n\t case 0:\n\t return \"#00659c\";\n\t case 1:\n\t return \"#0088ce\";\n\t case 2:\n\t return \"#3f9c35\";\n\t case 3:\n\t return \"#ec7a08\";\n\t case 4:\n\t return \"#cc0000\";\n\t }\n\t },\n\t eventColor: null,\n\t eventShape: function eventShape(d) {\n\t if (d.hasOwnProperty(\"events\")) {\n\t return '\\uF140';\n\t } else {\n\t return '\\uF111';\n\t }\n\t },\n\t eventPopover: function eventPopover(d) {\n\t var popover = '';\n\t if (d.hasOwnProperty(\"events\")) {\n\t popover = 'Group of ' + d.events.length + ' events';\n\t } else {\n\t for (var i in d.details) {\n\t popover = popover + i.charAt(0).toUpperCase() + i.slice(1) + ': ' + d.details[i] + '
';\n\t }\n\t popover = popover + 'Date: ' + d.date;\n\t }\n\t return popover;\n\t },\n\t marker: true,\n\t context: true,\n\t slider: true,\n\t eventGrouping: 60000 };\n\t\n\tconfig.dateFormat = config.locale ? config.locale.timeFormat('%a %x %I:%M %p') : _d2.default.time.format('%a %x %I:%M %p');\n\t\n\tmodule.exports = config;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _xAxis = __webpack_require__(10);\n\t\n\tvar _xAxis2 = _interopRequireDefault(_xAxis);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (axesContainer, scales, configuration, dimensions) {\n\t return function (data) {\n\t var axis = function axis(scope, scale) {\n\t var selection = axesContainer.selectAll('.timeline-pf-x-axis.' + scope).data([{}]);\n\t\n\t selection.enter().append('g').classed('timeline-pf-x-axis', true).classed(scope, true).call((0, _xAxis2.default)(scale, configuration)).attr('transform', 'translate(0,' + (scope === 'focus' ? dimensions.height : dimensions.height + dimensions.ctxHeight + 40) + ')');\n\t\n\t selection.call((0, _xAxis2.default)(scale, configuration, dimensions.width));\n\t\n\t selection.exit().remove();\n\t };\n\t\n\t axis('focus', scales.x);\n\t\n\t if (configuration.context) {\n\t axis('context', scales.ctx);\n\t }\n\t };\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (svg, scales, dimensions, configuration, data) {\n\t\n\t var contextContainer = svg.append(\"g\").classed('timeline-pf-context', true).attr('width', dimensions.width).attr('height', dimensions.ctxHeight).attr('clip-path', 'url(#timeline-pf-context-brush-clipper)').attr(\"transform\", 'translate(' + (configuration.padding.left + configuration.labelWidth) + ',' + (configuration.padding.top + dimensions.height + 40) + ')');\n\t\n\t var counts = [];\n\t var roundTo = 3600000; //one hour\n\t var barWidth = Math.ceil(roundTo / (scales.ctx.domain()[1] - scales.ctx.domain()[0]) * dimensions.width);\n\t\n\t countEvents(data, roundTo, counts);\n\t counts.sort(function (a, b) {\n\t if (a.date < b.date) {\n\t return -1;\n\t }\n\t if (a.date > b.date) {\n\t return 1;\n\t }\n\t return 0;\n\t });\n\t scales.cty.domain([0, _d2.default.max(counts, function (d) {\n\t return d.count;\n\t })]);\n\t\n\t contextContainer.selectAll(\".timeline-pf-bar\").data(counts).enter().append(\"rect\").attr(\"class\", \"timeline-pf-bar\").attr(\"x\", function (d) {\n\t return scales.ctx(d.date);\n\t }).attr(\"y\", function (d) {\n\t return scales.cty(d.count);\n\t }).attr(\"width\", barWidth).attr(\"height\", function (d) {\n\t return dimensions.ctxHeight - scales.cty(d.count);\n\t });\n\t\n\t contextContainer.append(\"g\").attr(\"class\", \"timeline-pf-brush\");\n\t};\n\t\n\tfunction countEvents(data, toRoundTo, counts) {\n\t var temp = {};\n\t for (var i in data) {\n\t for (var j in data[i].data) {\n\t var rounded = Math.floor(data[i].data[j].date / toRoundTo) * toRoundTo;\n\t temp[rounded] = temp[rounded] + 1 || 1;\n\t }\n\t }\n\t for (var k in temp) {\n\t var tempDate = new Date();\n\t tempDate.setTime(+k);\n\t counts.push({ 'date': tempDate, 'count': temp[k] });\n\t }\n\t};\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (svg, scales, configuration) {\n\t return function dropsSelector(data) {\n\t var dropLines = svg.selectAll('.timeline-pf-drop-line').data(data);\n\t\n\t dropLines.enter().append('g').classed('timeline-pf-drop-line', true).attr('transform', function (d, idx) {\n\t return 'translate(0, ' + (scales.y(idx) + configuration.lineHeight / 2) + ')';\n\t }).attr('fill', configuration.eventLineColor);\n\t\n\t dropLines.each(function dropLineDraw(drop) {\n\t\n\t var drops = d3.select(this).selectAll('.timeline-pf-drop').data(drop.data);\n\t\n\t drops.attr('transform', function (d) {\n\t return 'translate(' + scales.x(d.date) + ')';\n\t });\n\t\n\t var shape = drops.enter().append('text').classed('timeline-pf-drop', true).classed('timeline-pf-event-group', function (d) {\n\t return d.hasOwnProperty(\"events\") ? true : false;\n\t }).attr('transform', function (d) {\n\t return 'translate(' + scales.x(d.date) + ')';\n\t }).attr('fill', configuration.eventColor).attr('text-anchor', 'middle').attr('data-toggle', 'popover').attr('data-html', 'true').attr('data-content', configuration.eventPopover).attr('dominant-baseline', 'central').text(configuration.eventShape);\n\t\n\t if (configuration.eventClick) {\n\t shape.on('click', configuration.eventClick);\n\t }\n\t\n\t if (configuration.eventHover) {\n\t shape.on('mouseover', configuration.eventHover);\n\t }\n\t\n\t // unregister previous event handlers to prevent from memory leaks\n\t drops.exit().on('click', null).on('mouseover', null);\n\t\n\t drops.exit().remove();\n\t });\n\t\n\t dropLines.exit().remove();\n\t };\n\t};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tvar _axes = __webpack_require__(3);\n\t\n\tvar _axes2 = _interopRequireDefault(_axes);\n\t\n\tvar _drops = __webpack_require__(5);\n\t\n\tvar _drops2 = _interopRequireDefault(_drops);\n\t\n\tvar _labels = __webpack_require__(7);\n\t\n\tvar _labels2 = _interopRequireDefault(_labels);\n\t\n\tvar _marker = __webpack_require__(8);\n\t\n\tvar _marker2 = _interopRequireDefault(_marker);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (svg, dimensions, scales, configuration) {\n\t var defs = svg.append('defs');\n\t defs.append('clipPath').attr('id', 'timeline-pf-drops-container-clipper').append('rect').attr('id', 'timeline-pf-drops-container-rect').attr('x', 0).attr('y', 0).attr('width', dimensions.width).attr('height', dimensions.height);\n\t\n\t if (configuration.context) {\n\t defs.append('clipPath').attr('id', 'timeline-pf-context-brush-clipper').append('polygon').attr('points', '0,0 ' + dimensions.width + ',0 ' + (dimensions.width + configuration.sliderWidth) + ',' + dimensions.ctxHeight / 2 + ' ' + dimensions.width + ',' + dimensions.ctxHeight + ' 0,' + dimensions.ctxHeight + ' ' + -configuration.sliderWidth + ',' + dimensions.ctxHeight / 2);\n\t }\n\t\n\t var pattern = defs.append('pattern').attr('class', 'timeline-pf-grid-stripes').attr('id', 'timeline-pf-grid-stripes').attr('width', dimensions.width).attr('height', configuration.lineHeight * 2).attr('patternUnits', 'userSpaceOnUse');\n\t pattern.append('rect').attr('width', dimensions.width).attr('height', configuration.lineHeight);\n\t pattern.append('line').attr('x1', 0).attr('x2', dimensions.width).attr('y1', configuration.lineHeight).attr('y2', configuration.lineHeight);\n\t pattern.append('line').attr('x1', 0).attr('x2', dimensions.width).attr('y1', '1px').attr('y2', '1px');\n\t\n\t var gridContainer = svg.append('g').classed('timeline-pf-grid', true).attr('fill', 'url(#timeline-pf-grid-stripes)').attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var labelsContainer = svg.append('g').classed('timeline-pf-labels', true).attr('transform', 'translate(' + configuration.padding.left + ', ' + configuration.padding.top + ')');\n\t\n\t var axesContainer = svg.append('g').classed('timeline-pf-axes', true).attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var dropsContainer = svg.append('g').classed('timeline-pf-drops-container', true).attr('clip-path', 'url(#timeline-pf-drops-container-clipper)').attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t if (configuration.marker) {\n\t var stampContainer = svg.append('g').classed('timeline-pf-timestamp', true).attr('height', 30).attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t (0, _marker2.default)(gridContainer, stampContainer, scales, dimensions, configuration.dateFormat);\n\t }\n\t\n\t var axes = (0, _axes2.default)(axesContainer, scales, configuration, dimensions);\n\t var labels = (0, _labels2.default)(labelsContainer, scales, configuration);\n\t var drops = (0, _drops2.default)(dropsContainer, scales, configuration);\n\t\n\t return function (data) {\n\t drops(data);\n\t labels(data);\n\t axes(data);\n\t };\n\t};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (container, scales, config) {\n\t return function (data) {\n\t var labels = container.selectAll('.timeline-pf-label').data(data);\n\t\n\t var countEvents = function countEvents(data) {\n\t var count = 0;\n\t for (var i = 0; i < data.length; i++) {\n\t if (data[i].hasOwnProperty(\"events\")) {\n\t count += data[i].events.length;\n\t } else {\n\t count++;\n\t }\n\t }\n\t return count;\n\t };\n\t var text = function text(d) {\n\t var count = countEvents(d.data);\n\t if (d.name === undefined || d.name === '') {\n\t return count + ' Events';\n\t }\n\t return d.name + (count >= 0 ? ' (' + count + ')' : '');\n\t };\n\t\n\t labels.text(text);\n\t\n\t labels.enter().append('text').classed('timeline-pf-label', true).attr('transform', function (d, idx) {\n\t return 'translate(' + (config.labelWidth - 20) + ' ' + (scales.y(idx) + config.lineHeight / 2) + ')';\n\t }).attr('dominant-baseline', 'central').attr('text-anchor', 'end').text(text);\n\t\n\t labels.exit().remove();\n\t };\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (gridContainer, stampContainer, scales, dimensions, dateFormat) {\n\t gridContainer.append('rect').attr('width', dimensions.width).attr('height', dimensions.height).on(\"mouseover\", function () {\n\t marker.style(\"display\", null);\n\t timeStamp.style(\"display\", null);\n\t timeBox.style(\"display\", null);\n\t }).on(\"mouseout\", function () {\n\t marker.style(\"display\", \"none\");\n\t timeStamp.style(\"display\", \"none\");\n\t timeBox.style(\"display\", \"none\");\n\t }).on('mousemove', moveMarker);\n\t\n\t var marker = gridContainer.append('line').classed('timeline-pf-marker', true).attr('y1', 0).attr('y2', dimensions.height);\n\t\n\t var domain = scales.x.domain();\n\t\n\t var timeBox = stampContainer.append('rect').attr('height', '24').attr('width', '150').style('display', 'none');\n\t\n\t var timeStamp = stampContainer.append('text').text(dateFormat(domain[1])).attr('transform', 'translate(' + scales.x.range()[1] + ')').attr('text-anchor', 'middle');\n\t\n\t function moveMarker() {\n\t var pos = _d2.default.mouse(gridContainer[0][0])[0];\n\t marker.attr('transform', 'translate(' + pos + ')');\n\t timeBox.attr('transform', 'translate(' + (pos - 75) + ', -25)');\n\t timeStamp.attr('transform', 'translate(' + pos + ', -9)').text(dateFormat(scales.x.invert(pos)));\n\t }\n\t};\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tvar _configurable = __webpack_require__(12);\n\t\n\tvar _configurable2 = _interopRequireDefault(_configurable);\n\t\n\tvar _config = __webpack_require__(2);\n\t\n\tvar _config2 = _interopRequireDefault(_config);\n\t\n\tvar _drawer = __webpack_require__(6);\n\t\n\tvar _drawer2 = _interopRequireDefault(_drawer);\n\t\n\tvar _context = __webpack_require__(4);\n\t\n\tvar _context2 = _interopRequireDefault(_context);\n\t\n\tvar _zoom = __webpack_require__(11);\n\t\n\tvar _zoom2 = _interopRequireDefault(_zoom);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction timeline() {\n\t var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t var finalConfiguration = _extends({}, _config2.default, config);\n\t var zoomInstance = new _zoom2.default();\n\t\n\t var yScale = function yScale(data) {\n\t return _d2.default.scale.ordinal().domain(data.map(function (d) {\n\t return d.name;\n\t })).range(data.map(function (d, i) {\n\t return i * finalConfiguration.lineHeight;\n\t }));\n\t };\n\t\n\t var xScale = function xScale(width, timeBounds) {\n\t return _d2.default.time.scale().range([0, width]).domain(timeBounds);\n\t };\n\t\n\t function timelineGraph(selection) {\n\t selection.each(function selector(data) {\n\t\n\t var ungroupedData = data;\n\t data = groupEvents(data, finalConfiguration.eventGrouping);\n\t\n\t finalConfiguration.lineHeight = data.length <= 3 ? 80 : 40;\n\t finalConfiguration.contextStart = finalConfiguration.contextStart || _d2.default.min(getDates(data));\n\t finalConfiguration.contextEnd = finalConfiguration.contextEnd || finalConfiguration.end;\n\t\n\t _d2.default.select(this).select('.timeline-pf-chart').remove();\n\t _d2.default.select(this).selectAll('.timeline-pf-zoom').remove();\n\t\n\t var SCALEHEIGHT = 40;\n\t var outer_width = finalConfiguration.width || selection.node().clientWidth;\n\t var height = data.length * finalConfiguration.lineHeight;\n\t\n\t var dimensions = {\n\t width: outer_width - finalConfiguration.padding.right - finalConfiguration.padding.left - finalConfiguration.labelWidth - (finalConfiguration.slider ? finalConfiguration.sliderWidth : 0),\n\t height: height,\n\t ctxHeight: finalConfiguration.contextHeight,\n\t outer_height: height + finalConfiguration.padding.top + finalConfiguration.padding.bottom + (finalConfiguration.context ? finalConfiguration.contextHeight + SCALEHEIGHT : 0)\n\t };\n\t var scales = {\n\t x: xScale(dimensions.width, [finalConfiguration.start, finalConfiguration.end]),\n\t y: yScale(data),\n\t ctx: xScale(dimensions.width, [finalConfiguration.contextStart, finalConfiguration.contextEnd]),\n\t cty: _d2.default.scale.linear().range([dimensions.ctxHeight, 0])\n\t };\n\t\n\t var svg = _d2.default.select(this).append('svg').classed('timeline-pf-chart', true).attr({\n\t width: outer_width,\n\t height: dimensions.outer_height\n\t });\n\t var draw = (0, _drawer2.default)(svg, dimensions, scales, finalConfiguration).bind(selection);\n\t\n\t draw(data);\n\t\n\t if (finalConfiguration.context) {\n\t (0, _context2.default)(svg, scales, dimensions, finalConfiguration, ungroupedData);\n\t }\n\t\n\t zoomInstance.updateZoom(_d2.default.select(this), dimensions, scales, finalConfiguration, data, draw);\n\t });\n\t }\n\t\n\t (0, _configurable2.default)(timelineGraph, finalConfiguration);\n\t timelineGraph.Zoom = zoomInstance;\n\t return timelineGraph;\n\t}\n\t\n\t_d2.default.chart = _d2.default.chart || {};\n\t_d2.default.chart.timeline = timeline;\n\t\n\tmodule.exports = timeline;\n\t\n\tfunction getDates(data) {\n\t var toReturn = [];\n\t for (var i = 0; i < data.length; i++) {\n\t for (var j = 0; j < data[i].data.length; j++) {\n\t toReturn.push(data[i].data[j].date);\n\t }\n\t }\n\t return toReturn;\n\t}\n\t\n\tfunction groupEvents(data, toRoundTo) {\n\t var rounded = void 0,\n\t temp = {},\n\t toReturn = [];\n\t\n\t for (var i = 0; i < data.length; i++) {\n\t toReturn[i] = {};\n\t toReturn[i].name = data[i].name;\n\t toReturn[i].data = [];\n\t for (var j = 0; j < data[i].data.length; j++) {\n\t rounded = Math.round(data[i].data[j].date / toRoundTo) * toRoundTo;\n\t if (temp[rounded] === undefined) {\n\t temp[rounded] = [];\n\t }\n\t temp[rounded].push(data[i].data[j]);\n\t }\n\t for (var k in temp) {\n\t if (temp[k].length === 1) {\n\t toReturn[i].data.push(temp[k][0]);\n\t } else {\n\t var tempDate = new Date();\n\t tempDate.setTime(+k);\n\t toReturn[i].data.push({ 'date': tempDate, 'events': temp[k] });\n\t }\n\t }\n\t temp = {};\n\t }\n\t return toReturn;\n\t}\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (xScale, configuration, width) {\n\t var tickFormatData = configuration.tickFormat.map(function (t) {\n\t return t.slice(0);\n\t });\n\t var tickFormat = configuration.locale ? configuration.locale.timeFormat.multi(tickFormatData) : _d2.default.time.format.multi(tickFormatData);\n\t var numTicks = Math.round(width / 70);\n\t var axis = _d2.default.svg.axis().scale(xScale).orient('bottom').ticks(numTicks).tickFormat(tickFormat);\n\t\n\t if (typeof configuration.axisFormat === 'function') {\n\t configuration.axisFormat(axis);\n\t }\n\t\n\t return axis;\n\t};\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar zoom = function () {\n\t function zoom() {\n\t _classCallCheck(this, zoom);\n\t }\n\t\n\t _createClass(zoom, [{\n\t key: 'updateZoom',\n\t value: function updateZoom(container, dimensions, scales, configuration, data, callback) {\n\t var _this = this;\n\t\n\t this.ONE_MINUTE = 60 * 1000;\n\t this.ONE_HOUR = this.ONE_MINUTE * 60;\n\t this.ONE_DAY = this.ONE_HOUR * 24;\n\t this.ONE_WEEK = this.ONE_DAY * 7;\n\t this.ONE_MONTH = this.ONE_DAY * 30;\n\t\n\t this.grid = _d2.default.select('.timeline-pf-grid');\n\t this.dimensions = dimensions;\n\t this.scales = scales;\n\t this.configuration = configuration;\n\t this.data = data;\n\t this.callback = callback;\n\t this.sliderScale = _d2.default.scale.log().domain([configuration.minScale, configuration.maxScale]).range([configuration.minScale, configuration.maxScale]).base(2);\n\t this.zoom = _d2.default.behavior.zoom().size([dimensions.width, dimensions.height]).scaleExtent([configuration.minScale, configuration.maxScale]).x(scales.x);\n\t this.brush = null;\n\t\n\t if (configuration.slider) {\n\t var zoomIn = container.append('button').attr('type', 'button').attr('class', 'btn btn-default timeline-pf-zoom timeline-pf-zoom-in').attr('id', 'timeline-pf-zoom-in').style('top', configuration.padding.top + 'px').style('right', configuration.padding.right + 'px').on('click', function () {\n\t _this.zoomClick();\n\t });\n\t zoomIn.append('i').attr('class', 'fa fa-plus').attr('id', 'timeline-pf-zoom-in-icon');\n\t\n\t var zoomOut = container.append('button').attr('type', 'button').attr('class', 'btn btn-default timeline-pf-zoom').attr('id', 'timeline-pf-zoom-out').style('top', configuration.padding.top + dimensions.height - 26 + 'px').style('right', configuration.padding.right + 'px').on('click', function () {\n\t _this.zoomClick();\n\t });\n\t zoomOut.append('i').attr('class', 'fa fa-minus').attr('id', 'timeline-pf-zoom-out-icon');\n\t\n\t var zoomSlider = container.append('input').attr('type', 'range').attr('class', 'timeline-pf-zoom timeline-pf-slider').attr('id', 'timeline-pf-slider').style('width', dimensions.height - zoomIn.node().offsetHeight * 2 + 'px').attr('value', this.sliderScale(this.zoom.scale())).attr('min', configuration.minScale).attr('max', configuration.maxScale).attr('step', 0.1).on('input', function () {\n\t _this.zoomClick();\n\t });\n\t zoomSlider.style('top', configuration.padding.top + (dimensions.height - zoomIn.node().offsetHeight * 2) / 2 + zoomIn.node().offsetHeight - zoomSlider.node().offsetHeight / 2 + 'px').style('left', configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - zoomIn.node().offsetWidth / 2) - zoomSlider.node().offsetWidth / 2 + 'px');\n\t }\n\t\n\t if (configuration.context) {\n\t this.brush = _d2.default.svg.brush().x(scales.ctx).extent(scales.x.domain()).on(\"brush\", function () {\n\t _this.brushed();\n\t });\n\t\n\t container.select('.timeline-pf-brush').call(this.brush).selectAll(\"rect\").attr(\"height\", dimensions.ctxHeight);\n\t }\n\t\n\t if (configuration.eventZoom) {\n\t this.zoom.on('zoomend', configuration.eventZoom);\n\t }\n\t\n\t this.zoom.on('zoom', function () {\n\t requestAnimationFrame(function () {\n\t return callback(data);\n\t });\n\t if (configuration.slider) {\n\t container.select('#timeline-pf-slider').property('value', _this.sliderScale(_this.zoom.scale()));\n\t }\n\t if (configuration.context) {\n\t _this.brush.extent(_this.scales.x.domain());\n\t container.select('.timeline-pf-brush').call(_this.brush);\n\t }\n\t });\n\t return this.grid.call(this.zoom).on(\"dblclick.zoom\", null);\n\t }\n\t }, {\n\t key: 'brushed',\n\t value: function brushed() {\n\t if (this.brush.empty() !== true) {\n\t var extent = this.brush.extent();\n\t this.zoomFilter(extent[0], extent[1], 0);\n\t }\n\t }\n\t }, {\n\t key: 'zoomClick',\n\t value: function zoomClick() {\n\t var factor = 0.5,\n\t target_zoom = 1,\n\t duration = 0,\n\t center = this.dimensions.width / 2,\n\t extent = this.zoom.scaleExtent(),\n\t translate0 = void 0,\n\t l = void 0,\n\t view = {\n\t x: this.zoom.translate()[0],\n\t k: this.zoom.scale()\n\t };\n\t switch (_d2.default.event.target.id) {\n\t case 'timeline-pf-zoom-in-icon':\n\t case 'timeline-pf-zoom-in':\n\t target_zoom = this.zoom.scale() * (1 + factor);\n\t duration = 100;\n\t break;\n\t case 'timeline-pf-zoom-out-icon':\n\t case 'timeline-pf-zoom-out':\n\t target_zoom = this.zoom.scale() * (1 + factor * -1);\n\t duration = 100;\n\t break;\n\t case 'timeline-pf-slider':\n\t target_zoom = this.sliderScale.invert(_d2.default.event.target.value);\n\t break;\n\t default:\n\t target_zoom = this.zoom.scale();\n\t }\n\t\n\t if (target_zoom < extent[0]) {\n\t target_zoom = extent[0];\n\t } else if (target_zoom > extent[1]) {\n\t target_zoom = extent[1];\n\t }\n\t\n\t translate0 = (center - view.x) / view.k;\n\t view.k = target_zoom;\n\t l = translate0 * view.k + view.x;\n\t\n\t view.x += center - l;\n\t this.interpolateZoom([view.x, 0], view.k, duration);\n\t }\n\t }, {\n\t key: 'interpolateZoom',\n\t value: function interpolateZoom(translate, scale, duration) {\n\t var _this2 = this;\n\t\n\t return _d2.default.transition().duration(duration).tween(\"zoom\", function () {\n\t if (_this2.zoom) {\n\t var _ret = function () {\n\t var iTranslate = _d2.default.interpolate(_this2.zoom.translate(), translate),\n\t iScale = _d2.default.interpolate(_this2.zoom.scale(), scale);\n\t return {\n\t v: function v(t) {\n\t _this2.zoom.scale(iScale(t)).translate(iTranslate(t));\n\t _this2.zoom.event(_this2.grid);\n\t }\n\t };\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t }\n\t });\n\t }\n\t }, {\n\t key: 'getRange',\n\t value: function getRange(Extent) {\n\t return Extent[1].getTime() - Extent[0].getTime();\n\t }\n\t }, {\n\t key: 'getScale',\n\t value: function getScale(oldRange, newRange) {\n\t return oldRange / newRange;\n\t }\n\t }, {\n\t key: 'zoomFilter',\n\t value: function zoomFilter(fromTime, toTime) {\n\t var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n\t\n\t var range = toTime - fromTime,\n\t width = this.dimensions.width,\n\t extent = this.zoom.scaleExtent(),\n\t translate = this.zoom.translate()[0],\n\t curZoom = this.zoom.scale(),\n\t target_zoom = this.zoom.scale(),\n\t cur_width = this.getRange(this.scales.x.domain()),\n\t startDiff = void 0;\n\t\n\t target_zoom = target_zoom * this.getScale(this.getRange(this.scales.x.domain()), range); // new scale is ratio between old and new date ranges\n\t\n\t if (target_zoom < extent[0]) {\n\t target_zoom = extent[0];\n\t } else if (target_zoom > extent[1]) {\n\t target_zoom = extent[1];\n\t }\n\t\n\t startDiff = (this.scales.x.domain()[0] - fromTime) * (width / cur_width); // difference between leftmost dates in px\n\t\n\t translate += startDiff;\n\t\n\t translate = translate * (target_zoom / curZoom); // scale translate value (in px) to new zoom scale\n\t\n\t this.interpolateZoom([translate, 0], target_zoom, duration);\n\t }\n\t }]);\n\t\n\t return zoom;\n\t}();\n\t\n\texports.default = zoom;\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction configurable(targetFunction, config) {\n\t\n\t function configure(item) {\n\t return function(value) {\n\t if (!arguments.length) return config[item];\n\t config[item] = value;\n\t\n\t return targetFunction;\n\t };\n\t }\n\t\n\t for (var item in config) {\n\t targetFunction[item] = configure(item);\n\t }\n\t}\n\t\n\tif(true) {\n\t module.exports = configurable;\n\t} else if ('function' == typeof define && define.amd) {\n\t define([], configurable);\n\t} else {\n\t window.configurable = configurable;\n\t}\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** timeline.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 389ab85ab9172d6884c7\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"d3\"\n ** module id = 1\n ** module chunks = 0\n **/","import d3 from 'd3';\n\nconst config = {\n start: new Date(0),\n end: new Date(),\n contextStart: null,\n contextEnd: null,\n minScale: 0,\n maxScale: Infinity,\n width: null,\n padding: {\n top: 30, //must be at least 24 for marker to display properly\n left: 40,\n bottom: 40,\n right: 40\n },\n lineHeight: 40,\n labelWidth: 140,\n sliderWidth: 30,\n contextHeight: 50,\n locale: null,\n axisFormat: null,\n tickFormat: [\n ['.%L', (d) => d.getMilliseconds()],\n [':%S', (d) => d.getSeconds()],\n ['%I:%M', (d) => d.getMinutes()],\n ['%I %p', (d) => d.getHours()],\n ['%b %d', (d) => d.getMonth() && d.getDate()],\n ['%b', (d) => d.getMonth()],\n ['%Y', () => true]\n ],\n eventHover: null,\n eventZoom: null,\n eventClick: null,\n eventLineColor: (d, i) => {\n switch (i % 5) {\n case 0:\n return \"#00659c\";\n case 1:\n return \"#0088ce\";\n case 2:\n return \"#3f9c35\";\n case 3:\n return \"#ec7a08\";\n case 4:\n return \"#cc0000\";\n }\n },\n eventColor: null,\n eventShape: (d) => {\n if(d.hasOwnProperty(\"events\")) {\n return '\\uf140';\n } else {\n return '\\uf111';\n }\n },\n eventPopover: (d) => {\n var popover = '';\n if(d.hasOwnProperty(\"events\")) {\n popover = `Group of ${d.events.length} events`\n } else {\n for (var i in d.details) {\n popover = popover + i.charAt(0).toUpperCase() + i.slice(1) + ': ' + d.details[i] + '
';\n }\n popover = popover + 'Date: ' + d.date;\n }\n return popover;\n },\n marker: true,\n context: true,\n slider: true,\n eventGrouping: 60000, //one minute\n};\n\nconfig.dateFormat = config.locale ? config.locale.timeFormat('%a %x %I:%M %p') : d3.time.format('%a %x %I:%M %p');\n\nmodule.exports = config;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/config.js\n **/","import xAxis from '../xAxis';\n\nexport default (axesContainer, scales, configuration, dimensions) => data => {\n const axis = (scope, scale) => {\n const selection = axesContainer.selectAll(`.timeline-pf-x-axis.${scope}`).data([{}]);\n\n selection.enter()\n .append('g')\n .classed('timeline-pf-x-axis', true)\n .classed(scope, true)\n .call(xAxis(scale, configuration))\n .attr('transform', `translate(0,${scope === 'focus' ? dimensions.height : dimensions.height + dimensions.ctxHeight + 40})`);\n\n selection.call(xAxis(scale, configuration, dimensions.width));\n\n selection.exit().remove();\n };\n\n axis('focus', scales.x);\n\n if (configuration.context) {\n axis('context', scales.ctx);\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/axes.js\n **/","import d3 from 'd3';\n\nexport default (svg, scales, dimensions, configuration, data) => {\n\n const contextContainer = svg.append(\"g\")\n .classed('timeline-pf-context', true)\n .attr('width', dimensions.width)\n .attr('height', dimensions.ctxHeight)\n .attr('clip-path', 'url(#timeline-pf-context-brush-clipper)')\n .attr(\"transform\", `translate(${configuration.padding.left + configuration.labelWidth},${configuration.padding.top + dimensions.height + 40})`);\n\n let counts = [];\n let roundTo = 3600000;//one hour\n let barWidth = Math.ceil((roundTo / (scales.ctx.domain()[1] - scales.ctx.domain()[0])) * dimensions.width);\n\n countEvents(data, roundTo, counts);\n counts.sort((a,b) => {\n if(a.date < b.date) {\n return -1;\n }\n if(a.date > b.date) {\n return 1;\n }\n return 0;\n });\n scales.cty.domain([0, d3.max(counts, (d) => {return d.count;})]);\n\n contextContainer.selectAll(\".timeline-pf-bar\")\n .data(counts)\n .enter().append(\"rect\")\n .attr(\"class\", \"timeline-pf-bar\")\n .attr(\"x\", d => {return scales.ctx(d.date); })\n .attr(\"y\", d => {return scales.cty(d.count); })\n .attr(\"width\", barWidth)\n .attr(\"height\", d => { return dimensions.ctxHeight - scales.cty(d.count); });\n\n contextContainer.append(\"g\")\n .attr(\"class\", \"timeline-pf-brush\");\n\n};\n\nfunction countEvents(data, toRoundTo, counts) {\n let temp = {};\n for(let i in data) {\n for (let j in data[i].data) {\n let rounded = Math.floor(data[i].data[j].date / toRoundTo) * toRoundTo;\n temp[rounded] = temp[rounded] + 1 || 1;\n }\n }\n for(let k in temp) {\n let tempDate = new Date();\n tempDate.setTime(+k);\n counts.push({'date': tempDate, 'count': temp[k]});\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/context.js\n **/","export default (svg, scales, configuration) => function dropsSelector(data) {\n const dropLines = svg.selectAll('.timeline-pf-drop-line').data(data);\n\n dropLines.enter()\n .append('g')\n .classed('timeline-pf-drop-line', true)\n .attr('transform', (d, idx) => `translate(0, ${scales.y(idx) + (configuration.lineHeight/2)})`)\n .attr('fill', configuration.eventLineColor);\n\n dropLines.each(function dropLineDraw(drop) {\n\n const drops = d3.select(this).selectAll('.timeline-pf-drop').data(drop.data);\n\n drops.attr('transform', (d) => `translate(${scales.x(d.date)})`);\n\n const shape = drops.enter()\n .append('text')\n .classed('timeline-pf-drop', true)\n .classed('timeline-pf-event-group', (d) => {return d.hasOwnProperty(\"events\") ? true : false})\n .attr('transform', (d) => `translate(${scales.x(d.date)})`)\n .attr('fill', configuration.eventColor)\n .attr('text-anchor', 'middle')\n .attr('data-toggle', 'popover')\n .attr('data-html', 'true')\n .attr('data-content', configuration.eventPopover)\n .attr('dominant-baseline', 'central')\n .text(configuration.eventShape);\n\n if (configuration.eventClick) {\n shape.on('click', configuration.eventClick);\n }\n\n if (configuration.eventHover) {\n shape.on('mouseover', configuration.eventHover);\n }\n\n // unregister previous event handlers to prevent from memory leaks\n drops.exit()\n .on('click', null)\n .on('mouseover', null);\n\n drops.exit().remove();\n });\n\n dropLines.exit().remove();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/drops.js\n **/","import d3 from 'd3';\nimport axesFactory from './axes';\nimport dropsFactory from './drops';\nimport labelsFactory from './labels';\nimport markerFactory from './marker';\n\nexport default (svg, dimensions, scales, configuration) => {\n const defs = svg.append('defs');\n defs.append('clipPath')\n .attr('id', 'timeline-pf-drops-container-clipper')\n .append('rect')\n .attr('id', 'timeline-pf-drops-container-rect')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', dimensions.width)\n .attr('height', dimensions.height);\n\n if(configuration.context) {\n defs.append('clipPath')\n .attr('id', 'timeline-pf-context-brush-clipper')\n .append('polygon')\n .attr('points', `0,0 ${dimensions.width},0 ${dimensions.width + configuration.sliderWidth},${dimensions.ctxHeight/2} ${dimensions.width},${dimensions.ctxHeight} 0,${dimensions.ctxHeight} ${-configuration.sliderWidth},${dimensions.ctxHeight/2}`);\n }\n\n const pattern = defs.append('pattern')\n .attr('class', 'timeline-pf-grid-stripes')\n .attr('id', 'timeline-pf-grid-stripes')\n .attr('width', dimensions.width)\n .attr('height', (configuration.lineHeight) * 2)\n .attr('patternUnits', 'userSpaceOnUse');\n pattern.append('rect')\n .attr('width', dimensions.width)\n .attr('height', configuration.lineHeight);\n pattern.append('line')\n .attr('x1', 0)\n .attr('x2', dimensions.width)\n .attr('y1', configuration.lineHeight)\n .attr('y2', configuration.lineHeight);\n pattern.append('line')\n .attr('x1', 0)\n .attr('x2', dimensions.width)\n .attr('y1', '1px')\n .attr('y2', '1px');\n\n const gridContainer = svg.append('g')\n .classed('timeline-pf-grid', true)\n .attr('fill', 'url(#timeline-pf-grid-stripes)')\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const labelsContainer = svg.append('g')\n .classed('timeline-pf-labels', true)\n .attr('transform', `translate(${configuration.padding.left}, ${configuration.padding.top})`);\n\n const axesContainer = svg.append('g')\n .classed('timeline-pf-axes', true)\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const dropsContainer = svg.append('g')\n .classed('timeline-pf-drops-container', true)\n .attr('clip-path', 'url(#timeline-pf-drops-container-clipper)')\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n if (configuration.marker) {\n const stampContainer = svg.append('g')\n .classed('timeline-pf-timestamp', true)\n .attr('height', 30)\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n markerFactory(gridContainer, stampContainer, scales, dimensions, configuration.dateFormat);\n }\n\n const axes = axesFactory(axesContainer, scales, configuration, dimensions);\n const labels = labelsFactory(labelsContainer, scales, configuration);\n const drops = dropsFactory(dropsContainer, scales, configuration);\n\n\n return data => {\n drops(data);\n labels(data);\n axes(data);\n };\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/index.js\n **/","export default (container, scales, config) => data => {\n const labels = container.selectAll('.timeline-pf-label').data(data);\n\n const countEvents = data => {\n let count = 0;\n for (let i = 0; i < data.length; i++) {\n if (data[i].hasOwnProperty(\"events\")) {\n count += data[i].events.length;\n } else {\n count++;\n }\n }\n return count\n }\n const text = d => {\n const count = countEvents(d.data);\n if (d.name === undefined || d.name ===''){\n return `${count} Events`;\n }\n return d.name + (count >= 0 ? ` (${count})` : '');\n };\n\n labels.text(text);\n\n labels.enter()\n .append('text')\n .classed('timeline-pf-label', true)\n .attr('transform', (d, idx) => `translate(${config.labelWidth - 20} ${scales.y(idx) + (config.lineHeight/2)})`)\n .attr('dominant-baseline', 'central')\n .attr('text-anchor', 'end')\n .text(text);\n\n labels.exit().remove();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/labels.js\n **/","import d3 from 'd3';\n\nexport default (gridContainer, stampContainer, scales, dimensions, dateFormat) => {\n gridContainer.append('rect')\n .attr('width', dimensions.width)\n .attr('height', dimensions.height)\n .on(\"mouseover\", function() {\n marker.style(\"display\", null);\n timeStamp.style(\"display\", null);\n timeBox.style(\"display\", null);\n })\n .on(\"mouseout\", function() {\n marker.style(\"display\", \"none\");\n timeStamp.style(\"display\", \"none\");\n timeBox.style(\"display\", \"none\");\n })\n .on('mousemove', moveMarker);\n\n\n var marker = gridContainer.append('line')\n .classed('timeline-pf-marker', true)\n .attr('y1', 0)\n .attr('y2', dimensions.height);\n\n const domain = scales.x.domain();\n\n var timeBox = stampContainer.append('rect')\n .attr('height', '24')\n .attr('width', '150')\n .style('display', 'none');\n\n var timeStamp = stampContainer.append('text')\n .text(dateFormat(domain[1]))\n .attr('transform', `translate(${scales.x.range()[1]})`)\n .attr('text-anchor', 'middle');\n\n function moveMarker() {\n var pos = d3.mouse(gridContainer[0][0])[0]\n marker.attr('transform', `translate(${pos})`);\n timeBox.attr('transform', `translate(${pos - 75}, -25)`);\n timeStamp.attr('transform', `translate(${pos}, -9)`)\n .text(dateFormat(scales.x.invert(pos)));\n\n }\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/marker.js\n **/","import d3 from 'd3';\n\nimport configurable from 'configurable.js';\nimport defaultConfig from './config';\nimport drawer from './drawer';\nimport context from './drawer/context';\nimport Zoom from './zoom';\n\n\nfunction timeline(config = {}) {\n const finalConfiguration = {...defaultConfig, ...config};\n let zoomInstance = new Zoom();\n\n const yScale = (data) => {\n return d3.scale.ordinal()\n .domain(data.map((d) => d.name))\n .range(data.map((d, i) => i * finalConfiguration.lineHeight));\n };\n\n const xScale = (width, timeBounds) => {\n return d3.time.scale()\n .range([0, width])\n .domain(timeBounds);\n };\n\n function timelineGraph(selection) {\n selection.each(function selector(data) {\n\n let ungroupedData = data;\n data = groupEvents(data, finalConfiguration.eventGrouping);\n\n finalConfiguration.lineHeight = (data.length <= 3) ? 80 : 40;\n finalConfiguration.contextStart = finalConfiguration.contextStart || d3.min(getDates(data));\n finalConfiguration.contextEnd = finalConfiguration.contextEnd || finalConfiguration.end;\n\n d3.select(this).select('.timeline-pf-chart').remove();\n d3.select(this).selectAll('.timeline-pf-zoom').remove();\n\n const SCALEHEIGHT = 40;\n let outer_width = finalConfiguration.width || selection.node().clientWidth;\n const height = data.length * finalConfiguration.lineHeight;\n\n const dimensions = {\n width: outer_width - finalConfiguration.padding.right - finalConfiguration.padding.left - finalConfiguration.labelWidth - ((finalConfiguration.slider) ? finalConfiguration.sliderWidth : 0),\n height,\n ctxHeight: finalConfiguration.contextHeight,\n outer_height: height + finalConfiguration.padding.top + finalConfiguration.padding.bottom + ((finalConfiguration.context) ? finalConfiguration.contextHeight + SCALEHEIGHT: 0)\n };\n const scales = {\n x: xScale(dimensions.width, [finalConfiguration.start, finalConfiguration.end]),\n y: yScale(data),\n ctx: xScale(dimensions.width, [finalConfiguration.contextStart, finalConfiguration.contextEnd]),\n cty: d3.scale.linear().range([dimensions.ctxHeight, 0])\n };\n\n const svg = d3.select(this).append('svg')\n .classed('timeline-pf-chart', true)\n .attr({\n width: outer_width,\n height: dimensions.outer_height,\n });\n const draw = drawer(svg, dimensions, scales, finalConfiguration).bind(selection);\n\n draw(data);\n\n if (finalConfiguration.context) {\n context(svg, scales, dimensions, finalConfiguration, ungroupedData);\n }\n\n zoomInstance.updateZoom(d3.select(this), dimensions, scales, finalConfiguration, data, draw);\n\n });\n }\n\n configurable(timelineGraph, finalConfiguration);\n timelineGraph.Zoom = zoomInstance;\n return timelineGraph;\n}\n\nd3.chart = d3.chart || {};\nd3.chart.timeline = timeline;\n\nmodule.exports = timeline;\n\nfunction getDates(data) {\n let toReturn = [];\n for (let i = 0; i < data.length; i++){\n for (let j = 0; j < data[i].data.length; j++){\n toReturn.push(data[i].data[j].date);\n }\n }\n return toReturn;\n}\n\nfunction groupEvents(data, toRoundTo) {\n let rounded,\n temp = {},\n toReturn = [];\n\n for (let i = 0; i < data.length; i++) {\n toReturn[i] = {};\n toReturn[i].name = data[i].name;\n toReturn[i].data = [];\n for (let j = 0; j < data[i].data.length; j++) {\n rounded = Math.round(data[i].data[j].date / toRoundTo) * toRoundTo;\n if (temp[rounded] === undefined) {\n temp[rounded] = [];\n }\n temp[rounded].push(data[i].data[j]);\n }\n for (let k in temp) {\n if (temp[k].length === 1) {\n toReturn[i].data.push(temp[k][0]);\n } else {\n let tempDate = new Date();\n tempDate.setTime(+k);\n toReturn[i].data.push({'date': tempDate,'events': temp[k]});\n }\n }\n temp = {};\n }\n return toReturn;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/timeline.js\n **/","import d3 from 'd3';\n\nexport default function(xScale, configuration, width) {\n const tickFormatData = configuration.tickFormat.map(t => t.slice(0));\n const tickFormat = configuration.locale ? configuration.locale.timeFormat.multi(tickFormatData) : d3.time.format.multi(tickFormatData);\n let numTicks = Math.round(width / 70);\n const axis = d3.svg.axis()\n .scale(xScale)\n .orient('bottom')\n .ticks(numTicks)\n .tickFormat(tickFormat);\n\n if (typeof configuration.axisFormat === 'function') {\n configuration.axisFormat(axis);\n }\n\n return axis;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/xAxis.js\n **/","import d3 from 'd3';\n\nexport default class zoom {\n\n constructor() {\n }\n\n updateZoom(container, dimensions, scales, configuration, data, callback) {\n this.ONE_MINUTE = 60 * 1000;\n this.ONE_HOUR = this.ONE_MINUTE * 60;\n this.ONE_DAY = this.ONE_HOUR * 24;\n this.ONE_WEEK = this.ONE_DAY * 7;\n this.ONE_MONTH = this.ONE_DAY * 30;\n\n this.grid = d3.select('.timeline-pf-grid');\n this.dimensions = dimensions;\n this.scales = scales;\n this.configuration = configuration;\n this.data = data;\n this.callback = callback;\n this.sliderScale = d3.scale.log()\n .domain([configuration.minScale, configuration.maxScale])\n .range([configuration.minScale, configuration.maxScale])\n .base(2);\n this.zoom = d3.behavior.zoom()\n .size([dimensions.width, dimensions.height])\n .scaleExtent([configuration.minScale, configuration.maxScale])\n .x(scales.x);\n this.brush = null;\n\n if (configuration.slider) {\n const zoomIn = container.append('button')\n .attr('type', 'button')\n .attr('class', 'btn btn-default timeline-pf-zoom timeline-pf-zoom-in')\n .attr('id', 'timeline-pf-zoom-in')\n .style('top', `${configuration.padding.top}px`)\n .style('right', `${configuration.padding.right}px`)\n .on('click', () => {this.zoomClick()});\n zoomIn.append('i')\n .attr('class', 'fa fa-plus')\n .attr('id', 'timeline-pf-zoom-in-icon');\n\n const zoomOut = container.append('button')\n .attr('type', 'button')\n .attr('class', 'btn btn-default timeline-pf-zoom')\n .attr('id', 'timeline-pf-zoom-out')\n .style('top', `${configuration.padding.top + dimensions.height - 26}px`)\n .style('right', `${configuration.padding.right}px`)\n .on('click', () => {this.zoomClick()});\n zoomOut.append('i')\n .attr('class', 'fa fa-minus')\n .attr('id', 'timeline-pf-zoom-out-icon');\n\n const zoomSlider = container.append('input')\n .attr('type', 'range')\n .attr('class', 'timeline-pf-zoom timeline-pf-slider')\n .attr('id', 'timeline-pf-slider')\n .style('width', `${dimensions.height - (zoomIn.node().offsetHeight * 2)}px`)\n .attr('value', this.sliderScale(this.zoom.scale()))\n .attr('min', configuration.minScale)\n .attr('max', configuration.maxScale)\n .attr('step', 0.1)\n .on('input', () => {this.zoomClick()});\n zoomSlider\n .style('top', `${configuration.padding.top + ((dimensions.height - (zoomIn.node().offsetHeight) * 2) / 2) + zoomIn.node().offsetHeight - (zoomSlider.node().offsetHeight / 2)}px`)\n .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - (zoomIn.node().offsetWidth / 2)) - (zoomSlider.node().offsetWidth / 2)}px`);\n }\n\n if(configuration.context) {\n this.brush = d3.svg.brush()\n .x(scales.ctx)\n .extent(scales.x.domain())\n .on(\"brush\", () => {this.brushed()});\n\n container.select('.timeline-pf-brush')\n .call(this.brush)\n .selectAll(\"rect\")\n .attr(\"height\", dimensions.ctxHeight);\n }\n\n\n if (configuration.eventZoom) {\n this.zoom.on('zoomend', configuration.eventZoom);\n }\n\n this.zoom.on('zoom', () => {\n requestAnimationFrame(() => callback(data));\n if(configuration.slider) {\n container.select('#timeline-pf-slider').property('value', this.sliderScale(this.zoom.scale()));\n }\n if(configuration.context) {\n this.brush.extent(this.scales.x.domain());\n container.select('.timeline-pf-brush').call(this.brush);\n }\n });\n return this.grid.call(this.zoom)\n .on(\"dblclick.zoom\", null);\n }\n\n brushed() {\n if(this.brush.empty() !== true) {\n let extent = this.brush.extent();\n this.zoomFilter(extent[0], extent[1], 0);\n }\n }\n\n zoomClick() {\n let factor = 0.5,\n target_zoom = 1,\n duration = 0,\n center = this.dimensions.width / 2,\n extent = this.zoom.scaleExtent(),\n translate0,\n l,\n view = {\n x: this.zoom.translate()[0],\n k: this.zoom.scale()\n };\n switch (d3.event.target.id) {\n case 'timeline-pf-zoom-in-icon':\n case 'timeline-pf-zoom-in':\n target_zoom = this.zoom.scale() * (1 + factor);\n duration = 100;\n break;\n case 'timeline-pf-zoom-out-icon':\n case 'timeline-pf-zoom-out':\n target_zoom = this.zoom.scale() * (1 + factor * -1);\n duration = 100;\n break;\n case 'timeline-pf-slider':\n target_zoom = this.sliderScale.invert(d3.event.target.value);\n break;\n default:\n target_zoom = this.zoom.scale();\n }\n\n if (target_zoom < extent[0]) {\n target_zoom = extent[0];\n } else if (target_zoom > extent[1]) {\n target_zoom = extent[1];\n }\n\n translate0 = (center - view.x) / view.k;\n view.k = target_zoom;\n l = translate0 * view.k + view.x;\n\n view.x += center - l;\n this.interpolateZoom([view.x, 0], view.k, duration);\n }\n\n interpolateZoom(translate, scale, duration) {\n return d3.transition().duration(duration).tween(\"zoom\", () => {\n if(this.zoom) {\n let iTranslate = d3.interpolate(this.zoom.translate(), translate),\n iScale = d3.interpolate(this.zoom.scale(), scale);\n return (t) => {\n this.zoom\n .scale(iScale(t))\n .translate(iTranslate(t));\n this.zoom.event(this.grid);\n };\n }\n });\n }\n\n getRange(Extent) {\n return Extent[1].getTime() - Extent[0].getTime();\n }\n\n getScale(oldRange, newRange) {\n return oldRange / newRange;\n }\n\n zoomFilter(fromTime, toTime, duration = 100) {\n let range = toTime - fromTime,\n width = this.dimensions.width,\n extent = this.zoom.scaleExtent(),\n translate = this.zoom.translate()[0],\n curZoom = this.zoom.scale(),\n target_zoom = this.zoom.scale(),\n cur_width = this.getRange(this.scales.x.domain()),\n startDiff;\n\n target_zoom = target_zoom * this.getScale(this.getRange(this.scales.x.domain()), range); // new scale is ratio between old and new date ranges\n\n if (target_zoom < extent[0]) {\n target_zoom = extent[0];\n } else if (target_zoom > extent[1]) {\n target_zoom = extent[1];\n }\n\n startDiff = (this.scales.x.domain()[0] - fromTime) * (width / cur_width); // difference between leftmost dates in px\n\n translate += startDiff;\n\n translate = translate * (target_zoom / curZoom); // scale translate value (in px) to new zoom scale\n\n this.interpolateZoom([translate, 0], target_zoom, duration)\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/zoom.js\n **/","'use strict';\n\nfunction configurable(targetFunction, config) {\n\n function configure(item) {\n return function(value) {\n if (!arguments.length) return config[item];\n config[item] = value;\n\n return targetFunction;\n };\n }\n\n for (var item in config) {\n targetFunction[item] = configure(item);\n }\n}\n\nif('object' == typeof exports && 'undefined' != typeof module) {\n module.exports = configurable;\n} else if ('function' == typeof define && define.amd) {\n define([], configurable);\n} else {\n window.configurable = configurable;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/configurable.js/configurable.js\n ** module id = 12\n ** module chunks = 0\n **/"],"sourceRoot":""} diff --git a/src/config.js b/src/config.js index c8b8b45..7d38465 100755 --- a/src/config.js +++ b/src/config.js @@ -3,6 +3,8 @@ import d3 from 'd3'; const config = { start: new Date(0), end: new Date(), + contextStart: null, + contextEnd: null, minScale: 0, maxScale: Infinity, width: null, diff --git a/src/drawer/axes.js b/src/drawer/axes.js index 9b383d6..8ed730e 100755 --- a/src/drawer/axes.js +++ b/src/drawer/axes.js @@ -2,11 +2,11 @@ import xAxis from '../xAxis'; export default (axesContainer, scales, configuration, dimensions) => data => { const axis = (scope, scale) => { - const selection = axesContainer.selectAll(`.pf-timeline__x-axis.${scope}`).data([{}]); + const selection = axesContainer.selectAll(`.timeline-pf-x-axis.${scope}`).data([{}]); selection.enter() .append('g') - .classed('pf-timeline__x-axis', true) + .classed('timeline-pf-x-axis', true) .classed(scope, true) .call(xAxis(scale, configuration)) .attr('transform', `translate(0,${scope === 'focus' ? dimensions.height : dimensions.height + dimensions.ctxHeight + 40})`); diff --git a/src/drawer/context.js b/src/drawer/context.js index 46708f1..c8d6bff 100755 --- a/src/drawer/context.js +++ b/src/drawer/context.js @@ -3,10 +3,10 @@ import d3 from 'd3'; export default (svg, scales, dimensions, configuration, data) => { const contextContainer = svg.append("g") - .classed('pf-timeline__context', true) + .classed('timeline-pf-context', true) .attr('width', dimensions.width) .attr('height', dimensions.ctxHeight) - .attr('clip-path', 'url(#pf-timeline__context-brush-clipper)') + .attr('clip-path', 'url(#timeline-pf-context-brush-clipper)') .attr("transform", `translate(${configuration.padding.left + configuration.labelWidth},${configuration.padding.top + dimensions.height + 40})`); let counts = []; @@ -25,17 +25,17 @@ export default (svg, scales, dimensions, configuration, data) => { }); scales.cty.domain([0, d3.max(counts, (d) => {return d.count;})]); - contextContainer.selectAll(".pf-timeline__bar") + contextContainer.selectAll(".timeline-pf-bar") .data(counts) .enter().append("rect") - .attr("class", "pf-timeline__bar") + .attr("class", "timeline-pf-bar") .attr("x", d => {return scales.ctx(d.date); }) .attr("y", d => {return scales.cty(d.count); }) .attr("width", barWidth) .attr("height", d => { return dimensions.ctxHeight - scales.cty(d.count); }); contextContainer.append("g") - .attr("class", "pf-timeline__brush"); + .attr("class", "timeline-pf-brush"); }; diff --git a/src/drawer/drops.js b/src/drawer/drops.js index 9b2c886..91544c9 100755 --- a/src/drawer/drops.js +++ b/src/drawer/drops.js @@ -1,22 +1,22 @@ export default (svg, scales, configuration) => function dropsSelector(data) { - const dropLines = svg.selectAll('.pf-timeline__drop-line').data(data); + const dropLines = svg.selectAll('.timeline-pf-drop-line').data(data); dropLines.enter() .append('g') - .classed('pf-timeline__drop-line', true) + .classed('timeline-pf-drop-line', true) .attr('transform', (d, idx) => `translate(0, ${scales.y(idx) + (configuration.lineHeight/2)})`) .attr('fill', configuration.eventLineColor); dropLines.each(function dropLineDraw(drop) { - const drops = d3.select(this).selectAll('.pf-timeline__drop').data(drop.data); + const drops = d3.select(this).selectAll('.timeline-pf-drop').data(drop.data); drops.attr('transform', (d) => `translate(${scales.x(d.date)})`); const shape = drops.enter() .append('text') - .classed('pf-timeline__drop', true) - .classed('pf-timeline__event-group', (d) => {return d.hasOwnProperty("events") ? true : false}) + .classed('timeline-pf-drop', true) + .classed('timeline-pf-event-group', (d) => {return d.hasOwnProperty("events") ? true : false}) .attr('transform', (d) => `translate(${scales.x(d.date)})`) .attr('fill', configuration.eventColor) .attr('text-anchor', 'middle') diff --git a/src/drawer/index.js b/src/drawer/index.js index 12c9fa4..ad15003 100755 --- a/src/drawer/index.js +++ b/src/drawer/index.js @@ -7,9 +7,9 @@ import markerFactory from './marker'; export default (svg, dimensions, scales, configuration) => { const defs = svg.append('defs'); defs.append('clipPath') - .attr('id', 'pf-timeline__drops-container-clipper') + .attr('id', 'timeline-pf-drops-container-clipper') .append('rect') - .attr('id', 'pf-timeline__drops-container-rect') + .attr('id', 'timeline-pf-drops-container-rect') .attr('x', 0) .attr('y', 0) .attr('width', dimensions.width) @@ -17,14 +17,14 @@ export default (svg, dimensions, scales, configuration) => { if(configuration.context) { defs.append('clipPath') - .attr('id', 'pf-timeline__context-brush-clipper') + .attr('id', 'timeline-pf-context-brush-clipper') .append('polygon') .attr('points', `0,0 ${dimensions.width},0 ${dimensions.width + configuration.sliderWidth},${dimensions.ctxHeight/2} ${dimensions.width},${dimensions.ctxHeight} 0,${dimensions.ctxHeight} ${-configuration.sliderWidth},${dimensions.ctxHeight/2}`); } const pattern = defs.append('pattern') - .attr('class', 'pf-timeline__grid-stripes') - .attr('id', 'pf-timeline__grid-stripes') + .attr('class', 'timeline-pf-grid-stripes') + .attr('id', 'timeline-pf-grid-stripes') .attr('width', dimensions.width) .attr('height', (configuration.lineHeight) * 2) .attr('patternUnits', 'userSpaceOnUse'); @@ -43,26 +43,26 @@ export default (svg, dimensions, scales, configuration) => { .attr('y2', '1px'); const gridContainer = svg.append('g') - .classed('pf-timeline__grid', true) - .attr('fill', 'url(#pf-timeline__grid-stripes)') + .classed('timeline-pf-grid', true) + .attr('fill', 'url(#timeline-pf-grid-stripes)') .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`); const labelsContainer = svg.append('g') - .classed('pf-timeline__labels', true) + .classed('timeline-pf-labels', true) .attr('transform', `translate(${configuration.padding.left}, ${configuration.padding.top})`); const axesContainer = svg.append('g') - .classed('pf-timeline__axes', true) + .classed('timeline-pf-axes', true) .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`); const dropsContainer = svg.append('g') - .classed('pf-timeline__drops-container', true) - .attr('clip-path', 'url(#pf-timeline__drops-container-clipper)') + .classed('timeline-pf-drops-container', true) + .attr('clip-path', 'url(#timeline-pf-drops-container-clipper)') .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`); if (configuration.marker) { const stampContainer = svg.append('g') - .classed('pf-timeline__timestamp', true) + .classed('timeline-pf-timestamp', true) .attr('height', 30) .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`); diff --git a/src/drawer/labels.js b/src/drawer/labels.js index eb2d6eb..69cab64 100755 --- a/src/drawer/labels.js +++ b/src/drawer/labels.js @@ -1,5 +1,5 @@ export default (container, scales, config) => data => { - const labels = container.selectAll('.pf-timeline__label').data(data); + const labels = container.selectAll('.timeline-pf-label').data(data); const countEvents = data => { let count = 0; @@ -24,7 +24,7 @@ export default (container, scales, config) => data => { labels.enter() .append('text') - .classed('pf-timeline__label', true) + .classed('timeline-pf-label', true) .attr('transform', (d, idx) => `translate(${config.labelWidth - 20} ${scales.y(idx) + (config.lineHeight/2)})`) .attr('dominant-baseline', 'central') .attr('text-anchor', 'end') diff --git a/src/drawer/line.js b/src/drawer/line.js index 9f338f3..edfbea8 100755 --- a/src/drawer/line.js +++ b/src/drawer/line.js @@ -6,7 +6,7 @@ export const line = (svg, xScale, yScale, data, eventColor = '#000') => { dropElements.enter() .append('g') - .classed('pf-timeline__line', true) + .classed('timeline-pf-line', true) .attr('transform', (d) => `translate(0, ${yScale(d.name)})`) .call(drops(xScale, eventColor)); diff --git a/src/drawer/marker.js b/src/drawer/marker.js index d00b923..7e35f2a 100755 --- a/src/drawer/marker.js +++ b/src/drawer/marker.js @@ -18,7 +18,7 @@ export default (gridContainer, stampContainer, scales, dimensions, dateFormat) = var marker = gridContainer.append('line') - .classed('pf-timeline__marker', true) + .classed('timeline-pf-marker', true) .attr('y1', 0) .attr('y2', dimensions.height); diff --git a/src/timeline.js b/src/timeline.js index 5efb4b8..de5e2ff 100755 --- a/src/timeline.js +++ b/src/timeline.js @@ -30,9 +30,11 @@ function timeline(config = {}) { data = groupEvents(data, finalConfiguration.eventGrouping); finalConfiguration.lineHeight = (data.length <= 3) ? 80 : 40; + finalConfiguration.contextStart = finalConfiguration.contextStart || d3.min(getDates(data)); + finalConfiguration.contextEnd = finalConfiguration.contextEnd || finalConfiguration.end; - d3.select(this).select('.pf-timeline__chart').remove(); - d3.select(this).selectAll('.pf-timeline__zoom').remove(); + d3.select(this).select('.timeline-pf-chart').remove(); + d3.select(this).selectAll('.timeline-pf-zoom').remove(); const SCALEHEIGHT = 40; let outer_width = finalConfiguration.width || selection.node().clientWidth; @@ -47,12 +49,12 @@ function timeline(config = {}) { const scales = { x: xScale(dimensions.width, [finalConfiguration.start, finalConfiguration.end]), y: yScale(data), - ctx: xScale(dimensions.width, [d3.min(getDates(data)), finalConfiguration.end]), + ctx: xScale(dimensions.width, [finalConfiguration.contextStart, finalConfiguration.contextEnd]), cty: d3.scale.linear().range([dimensions.ctxHeight, 0]) }; const svg = d3.select(this).append('svg') - .classed('pf-timeline__chart', true) + .classed('timeline-pf-chart', true) .attr({ width: outer_width, height: dimensions.outer_height, diff --git a/src/zoom.js b/src/zoom.js index 305e813..eadde77 100755 --- a/src/zoom.js +++ b/src/zoom.js @@ -12,7 +12,7 @@ export default class zoom { this.ONE_WEEK = this.ONE_DAY * 7; this.ONE_MONTH = this.ONE_DAY * 30; - this.grid = d3.select('.pf-timeline__grid'); + this.grid = d3.select('.timeline-pf-grid'); this.dimensions = dimensions; this.scales = scales; this.configuration = configuration; @@ -31,38 +31,39 @@ export default class zoom { if (configuration.slider) { const zoomIn = container.append('button') .attr('type', 'button') - .attr('class', 'btn btn-default pf-timeline__zoom pf-timeline__zoom-in') - .attr('id', 'pf-timeline__zoom-in') + .attr('class', 'btn btn-default timeline-pf-zoom timeline-pf-zoom-in') + .attr('id', 'timeline-pf-zoom-in') .style('top', `${configuration.padding.top}px`) .style('right', `${configuration.padding.right}px`) .on('click', () => {this.zoomClick()}); zoomIn.append('i') .attr('class', 'fa fa-plus') - .attr('id', 'pf-timeline__zoom-in-icon'); + .attr('id', 'timeline-pf-zoom-in-icon'); const zoomOut = container.append('button') .attr('type', 'button') - .attr('class', 'btn btn-default pf-timeline__zoom') - .attr('id', 'pf-timeline__zoom-out') + .attr('class', 'btn btn-default timeline-pf-zoom') + .attr('id', 'timeline-pf-zoom-out') .style('top', `${configuration.padding.top + dimensions.height - 26}px`) .style('right', `${configuration.padding.right}px`) .on('click', () => {this.zoomClick()}); zoomOut.append('i') .attr('class', 'fa fa-minus') - .attr('id', 'pf-timeline__zoom-out-icon'); + .attr('id', 'timeline-pf-zoom-out-icon'); const zoomSlider = container.append('input') .attr('type', 'range') - .attr('class', 'pf-timeline__zoom pf-timeline__slider') - .attr('id', 'pf-timeline__slider') + .attr('class', 'timeline-pf-zoom timeline-pf-slider') + .attr('id', 'timeline-pf-slider') .style('width', `${dimensions.height - (zoomIn.node().offsetHeight * 2)}px`) - .style('top', `${configuration.padding.top + ((dimensions.height - (zoomIn.node().offsetHeight) * 2) / 2) + zoomIn.node().offsetHeight - 7}px`) - .style('right', `${configuration.padding.right - (dimensions.height - zoomIn.node().offsetHeight) / 2 + zoomIn.node().offsetWidth}px`) .attr('value', this.sliderScale(this.zoom.scale())) .attr('min', configuration.minScale) .attr('max', configuration.maxScale) .attr('step', 0.1) .on('input', () => {this.zoomClick()}); + zoomSlider + .style('top', `${configuration.padding.top + ((dimensions.height - (zoomIn.node().offsetHeight) * 2) / 2) + zoomIn.node().offsetHeight - (zoomSlider.node().offsetHeight / 2)}px`) + .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - (zoomIn.node().offsetWidth / 2)) - (zoomSlider.node().offsetWidth / 2)}px`); } if(configuration.context) { @@ -71,7 +72,7 @@ export default class zoom { .extent(scales.x.domain()) .on("brush", () => {this.brushed()}); - container.select('.pf-timeline__brush') + container.select('.timeline-pf-brush') .call(this.brush) .selectAll("rect") .attr("height", dimensions.ctxHeight); @@ -85,11 +86,11 @@ export default class zoom { this.zoom.on('zoom', () => { requestAnimationFrame(() => callback(data)); if(configuration.slider) { - container.select('#pf-timeline__slider').property('value', this.sliderScale(this.zoom.scale())); + container.select('#timeline-pf-slider').property('value', this.sliderScale(this.zoom.scale())); } if(configuration.context) { this.brush.extent(this.scales.x.domain()); - container.select('.pf-timeline__brush').call(this.brush); + container.select('.timeline-pf-brush').call(this.brush); } }); return this.grid.call(this.zoom) @@ -116,17 +117,17 @@ export default class zoom { k: this.zoom.scale() }; switch (d3.event.target.id) { - case 'pf-timeline__zoom-in-icon': - case 'pf-timeline__zoom-in': + case 'timeline-pf-zoom-in-icon': + case 'timeline-pf-zoom-in': target_zoom = this.zoom.scale() * (1 + factor); duration = 100; break; - case 'pf-timeline__zoom-out-icon': - case 'pf-timeline__zoom-out': + case 'timeline-pf-zoom-out-icon': + case 'timeline-pf-zoom-out': target_zoom = this.zoom.scale() * (1 + factor * -1); duration = 100; break; - case 'pf-timeline__slider': + case 'timeline-pf-slider': target_zoom = this.sliderScale.invert(d3.event.target.value); break; default: diff --git a/style.css b/style.css index 341c2fc..3dc8ac0 100755 --- a/style.css +++ b/style.css @@ -1,19 +1,19 @@ -.pf-timeline__zoom-area { +.timeline-pf-zoom-area { fill: transparent; cursor: pointer; } -.pf-timeline__y-tick { +.timeline-pf-y-tick { stroke: black; fill: none; stroke-width: 1px; } -.pf-timeline__axes { +.timeline-pf-axes { fill: #fafafa; } -.pf-timeline__x-axis { +.timeline-pf-x-axis { position: absolute; z-index: 50; stroke: #d1d1d1; @@ -22,18 +22,18 @@ shape-rendering: crispEdges; } -.pf-timeline__x-axis text { +.timeline-pf-x-axis text { stroke: none; fill: black; font-family: 'Open Sans'; font-size: 12px; } -.pf-timeline__label { +.timeline-pf-label { font-weight: 400; } -text.pf-timeline__drop { +text.timeline-pf-drop { text-rendering: auto; font-size: 10px; font-family: 'FontAwesome'; @@ -42,72 +42,72 @@ text.pf-timeline__drop { cursor: pointer; } -text.pf-timeline__drop:hover { +text.timeline-pf-drop:hover { font-size: 21px; font-weight: bold; paint-order: stroke; } -text.pf-timeline__event-group { +text.timeline-pf-event-group { font-size: 18px; } -.pf-timeline__grid { +.timeline-pf-grid { stroke: #d1d1d1; cursor: all-scroll; shape-rendering: crispEdges; } -.pf-timeline__graph-body .pf-timeline__line { +.timeline-pf-graph-body .timeline-pf-line { height: 20px; padding: 10px; } -.pf-timeline__timestamp text { +.timeline-pf-timestamp text { fill: #fff; } -.pf-timeline__timestamp rect { +.timeline-pf-timestamp rect { fill: #000; opacity: .7; } -.pf-timeline__marker { +.timeline-pf-marker { pointer-events: none; } -.pf-timeline__brush .extent { +.timeline-pf-brush .extent { stroke: none; fill: #0088ce; fill-opacity: .25; shape-rendering: crispEdges; } -.pf-timeline__graph-body .pf-timeline__line { +.timeline-pf-graph-body .timeline-pf-line { height: 20px; padding: 10px; } -.pf-timeline__zoom { +.timeline-pf-zoom { position:absolute; } -.pf-timeline__context .pf-timeline__bar { +.timeline-pf-context .timeline-pf-bar { fill: #bbbbbb; shape-rendering: crispEdges; } -.pf-timeline__slider { +.timeline-pf-slider { -webkit-transform: rotate(-90deg); transform: rotate(-90deg); } -.pf-timeline__grid-stripes rect { +.timeline-pf-grid-stripes rect { fill: #fafafa; shape-rendering: crispEdges; } - .pf-timeline__grid-stripes line { + .timeline-pf-grid-stripes line { stroke: #d1d1d1; stroke-width: 1px; shape-rendering: crispEdges; diff --git a/test/karma/drawer/drops.js b/test/karma/drawer/drops.js index 4427d56..7cc680c 100755 --- a/test/karma/drawer/drops.js +++ b/test/karma/drawer/drops.js @@ -12,7 +12,7 @@ describe('Drops drawer', () => { const chart = d3.chart.timeline().eventClick(clickSpy); d3.select(wrapper).datum(data).call(chart); - const drop = d3.select('.pf-timeline__drop'); + const drop = d3.select('.timeline-pf-drop'); const event = document.createEvent('UIEvents'); event.initUIEvent('click', true, true, null, null); @@ -28,7 +28,7 @@ describe('Drops drawer', () => { const chart = d3.chart.timeline().eventHover(hoverSpy); d3.select(wrapper).datum(data).call(chart); - const drop = d3.select('.pf-timeline__drop'); + const drop = d3.select('.timeline-pf-drop'); const event = document.createEvent('UIEvents'); event.initUIEvent('mouseover', true, true, null, null); diff --git a/test/karma/timeline.js b/test/karma/timeline.js index 38d1767..8fa0714 100755 --- a/test/karma/timeline.js +++ b/test/karma/timeline.js @@ -8,7 +8,7 @@ describe('d3.chart.timeline', () => { const chart = d3.chart.timeline(); d3.select(div).datum(data).call(chart); - expect(div.querySelectorAll('svg.pf-timeline__chart').length).toBe(1); + expect(div.querySelectorAll('svg.timeline-pf-chart').length).toBe(1); }); it('should remove all previously created charts in current selection to prevent duplicates', () => { @@ -19,7 +19,7 @@ describe('d3.chart.timeline', () => { d3.select(div).datum(data).call(chart); d3.select(div).datum(data).call(chart); - expect(div.querySelectorAll('svg.pf-timeline__chart').length).toBe(1); + expect(div.querySelectorAll('svg.timeline-pf-chart').length).toBe(1); }); it('should have as many lines as events', () => { @@ -33,7 +33,7 @@ describe('d3.chart.timeline', () => { const chart = d3.chart.timeline().start(new Date('2010-01-25')); d3.select(div).datum(data).call(chart); - expect(div.querySelectorAll('.pf-timeline__drop-line').length).toBe(3); + expect(div.querySelectorAll('.timeline-pf-drop-line').length).toBe(3); }); it('should have as many drops as given dates', () => { @@ -47,6 +47,6 @@ describe('d3.chart.timeline', () => { const chart = d3.chart.timeline().start(new Date('2010-01-25')); d3.select(div).datum(data).call(chart); - expect(div.querySelectorAll('.pf-timeline__drop').length).toBe(3); + expect(div.querySelectorAll('.timeline-pf-drop').length).toBe(3); }); });