t-viSNE: Interactive Assessment and Interpretation of t-SNE Projections
https://doi.org/10.1109/TVCG.2020.2986996
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
54 KiB
1 lines
54 KiB
{"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.text().split(/\\s+/).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.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.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\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(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\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\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 {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({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\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\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.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : 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(type.labels, labels, scale.domain(), range);\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.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.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\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({ i, genLength, generatedLabels }) {\n if (i === 0) {\n return generatedLabels[i].replace(\"NaN to\", \"Less than\")\n } else if (i === genLength - 1) {\n return `${generatedLabels[genLength - 1].replace(\" to NaN\", \"\")} 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","arr","mirror","i","l","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","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","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","replace"],"mappings":";;;;;;;;;;;;AAGA,IAAMA,cAAe,SAAfA,WAAe,CAACC,CAAD;SAAOA,CAAP;CAArB;;AAEA,IAAMC,aAAa,SAAbA,UAAa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