forked from marmelab/EventDrops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.map.json
1 lines (1 loc) · 18.6 KB
/
bundle.map.json
1
{"version":3,"file":"bundle.js","sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","lib/main.js","lib/eventDrops.js","lib/util/configurable.js","lib/eventLine.js","lib/delimiter.js","lib/filterData.js"],"names":["eventDrops","require","define","amd","d3","chart","window","module","exports","configurable","eventLine","delimiter","defaultConfig","start","Date","end","width","margin","top","left","bottom","right","locale","axisFormat","tickFormat","d","getMilliseconds","getSeconds","getMinutes","getHours","getDay","getDate","getMonth","eventHover","hasDelimiter","hasTopAxis","hasBottomAxis","data","length","eventColor","config","eventDropGraph","selection","each","updateZoom","event","sourceEvent","toString","zoom","translate","scale","redraw","redrawDelimiter","svg","select","remove","append","classed","attr","graphWidth","call","xScale","dateFormat","timeFormat","time","format","drawXAxis","where","tickFormatData","forEach","item","tick","slice","push","multi","xAxis","axis","orient","y","parseInt","graphHeight","graph","size","height","graphBody","lines","selectAll","enter","yScale","name","style","exit","behavior","center","on","this","yDomain","yRange","index","domain","range","yAxisEl","yTick","curx","cury","zoomRect","clientX","clientY","el","document","elementFromPoint","tagName","x","ordinal","key","targetFunction","listeners","value","arguments","hasOwnProperty","filterData","text","count","dates","circle","limits","filteredData","boundary","min","max","datum"],"mappings":"AAAA;AKAA,YAGA,IAAIS,cAAeR,QAAQ,uBAEvBW,eACFiD,OAAQ,KACRC,WAAY,KAGdvD,QAAOC,QAAU,SAAUgC,GAOzB,QAAS7B,GAAU+B,GACjBA,EAAUC,KAAK,WACbvC,GAAGkD,OAAOyC,MAAMT,UAAU,QAAQ/B,QAElC,IAAIsE,GAASrF,EAAOqB,OAAOsC,QAE3B/F,IAAGkD,OAAOyC,MAAMvC,OAAO,QACpBiE,KAAK,WAEJ,MAAOjF,GAAOsB,WAAW+D,EAAO,MAEjCpE,QAAQ,SAAS,GAGpBrD,GAAGkD,OAAOyC,MAAMvC,OAAO,QACpBiE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OAAOF,GAAGC,MAAML,WAAaA,WAAWM,OAAOF,KAE/CG,OAAOC,QAAUR;;AEdnBO,OAAOC,QAAU,SAAsB2G,EAAgB3E,EAAQ4E,GAC7DA,EAAYA,KACZ,KAAK,GAAI9C,KAAQ9B,IACf,SAAU8B,GACR6C,EAAe7C,GAAQ,SAAS+C,GAC9B,MAAKC,WAAUhF,QACfE,EAAO8B,GAAQ+C,EACXD,EAAUG,eAAejD,IAC3B8C,EAAU9C,GAAM+C,GAGXF,GANuB3E,EAAO8B,KAQtCA","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","\"use strict\";\n/* global require, define, module */\n\nvar eventDrops = require('./eventDrops');\n\nif (typeof define === \"function\" && define.amd) {\n define('d3.chart.eventDrops', [\"d3\"], function (d3) {\n d3.chart = d3.chart || {};\n d3.chart.eventDrops = eventDrops(d3);\n });\n} else if (window) {\n window.d3.chart = window.d3.chart || {};\n window.d3.chart.eventDrops = eventDrops(window.d3);\n} else {\n module.exports = eventDrops;\n}\n","\"use strict\";\n/* global require, module */\n\nvar configurable = require('./util/configurable');\nvar eventLine = require('./eventLine');\nvar delimiter = require('./delimiter');\n\nmodule.exports = function (d3) {\n\n var defaultConfig = {\n start: new Date(0),\n end: new Date(),\n width: 1000,\n margin: {\n top: 60,\n left: 200,\n bottom: 40,\n right: 50\n },\n locale: null,\n axisFormat: null,\n tickFormat: [\n [\".%L\", function(d) { return d.getMilliseconds(); }],\n [\":%S\", function(d) { return d.getSeconds(); }],\n [\"%I:%M\", function(d) { return d.getMinutes(); }],\n [\"%I %p\", function(d) { return d.getHours(); }],\n [\"%a %d\", function(d) { return d.getDay() && d.getDate() != 1; }],\n [\"%b %d\", function(d) { return d.getDate() != 1; }],\n [\"%B\", function(d) { return d.getMonth(); }],\n [\"%Y\", function() { return true; }]\n ],\n eventHover: null,\n hasDelimiter: true,\n hasTopAxis: true,\n hasBottomAxis: function (data) {\n return data.length >= 10;\n },\n eventColor: 'black'\n };\n\n return function eventDrops(config) {\n var xScale = d3.time.scale();\n var yScale = d3.scale.ordinal();\n config = config || {};\n for (var key in defaultConfig) {\n config[key] = config[key] || defaultConfig[key];\n }\n\n function eventDropGraph(selection) {\n selection.each(function (data) {\n var zoom = d3.behavior.zoom().center(null).on(\"zoom\", updateZoom);\n\n if (config.hasDelimiter) {\n zoom.on(\"zoomend\", redrawDelimiter);\n }\n var graphWidth = config.width - config.margin.right - config.margin.left;\n var graphHeight = data.length * 40;\n var height = graphHeight + config.margin.top + config.margin.bottom;\n\n d3.select(this).select('svg').remove();\n\n var svg = d3.select(this)\n .append('svg')\n .attr('width', config.width)\n .attr('height', height)\n ;\n\n var graph = svg.append('g')\n .attr('transform', 'translate(0, 25)');\n\n var yDomain = [];\n var yRange = [];\n\n data.forEach(function (event, index) {\n yDomain.push(event.name);\n yRange.push(index * 40);\n });\n\n yScale.domain(yDomain).range(yRange);\n\n var yAxisEl = graph.append('g')\n .classed('y-axis', true)\n .attr('transform', 'translate(0, 60)');\n\n var yTick = yAxisEl.append('g').selectAll('g').data(yDomain);\n\n yTick.enter()\n .append('g')\n .attr('transform', function(d) {\n return 'translate(0, ' + yScale(d) + ')';\n })\n .append('line')\n .classed('y-tick', true)\n .attr('x1', config.margin.left)\n .attr('x2', config.margin.left + graphWidth);\n\n yTick.exit().remove();\n\n var curx, cury;\n var zoomRect = svg\n .append('rect')\n .call(zoom)\n .classed('zoom', true)\n .attr('width', graphWidth)\n .attr('height', height )\n .attr('transform', 'translate(' + config.margin.left + ', 35)')\n ;\n\n if (typeof config.eventHover === 'function') {\n zoomRect.on('mousemove', function(d, e) {\n var event = d3.event;\n if (curx == event.clientX && cury == event.clientY) return;\n curx = event.clientX;\n cury = event.clientY;\n zoomRect.attr('display', 'none');\n var el = document.elementFromPoint(d3.event.clientX, d3.event.clientY);\n zoomRect.attr('display', 'block');\n if (el.tagName !== 'circle') return;\n config.eventHover(el);\n });\n }\n\n xScale.range([0, graphWidth]).domain([config.start, config.end]);\n\n zoom.x(xScale);\n\n function updateZoom() {\n if (d3.event.sourceEvent.toString() === '[object MouseEvent]') {\n zoom.translate([d3.event.translate[0], 0]);\n }\n\n if (d3.event.sourceEvent.toString() === '[object WheelEvent]') {\n zoom.scale(d3.event.scale);\n }\n\n redraw();\n }\n\n function redrawDelimiter() {\n svg.select('.delimiter').remove();\n var delimiterEl = svg\n .append('g')\n .classed('delimiter', true)\n .attr('width', graphWidth)\n .attr('height', 10)\n .attr('transform', 'translate(' + config.margin.left + ', ' + (config.margin.top - 45) + ')')\n .call(delimiter({\n xScale: xScale,\n dateFormat: config.locale ? config.locale.timeFormat(\"%d %B %Y\") : d3.time.format(\"%d %B %Y\")\n }))\n ;\n }\n\n function drawXAxis(where) {\n\n // copy config.tickFormat because d3 format.multi edit its given tickFormat data\n var tickFormatData = [];\n\n config.tickFormat.forEach(function (item) {\n var tick = item.slice(0);\n tickFormatData.push(tick);\n });\n\n var tickFormat = config.locale ? config.locale.timeFormat.multi(tickFormatData) : d3.time.format.multi(tickFormatData);\n var xAxis = d3.svg.axis()\n .scale(xScale)\n .orient(where)\n .tickFormat(tickFormat);\n ;\n\n if (typeof config.axisFormat === 'function') {\n config.axisFormat(xAxis);\n }\n\n var y = (where == 'bottom' ? parseInt(graphHeight) : 0) + config.margin.top - 40;\n\n graph.select('.x-axis.' + where).remove();\n var xAxisEl = graph\n .append('g')\n .classed('x-axis', true)\n .classed(where, true)\n .attr('transform', 'translate(' + config.margin.left + ', ' + y + ')')\n .call(xAxis)\n ;\n }\n\n function redraw() {\n\n var hasTopAxis = typeof config.hasTopAxis === 'function' ? config.hasTopAxis(data) : config.hasTopAxis;\n if (hasTopAxis) {\n drawXAxis('top');\n }\n\n var hasBottomAxis = typeof config.hasBottomAxis === 'function' ? config.hasBottomAxis(data) : config.hasBottomAxis;\n if (hasBottomAxis) {\n drawXAxis('bottom');\n }\n\n zoom.size([config.width, height]);\n\n graph.select('.graph-body').remove();\n var graphBody = graph\n .append('g')\n .classed('graph-body', true)\n .attr('transform', 'translate(' + config.margin.left + ', ' + (config.margin.top - 15) + ')');\n\n var lines = graphBody.selectAll('g').data(data);\n\n lines.enter()\n .append('g')\n .classed('line', true)\n .attr('transform', function(d) {\n return 'translate(0,' + yScale(d.name) + ')';\n })\n .style('fill', config.eventColor)\n .call(eventLine({ xScale: xScale }))\n ;\n\n lines.exit().remove();\n }\n\n redraw();\n if (config.hasDelimiter) {\n redrawDelimiter();\n }\n });\n }\n\n configurable(eventDropGraph, config);\n\n return eventDropGraph;\n };\n};\n","module.exports = function configurable(targetFunction, config, listeners) {\n listeners = listeners || {};\n for (var item in config) {\n (function(item) {\n targetFunction[item] = function(value) {\n if (!arguments.length) return config[item];\n config[item] = value;\n if (listeners.hasOwnProperty(item)) {\n listeners[item](value);\n }\n\n return targetFunction;\n };\n })(item); // for doesn't create a closure, forcing it\n }\n};\n","\"use strict\";\n/* global require, module, d3 */\n\nvar configurable = require('./util/configurable');\nvar filterData = require('./filterData');\n\nvar defaultConfig = {\n xScale: null\n};\n\nmodule.exports = function (config) {\n\n config = config || {};\n for (var key in defaultConfig) {\n config[key] = config[key] || defaultConfig[key];\n }\n\n var eventLine = function eventLine(selection) {\n selection.each(function (data) {\n d3.select(this).selectAll('text').remove();\n\n d3.select(this).append('text')\n .text(function(d) {\n var count = filterData(d.dates, config.xScale).length;\n return d.name + (count > 0 ? ' (' + count + ')' : '');\n })\n .attr('text-anchor', 'end')\n .attr('transform', 'translate(-20)')\n .style('fill', 'black')\n ;\n\n d3.select(this).selectAll('circle').remove();\n\n var circle = d3.select(this).selectAll('circle')\n .data(function(d) {\n // filter value outside of range\n return filterData(d.dates, config.xScale);\n });\n\n circle.enter()\n .append('circle')\n .attr('cx', function(d) {\n return config.xScale(d);\n })\n .attr('cy', -5)\n .attr('r', 10)\n ;\n\n circle.exit().remove();\n\n });\n };\n\n configurable(eventLine, config);\n\n return eventLine;\n};\n","\"use strict\";\n/* global require, module, d3 */\n\nvar configurable = require('./util/configurable');\n\nvar defaultConfig = {\n xScale: null,\n dateFormat: null\n};\n\nmodule.exports = function (config) {\n\n config = config || {};\n for (var key in defaultConfig) {\n config[key] = config[key] || defaultConfig[key];\n }\n\n function delimiter(selection) {\n selection.each(function (data) {\n d3.select(this).selectAll('text').remove();\n\n var limits = config.xScale.domain();\n\n d3.select(this).append('text')\n .text(function () {\n\n return config.dateFormat(limits[0]);\n })\n .classed('start', true)\n ;\n\n d3.select(this).append('text')\n .text(function () {\n\n return config.dateFormat(limits[1]);\n })\n .attr('text-anchor', 'end')\n .attr('transform', 'translate(' + config.xScale.range()[1] + ')')\n .classed('end', true)\n ;\n });\n }\n\n configurable(delimiter, config);\n\n return delimiter;\n};\n","\"use strict\";\n/* global module */\n\nmodule.exports = function filterDate(data, scale) {\n data = data || [];\n var filteredData = [];\n var boundary = scale.range();\n var min = boundary[0];\n var max = boundary[1];\n data.forEach(function (datum) {\n var value = scale(datum);\n if (value < min || value > max) {\n return;\n }\n filteredData.push(datum);\n });\n\n return filteredData;\n};\n"]}