-
Notifications
You must be signed in to change notification settings - Fork 104
/
indexRollupNext.js.map
1 lines (1 loc) · 54.1 KB
/
indexRollupNext.js.map
1
{"version":3,"file":"indexRollupNext.js","sources":["src/legend.js","src/color.js","src/size.js","src/symbol.js","src/helpers.js","index.js"],"sourcesContent":["import { select } from \"d3-selection\"\nimport { format, formatPrefix } from \"d3-format\"\n\nconst d3_identity = d => d\n\nconst d3_reverse = arr => {\n const mirror = []\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l - i - 1]\n }\n return mirror\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text\n .text()\n .split(/\\s+/)\n .reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text\n .text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\")\n\n while ((word = words.pop())) {\n line.push(word)\n tspan.text(line.join(\" \"))\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop()\n tspan.text(line.join(\" \"))\n line = [word]\n tspan = text\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\")\n .text(word)\n }\n }\n })\n}\n\nconst d3_mergeLabels = (gen = [], labels, domain, range, labelDelimiter) => {\n if (typeof labels === \"object\") {\n if (labels.length === 0) return gen\n\n let i = labels.length\n for (; i < gen.length; i++) {\n labels.push(gen[i])\n }\n return labels\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i = 0; i < genLength; i++) {\n customLabels.push(\n labels({\n i,\n genLength,\n generatedLabels: gen,\n domain,\n range,\n labelDelimiter\n })\n )\n }\n return customLabels\n }\n\n return gen\n}\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = []\n\n if (cells.length > 1) {\n data = cells\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0]) / (cells - 1)\n let i = 0\n\n for (; i < cells; i++) {\n data.push(domain[0] + i * increment)\n }\n }\n\n const labels = data.map(labelFormat)\n return {\n data: data,\n labels: labels,\n feature: d => scale(d)\n }\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map(d => {\n const invert = scale.invertExtent(d)\n return (\n labelFormat(invert[0]) +\n \" \" +\n labelDelimiter +\n \" \" +\n labelFormat(invert[1])\n )\n })\n\n return {\n data: scale.range(),\n labels: labels,\n feature: d3_identity\n }\n}\n\nconst d3_ordinalLegend = scale => ({\n data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d)\n})\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d)\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d)\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d)\n}\n\nexport default {\n d3_drawShapes: (\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n path\n ) => {\n if (shape === \"rect\") {\n shapes.attr(\"height\", shapeHeight).attr(\"width\", shapeWidth)\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n } else if (shape === \"line\") {\n shapes\n .attr(\"x1\", 0)\n .attr(\"x2\", shapeWidth)\n .attr(\"y1\", 0)\n .attr(\"y2\", 0)\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path)\n }\n },\n\n d3_addText: function(svg, enter, labels, classPrefix, labelWidth) {\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\")\n const text = svg\n .selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity)\n\n if (labelWidth) {\n svg\n .selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function(\n scale,\n ascending,\n cells,\n labels,\n labelFormat,\n labelDelimiter\n ) {\n const type = scale.invertExtent\n ? d3_quantLegend(scale, labelFormat, labelDelimiter)\n : scale.ticks\n ? d3_linearLegend(scale, cells, labelFormat)\n : d3_ordinalLegend(scale)\n\n //for d3.scaleSequential that doesn't have a range function\n const range = (scale.range && scale.range()) || scale.domain()\n type.labels = d3_mergeLabels(\n type.labels,\n labels,\n scale.domain(),\n range,\n labelDelimiter\n )\n\n if (ascending) {\n type.labels = d3_reverse(type.labels)\n type.data = d3_reverse(type.data)\n }\n\n return type\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data\n .map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans)\n text.attr(\"transform\", textTrans)\n if (orient === \"horizontal\") {\n text.style(\"text-anchor\", labelAlign)\n }\n },\n\n d3_addEvents: function(cells, dispatcher) {\n cells\n .on(\"mouseover.legend\", function(d) {\n d3_cellOver(dispatcher, d, this)\n })\n .on(\"mouseout.legend\", function(d) {\n d3_cellOut(dispatcher, d, this)\n })\n .on(\"click.legend\", function(d) {\n d3_cellClick(dispatcher, d, this)\n })\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\") {\n const titleText = svg.selectAll(\"text.\" + classPrefix + \"legendTitle\")\n\n titleText\n .data([title])\n .enter()\n .append(\"text\")\n .attr(\"class\", classPrefix + \"legendTitle\")\n\n svg.selectAll(\"text.\" + classPrefix + \"legendTitle\").text(title)\n\n if (titleWidth) {\n svg\n .selectAll(\"text.\" + classPrefix + \"legendTitle\")\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select(\".\" + classPrefix + \"legendCells\")\n const yOffset = svg\n .select(\".\" + classPrefix + \"legendTitle\")\n .nodes()\n .map(d => d.getBBox().height)[0],\n xOffset = -cellsSvg.nodes().map(function(d) {\n return d.getBBox().x\n })[0]\n cellsSvg.attr(\"transform\", \"translate(\" + xOffset + \",\" + yOffset + \")\")\n }\n },\n\n d3_defaultLocale: {\n format,\n formatPrefix\n },\n\n d3_defaultFormatSpecifier: \".01f\",\n\n d3_defaultDelimiter: \"to\"\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\n\nimport { sum } from \"d3-array\"\n\nexport default function color() {\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg\n .selectAll(\n \"g.\" + classPrefix + \"cell \" + shape + \".\" + classPrefix + \"swatch\"\n )\n .data(type.data)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n\n shapes = shapes.merge(shapes)\n\n helper.d3_drawShapes(\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n path\n )\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n // sets placement\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map(d => d.getBBox())\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass) {\n if (shape == \"line\") {\n shapes.style(\"stroke\", type.feature)\n } else {\n shapes.style(\"fill\", type.feature)\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`)\n }\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) =>\n Math.max(d.height, shapeSize[i].height)\n )\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n return `translate(0, ${height + i * shapePadding})`\n }\n\n textTrans = (d, i) =>\n `translate( ${shapeSize[i].width +\n shapeSize[i].x +\n labelOffset}, ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) =>\n `translate(${i * (shapeSize[i].width + shapePadding)},0)`\n textTrans = (d, i) => `translate(${shapeSize[i].width * textAlign +\n shapeSize[i].x},\n ${shapeSize[i].height + shapeSize[i].y + labelOffset + 8})`\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape\n if (\n _ == \"rect\" ||\n _ == \"circle\" ||\n _ == \"line\" ||\n (_ == \"path\" && typeof d === \"string\")\n ) {\n shape = _\n path = d\n }\n return legend\n }\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth\n shapeWidth = +_\n return legend\n }\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight\n shapeHeight = +_\n return legend\n }\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius\n shapeRadius = +_\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass\n if (_ === true || _ === false) {\n useClass = _\n }\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap\n textWrap = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function size() {\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\n \"g.\" + classPrefix + \"cell \" + shape + \".\" + classPrefix + \"swatch\"\n )\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n //creates shape\n if (shape === \"line\") {\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth)\n shapes.attr(\"stroke-width\", type.feature)\n } else {\n helper.d3_drawShapes(\n shape,\n shapes,\n type.feature,\n type.feature,\n type.feature,\n path\n )\n }\n\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n //sets placement\n\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map((d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i])\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke\n } else if (shape === \"line\" && orient === \"vertical\") {\n bbox.width = bbox.width\n }\n return bbox\n })\n\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) =>\n Math.max(d.height, shapeSize[i].height)\n )\n const y =\n shape == \"circle\" || shape == \"line\" ? shapeSize[0].height / 2 : 0\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n\n return `translate(0, ${y + height + i * shapePadding})`\n }\n\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width)\n const y = shape == \"circle\" || shape == \"line\" ? maxH / 2 : 0\n return `translate(${width + i * shapePadding}, ${y})`\n }\n\n const offset = shape == \"line\" ? maxH / 2 : maxH\n textTrans = (d, i) => {\n return `translate( ${shapeSize[i].width * textAlign + shapeSize[i].x},\n ${offset + labelOffset})`\n }\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\") {\n shape = _\n path = d\n }\n return legend\n }\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth\n shapeWidth = +_\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function symbol() {\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape + \".\" + classPrefix + \"swatch\")\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n //remove old shapes\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n helper.d3_drawShapes(\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n type.feature\n )\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n // sets placement\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map(d => d.getBBox())\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n return `translate(0, ${height + i * shapePadding} )`\n }\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => `translate( ${i * (maxW + shapePadding)},0)`\n textTrans = (d, i) => `translate( ${shapeSize[i].width * textAlign +\n shapeSize[i].x},\n ${maxH + labelOffset})`\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","export const thresholdLabels = function({\n i,\n genLength,\n generatedLabels,\n labelDelimiter\n}) {\n if (i === 0) {\n const values = generatedLabels[i].split(` ${labelDelimiter} `)\n return `Less than ${values[1]}`\n } else if (i === genLength - 1) {\n const values = generatedLabels[i].split(` ${labelDelimiter} `)\n return `${values[0]} or more`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","mirror","i","l","arr","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","labelDelimiter","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","locale","helper","d3_defaultLocale","specifier","d3_defaultFormatSpecifier","labelOffset","d3_defaultDelimiter","labelWrap","legendDispatcher","dispatch","legend","d3_calcType","format","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","merge","d3_drawShapes","d3_addText","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","formatLocale","formatSpecifier","toLowerCase","textWrap","value","apply","size","bbox","stroke","maxH","maxW","offset","symbol","thresholdLabels","generatedLabels","values"],"mappings":";;;;;;;;;;;;AAGA,IAAMA,cAAc,SAAdA,WAAc;SAAKC,CAAL;CAApB;;AAEA,IAAMC,aAAa,SAAbA,UAAa,MAAO;MAClBC,SAAS,EAAf;OACK,IAAIC,IAAI,CAAR,EAAWC,IAAIC,IAAIC,MAAxB,EAAgCH,IAAIC,CAApC,EAAuCD,GAAvC,EAA4C;WACnCA,CAAP,IAAYE,IAAID,IAAID,CAAJ,GAAQ,CAAZ,CAAZ;;SAEKD,MAAP;CALF;;;AASA,IAAMK,kBAAkB,SAAlBA,eAAkB,CAACC,IAAD,EAAOC,KAAP,EAAiB;OAClCC,IAAL,CAAU,YAAW;QACfF,OAAOG,OAAO,IAAP,CAAX;QACEC,QAAQJ,KACLA,IADK,GAELK,KAFK,CAEC,KAFD,EAGLC,OAHK,EADV;QAKEC,IALF;QAMEC,OAAO,EANT;QAOEC,aAAa,CAPf;QAQEC,aAAa,GARf;;QASMV,KAAKW,IAAL,CAAU,GAAV,CATN;QAUEC,KAAKC,WAAWb,KAAKW,IAAL,CAAU,IAAV,CAAX,KAA+B,CAVtC;QAWEG,QAAQd,KACLA,IADK,CACA,IADA,EAELe,MAFK,CAEE,OAFF,EAGLJ,IAHK,CAGA,GAHA,EAGK,CAHL,EAILA,IAJK,CAIA,IAJA,EAIMC,KAAK,IAJX,CAXV;;WAiBQL,OAAOH,MAAMY,GAAN,EAAf,EAA6B;WACtBC,IAAL,CAAUV,IAAV;YACMP,IAAN,CAAWQ,KAAKU,IAAL,CAAU,GAAV,CAAX;UACIJ,MAAMK,IAAN,GAAaC,qBAAb,KAAuCnB,KAAvC,IAAgDO,KAAKV,MAAL,GAAc,CAAlE,EAAqE;aAC9DkB,GAAL;cACMhB,IAAN,CAAWQ,KAAKU,IAAL,CAAU,GAAV,CAAX;eACO,CAACX,IAAD,CAAP;gBACQP,KACLe,MADK,CACE,OADF,EAELJ,IAFK,C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