diff --git a/demo/index.html b/demo/index.html index 0737f86..349c654 100755 --- a/demo/index.html +++ b/demo/index.html @@ -8,6 +8,7 @@ + Patternfly timeline test page @@ -47,7 +48,7 @@
- +
diff --git a/demo/script.js b/demo/script.js index ef40d1c..3db1ff4 100755 --- a/demo/script.js +++ b/demo/script.js @@ -38,24 +38,29 @@ var timeline = d3.chart.timeline() var table = ''; if(el.hasOwnProperty("events")) { table = table + 'This is a group of ' + el.events.length + ' events starting on '+ el.date + ''; - table = table + '' + table = table + ''; for (var i = 0; i < el.events.length; i++) { table = table + ' '; for (var j in el.events[i].details) { table = table +' '; } - table = table + '' + table = table + ''; } table = table + ''; } else { table = table + 'Date: ' + el.date + '
'; - for (var i in el.details) { + for (i in el.details) { table = table + i.charAt(0).toUpperCase() + i.slice(1) + ': ' + el.details[i] + '
'; } } $('#legend').html(table); }); +if(countNames(data) <= 0) { + timeline.labelWidth(60); +} + + var element = d3.select('#pf-timeline').append('div').datum(data.filter(function(eventGroup) { return eventGroup.display === true; @@ -107,6 +112,16 @@ $( document.body ).on( 'click', '.dropdown-menu li', function( event ) { }); +function countNames(data) { + var count = 0; + for (var i = 0; i < data.length; i++) { + if (data[i].name !== undefined && data[i].name !=='') { + count++; + } + } + return count; +} + function zoomFilter() { var range = $('#range-dropdown').find('[data-bind="label"]' ).text(), position = $('#position-dropdown').find('[data-bind="label"]' ).text(), diff --git a/dist/timeline.js b/dist/timeline.js index a67f9c2..8007aad 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(a){if(n[a])return n[a].exports;var r=n[a]={exports:{},id:a,loaded:!1};return t[a].call(r.exports,r,r.exports,e),r.loaded=!0,r.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 r=n(1),i=a(r),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()}],["%a %d",function(t){return t.getDay()&&1!==t.getDate()}],["%b %d",function(t){return 1!==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("%x %I:%M %p"):i["default"].time.format("%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 r=n(10),i=a(r);e["default"]=function(t,e,n,a){return function(r){var o=function(e,r){var o=t.selectAll(".x-axis."+e).data([{}]);o.enter().append("g").classed("x-axis",!0).classed(e,!0).call(i["default"](r,n)).attr("transform","translate(0,"+("focus"===e?a.height:a.height+a.ctxHeight+40)+")"),o.call(i["default"](r,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 r(t,e,n){var a={};for(var r in t)for(var i in t[r].data){var o=Math.floor(t[r].data[i].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 i=n(1),o=a(i);e["default"]=function(t,e,n,a,i){var l=t.append("g").classed("context",!0).attr("width",n.width).attr("height",n.ctxHeight).attr("clip-path","url(#context-brush-clipper)").attr("transform","translate("+(a.padding.left+a.labelWidth)+","+(a.padding.top+n.height+40)+")"),s=[],u=36e5,d=Math.ceil(u/(e.ctx.domain()[1]-e.ctx.domain()[0])*n.width);r(i,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(".bar").data(s).enter().append("rect").attr("class","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(a){var r=t.selectAll(".drop-line").data(a);r.enter().append("g").classed("drop-line",!0).attr("transform",function(t,a){return"translate(0, "+(e.y(a)+n.lineHeight/2)+")"}).attr("fill",n.eventLineColor),r.each(function(t){var a=d3.select(this).selectAll(".drop").data(t.data);a.attr("transform",function(t){return"translate("+e.x(t.date)+")"});var r=a.enter().append("text").classed("drop",!0).classed("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("tabindex","0").attr("data-toggle","popover").attr("data-html","true").attr("data-content",n.eventPopover).attr("data-trigger","focus").attr("dominant-baseline","central").text(n.eventShape);n.eventClick&&r.on("click",n.eventClick),n.eventHover&&r.on("mouseover",n.eventHover),a.exit().on("click",null).on("mouseover",null),a.exit().remove()}),r.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 r=n(1),i=(a(r),n(3)),o=a(i),l=n(5),s=a(l),u=n(7),d=a(u),c=n(8),f=a(c);e["default"]=function(t,e,n,a){var r=t.append("defs");r.append("clipPath").attr("id","drops-container-clipper").append("rect").attr("id","drops-container-rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height),a.context&&r.append("clipPath").attr("id","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 i=r.append("pattern").attr("id","grid-stripes").attr("width",e.width).attr("height",2*a.lineHeight).attr("patternUnits","userSpaceOnUse");i.append("rect").attr("width",e.width).attr("height",a.lineHeight),i.append("line").attr("x1",0).attr("x2",e.width).attr("y1",a.lineHeight).attr("y2",a.lineHeight),i.append("line").attr("x1",0).attr("x2",e.width).attr("y1","1px").attr("y2","1px");var l=t.append("g").classed("grid",!0).attr("fill","url(#grid-stripes)").attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")"),u=t.append("g").classed("labels",!0).attr("transform","translate("+a.padding.left+", "+a.padding.top+")"),c=t.append("g").classed("axes",!0).attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")"),h=t.append("g").classed("drops-container",!0).attr("clip-path","url(#drops-container-clipper)").attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")");if(a.marker){var p=t.append("g").classed("timestamp",!0).attr("height",30).attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")");f["default"](l,p,n,e,a.dateFormat)}var m=o["default"](c,n,a,e),g=d["default"](u,n,a),v=s["default"](h,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 r=t.selectAll(".label").data(a),i=function(t){for(var e=0,n=0;n=0?" ("+e+")":"")};r.text(o),r.enter().append("text").classed("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),r.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 r=n(1),i=a(r);e["default"]=function(t,e,n,a,r){function o(){var e=i["default"].mouse(t[0][0])[0];l.attr("transform","translate("+e+")"),u.attr("transform","translate("+(e-65)+", -25)"),d.attr("transform","translate("+e+", -9)").text(r(n.x.invert(e)))}t.append("rect").attr("width",a.width).attr("height",a.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("marker",!0).attr("y1",0).attr("y2",a.height),s=n.x.domain(),u=e.append("rect").attr("height","24").attr("width","130").style("display","none"),d=e.append("text").text(r(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 r(){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,h={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)},p={x:s(h.width,[n.start,n.end]),y:r(e),ctx:s(h.width,[u["default"].min(i(e)),n.end]),cty:u["default"].scale.linear().range([h.ctxHeight,0])},g=u["default"].select(this).append("svg").classed("pf-timeline-chart",!0).attr({width:c,height:h.outer_height}),x=m["default"](g,h,p,n).bind(t);x(e),n.context&&v["default"](g,p,h,n,l),a.updateZoom(u["default"].select(this),h,p,n,e,x)})}var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=l({},h["default"],e),a=new y["default"],r=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=a,t}function i(t){for(var e=[],n=0;nr[1]&&(e=r[1]),i=(a-l.x)/l.k,l.k=e,o=i*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),r=s["default"].interpolate(a.zoom.scale(),e);return{v:function(t){a.zoom.scale(r(t)).translate(n(t)),a.zoom.event(a.grid)}}}();if("object"===("undefined"==typeof n?"undefined":i(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]?100:arguments[2],a=e-t,r=this.dimensions.width,i=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()),a),si[1]&&(s=i[1]),d=(this.scales.x.domain()[0]-t)*(r/u),o+=d,o*=s/l,this.interpolateZoom([o,0],s,n)}}]),t}();e["default"]=u},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){}])}); +!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 r=n[a]={exports:{},id:a,loaded:!1};return t[a].call(r.exports,r,r.exports,e),r.loaded=!0,r.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 r=n(1),i=a(r),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"):i["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 r=n(10),i=a(r);e["default"]=function(t,e,n,a){return function(r){var o=function(e,r){var o=t.selectAll(".x-axis."+e).data([{}]);o.enter().append("g").classed("x-axis",!0).classed(e,!0).call(i["default"](r,n)).attr("transform","translate(0,"+("focus"===e?a.height:a.height+a.ctxHeight+40)+")"),o.call(i["default"](r,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 r(t,e,n){var a={};for(var r in t)for(var i in t[r].data){var o=Math.floor(t[r].data[i].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 i=n(1),o=a(i);e["default"]=function(t,e,n,a,i){var l=t.append("g").classed("context",!0).attr("width",n.width).attr("height",n.ctxHeight).attr("clip-path","url(#context-brush-clipper)").attr("transform","translate("+(a.padding.left+a.labelWidth)+","+(a.padding.top+n.height+40)+")"),s=[],u=36e5,d=Math.ceil(u/(e.ctx.domain()[1]-e.ctx.domain()[0])*n.width);r(i,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(".bar").data(s).enter().append("rect").attr("class","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(a){var r=t.selectAll(".drop-line").data(a);r.enter().append("g").classed("drop-line",!0).attr("transform",function(t,a){return"translate(0, "+(e.y(a)+n.lineHeight/2)+")"}).attr("fill",n.eventLineColor),r.each(function(t){var a=d3.select(this).selectAll(".drop").data(t.data);a.attr("transform",function(t){return"translate("+e.x(t.date)+")"});var r=a.enter().append("text").classed("drop",!0).classed("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("tabindex","0").attr("data-toggle","popover").attr("data-html","true").attr("data-content",n.eventPopover).attr("data-trigger","focus").attr("dominant-baseline","central").text(n.eventShape);n.eventClick&&r.on("click",n.eventClick),n.eventHover&&r.on("mouseover",n.eventHover),a.exit().on("click",null).on("mouseover",null),a.exit().remove()}),r.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 r=n(1),i=(a(r),n(3)),o=a(i),l=n(5),s=a(l),u=n(7),d=a(u),c=n(8),f=a(c);e["default"]=function(t,e,n,a){var r=t.append("defs");r.append("clipPath").attr("id","drops-container-clipper").append("rect").attr("id","drops-container-rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height),a.context&&r.append("clipPath").attr("id","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 i=r.append("pattern").attr("id","grid-stripes").attr("width",e.width).attr("height",2*a.lineHeight).attr("patternUnits","userSpaceOnUse");i.append("rect").attr("width",e.width).attr("height",a.lineHeight),i.append("line").attr("x1",0).attr("x2",e.width).attr("y1",a.lineHeight).attr("y2",a.lineHeight),i.append("line").attr("x1",0).attr("x2",e.width).attr("y1","1px").attr("y2","1px");var l=t.append("g").classed("grid",!0).attr("fill","url(#grid-stripes)").attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")"),u=t.append("g").classed("labels",!0).attr("transform","translate("+a.padding.left+", "+a.padding.top+")"),c=t.append("g").classed("axes",!0).attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")"),h=t.append("g").classed("drops-container",!0).attr("clip-path","url(#drops-container-clipper)").attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")");if(a.marker){var p=t.append("g").classed("timestamp",!0).attr("height",30).attr("transform","translate("+(a.padding.left+a.labelWidth)+", "+a.padding.top+")");f["default"](l,p,n,e,a.dateFormat)}var m=o["default"](c,n,a,e),g=d["default"](u,n,a),v=s["default"](h,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 r=t.selectAll(".label").data(a),i=function(t){for(var e=0,n=0;n=0?" ("+e+")":"")};r.text(o),r.enter().append("text").classed("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),r.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 r=n(1),i=a(r);e["default"]=function(t,e,n,a,r){function o(){var e=i["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(r(n.x.invert(e)))}t.append("rect").attr("width",a.width).attr("height",a.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("marker",!0).attr("y1",0).attr("y2",a.height),s=n.x.domain(),u=e.append("rect").attr("height","24").attr("width","150").style("display","none"),d=e.append("text").text(r(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 r(){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,h={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)},p={x:s(h.width,[n.start,n.end]),y:r(e),ctx:s(h.width,[u["default"].min(i(e)),n.end]),cty:u["default"].scale.linear().range([h.ctxHeight,0])},g=u["default"].select(this).append("svg").classed("pf-timeline-chart",!0).attr({width:c,height:h.outer_height}),x=m["default"](g,h,p,n).bind(t);x(e),n.context&&v["default"](g,p,h,n,l),a.updateZoom(u["default"].select(this),h,p,n,e,x)})}var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l({},h["default"],e),a=new y["default"],r=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=a,t}function i(t){for(var e=[],n=0;nr[1]&&(e=r[1]),i=(a-l.x)/l.k,l.k=e,o=i*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),r=s["default"].interpolate(a.zoom.scale(),e);return{v:function(t){a.zoom.scale(r(t)).translate(n(t)),a.zoom.event(a.grid)}}}();if("object"===("undefined"==typeof n?"undefined":i(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,r=this.dimensions.width,i=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()),a),si[1]&&(s=i[1]),d=(this.scales.x.domain()[0]-t)*(r/u),o+=d,o*=s/l,this.interpolateZoom([o,0],s,n)}}]),t}();e["default"]=u},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 4ba48a1..febd4e9 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 8b221408adcee2f9f6a6","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","getDay","getDate","getMonth","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","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","undefined","_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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AtQ,GAEA,QAAAuQ,GAAAC,GACA,gBAAAjN,GACA,MAAAyG,WAAAzH,QACAvC,EAAAwQ,GAAAjN,EAEA+M,GAHAtQ,EAAAwQ,IAOA,OAAAA,KAAAxQ,GACAsQ,EAAAE,GAAAD,EAAAC,GAKA9R,EAAAD,QAAAiO,Gbm2BM,SAAShO,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 }], ['%a %d', function (d) {\n\t return d.getDay() && d.getDate() !== 1;\n\t }], ['%b %d', function (d) {\n\t return d.getDate() !== 1;\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 '';\n\t } else {\n\t return '';\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('%x %I:%M %p') : _d2.default.time.format('%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('.x-axis.' + scope).data([{}]);\n\t\n\t selection.enter().append('g').classed('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('context', true).attr('width', dimensions.width).attr('height', dimensions.ctxHeight).attr('clip-path', 'url(#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(\".bar\").data(counts).enter().append(\"rect\").attr(\"class\", \"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('.drop-line').data(data);\n\t\n\t dropLines.enter().append('g').classed('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('.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('drop', true).classed('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('tabindex', '0').attr('data-toggle', 'popover').attr('data-html', 'true').attr('data-content', configuration.eventPopover).attr('data-trigger', 'focus').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', 'drops-container-clipper').append('rect').attr('id', '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', '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('id', '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('grid', true).attr('fill', 'url(#grid-stripes)').attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var labelsContainer = svg.append('g').classed('labels', true).attr('transform', 'translate(' + configuration.padding.left + ', ' + configuration.padding.top + ')');\n\t\n\t var axesContainer = svg.append('g').classed('axes', true).attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var dropsContainer = svg.append('g').classed('drops-container', true).attr('clip-path', 'url(#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('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('.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 return d.name + (count >= 0 ? ' (' + count + ')' : '');\n\t };\n\t\n\t labels.text(text);\n\t\n\t labels.enter().append('text').classed('label', true)\n\t // .attr('x', 180)\n\t .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('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', '130').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 - 65) + ', -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 ? \"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('.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').attr('id', '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', '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', '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', 'zoom-out-icon');\n\t\n\t var zoomSlider = container.append('input').attr('type', 'range').attr('class', 'pf-timeline-zoom').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 (event.target.id) {\n\t case 'zoom-in-icon':\n\t case 'zoom-in':\n\t target_zoom = this.zoom.scale() * (1 + factor);\n\t duration = 100;\n\t break;\n\t case 'zoom-out-icon':\n\t case '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(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 ? 100 : arguments[2];\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 8b221408adcee2f9f6a6\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 ['%a %d', (d) => d.getDay() && d.getDate() !== 1],\n ['%b %d', (d) => d.getDate() !== 1],\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('%x %I:%M %p') : d3.time.format('%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(`.x-axis.${scope}`).data([{}]);\n\n selection.enter()\n .append('g')\n .classed('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('context', true)\n .attr('width', dimensions.width)\n .attr('height', dimensions.ctxHeight)\n .attr('clip-path', 'url(#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(\".bar\")\n .data(counts)\n .enter().append(\"rect\")\n .attr(\"class\", \"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('.drop-line').data(data);\n\n dropLines.enter()\n .append('g')\n .classed('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('.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('drop', true)\n .classed('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('tabindex', '0')\n .attr('data-toggle', 'popover')\n .attr('data-html', 'true')\n .attr('data-content', configuration.eventPopover)\n .attr('data-trigger', 'focus')\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', 'drops-container-clipper')\n .append('rect')\n .attr('id', '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', '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('id', '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('grid', true)\n .attr('fill', 'url(#grid-stripes)')\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const labelsContainer = svg.append('g')\n .classed('labels', true)\n .attr('transform', `translate(${configuration.padding.left}, ${configuration.padding.top})`);\n\n const axesContainer = svg.append('g')\n .classed('axes', true)\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const dropsContainer = svg.append('g')\n .classed('drops-container', true)\n .attr('clip-path', 'url(#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('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('.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 return d.name + (count >= 0 ? ` (${count})` : '');\n };\n\n labels.text(text);\n\n labels.enter()\n .append('text')\n .classed('label', true)\n // .attr('x', 180)\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('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', '130')\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 - 65}, -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('.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')\n .attr('id', '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', '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', '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', 'zoom-out-icon');\n\n const zoomSlider = container.append('input')\n .attr('type', 'range')\n .attr('class', 'pf-timeline-zoom')\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 (event.target.id) {\n case 'zoom-in-icon':\n case 'zoom-in':\n target_zoom = this.zoom.scale() * (1 + factor);\n duration = 100;\n break;\n case 'zoom-out-icon':\n case '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(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 eb63e76e9bea573d74a2","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,GACZC,WAAY,IACZC,YAAa,GACbC,cAAe,GACfC,OAAQ,KACRC,WAAY,KACZC,aACG,MAAO,SAACC,GAAD,MAAOA,GAAEC,qBAChB,MAAO,SAACD,GAAD,MAAOA,GAAEE,gBAChB,QAAS,SAACF,GAAD,MAAOA,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L,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('.x-axis.' + scope).data([{}]);\n\t\n\t selection.enter().append('g').classed('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('context', true).attr('width', dimensions.width).attr('height', dimensions.ctxHeight).attr('clip-path', 'url(#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(\".bar\").data(counts).enter().append(\"rect\").attr(\"class\", \"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('.drop-line').data(data);\n\t\n\t dropLines.enter().append('g').classed('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('.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('drop', true).classed('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('tabindex', '0').attr('data-toggle', 'popover').attr('data-html', 'true').attr('data-content', configuration.eventPopover).attr('data-trigger', 'focus').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', 'drops-container-clipper').append('rect').attr('id', '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', '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('id', '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('grid', true).attr('fill', 'url(#grid-stripes)').attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var labelsContainer = svg.append('g').classed('labels', true).attr('transform', 'translate(' + configuration.padding.left + ', ' + configuration.padding.top + ')');\n\t\n\t var axesContainer = svg.append('g').classed('axes', true).attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var dropsContainer = svg.append('g').classed('drops-container', true).attr('clip-path', 'url(#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('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('.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('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('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('.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').attr('id', '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', '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', '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', 'zoom-out-icon');\n\t\n\t var zoomSlider = container.append('input').attr('type', 'range').attr('class', 'pf-timeline-zoom').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 (event.target.id) {\n\t case 'zoom-in-icon':\n\t case 'zoom-in':\n\t target_zoom = this.zoom.scale() * (1 + factor);\n\t duration = 100;\n\t break;\n\t case 'zoom-out-icon':\n\t case '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(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 eb63e76e9bea573d74a2\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(`.x-axis.${scope}`).data([{}]);\n\n selection.enter()\n .append('g')\n .classed('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('context', true)\n .attr('width', dimensions.width)\n .attr('height', dimensions.ctxHeight)\n .attr('clip-path', 'url(#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(\".bar\")\n .data(counts)\n .enter().append(\"rect\")\n .attr(\"class\", \"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('.drop-line').data(data);\n\n dropLines.enter()\n .append('g')\n .classed('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('.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('drop', true)\n .classed('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('tabindex', '0')\n .attr('data-toggle', 'popover')\n .attr('data-html', 'true')\n .attr('data-content', configuration.eventPopover)\n .attr('data-trigger', 'focus')\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', 'drops-container-clipper')\n .append('rect')\n .attr('id', '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', '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('id', '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('grid', true)\n .attr('fill', 'url(#grid-stripes)')\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const labelsContainer = svg.append('g')\n .classed('labels', true)\n .attr('transform', `translate(${configuration.padding.left}, ${configuration.padding.top})`);\n\n const axesContainer = svg.append('g')\n .classed('axes', true)\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const dropsContainer = svg.append('g')\n .classed('drops-container', true)\n .attr('clip-path', 'url(#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('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('.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('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('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('.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')\n .attr('id', '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', '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', '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', 'zoom-out-icon');\n\n const zoomSlider = container.append('input')\n .attr('type', 'range')\n .attr('class', 'pf-timeline-zoom')\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 (event.target.id) {\n case 'zoom-in-icon':\n case 'zoom-in':\n target_zoom = this.zoom.scale() * (1 + factor);\n duration = 100;\n break;\n case 'zoom-out-icon':\n case '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(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 a3f5ba0..c8b8b45 100755 --- a/src/config.js +++ b/src/config.js @@ -23,9 +23,8 @@ const config = { [':%S', (d) => d.getSeconds()], ['%I:%M', (d) => d.getMinutes()], ['%I %p', (d) => d.getHours()], - ['%a %d', (d) => d.getDay() && d.getDate() !== 1], - ['%b %d', (d) => d.getDate() !== 1], - ['%B', (d) => d.getMonth()], + ['%b %d', (d) => d.getMonth() && d.getDate()], + ['%b', (d) => d.getMonth()], ['%Y', () => true] ], eventHover: null, @@ -71,6 +70,6 @@ const config = { eventGrouping: 60000, //one minute }; -config.dateFormat = config.locale ? config.locale.timeFormat('%x %I:%M %p') : d3.time.format('%x %I:%M %p'); +config.dateFormat = config.locale ? config.locale.timeFormat('%a %x %I:%M %p') : d3.time.format('%a %x %I:%M %p'); module.exports = config; diff --git a/src/drawer/labels.js b/src/drawer/labels.js index 7eb97df..44ad109 100755 --- a/src/drawer/labels.js +++ b/src/drawer/labels.js @@ -14,6 +14,9 @@ export default (container, scales, config) => data => { } const text = d => { const count = countEvents(d.data); + if (d.name === undefined || d.name ===''){ + return `${count} Events`; + } return d.name + (count >= 0 ? ` (${count})` : ''); }; @@ -22,7 +25,6 @@ export default (container, scales, config) => data => { labels.enter() .append('text') .classed('label', true) - // .attr('x', 180) .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/marker.js b/src/drawer/marker.js index ed2f1c8..72da4cc 100755 --- a/src/drawer/marker.js +++ b/src/drawer/marker.js @@ -26,7 +26,7 @@ export default (gridContainer, stampContainer, scales, dimensions, dateFormat) = var timeBox = stampContainer.append('rect') .attr('height', '24') - .attr('width', '130') + .attr('width', '150') .style('display', 'none'); var timeStamp = stampContainer.append('text') @@ -37,7 +37,7 @@ export default (gridContainer, stampContainer, scales, dimensions, dateFormat) = function moveMarker() { var pos = d3.mouse(gridContainer[0][0])[0] marker.attr('transform', `translate(${pos})`); - timeBox.attr('transform', `translate(${pos - 65}, -25)`); + timeBox.attr('transform', `translate(${pos - 75}, -25)`); timeStamp.attr('transform', `translate(${pos}, -9)`) .text(dateFormat(scales.x.invert(pos)));
DateEventObject
DateEventObject
' + el.events[i].date + ' ' + el.events[i].details[j] + '