diff --git a/dist/unipept-visualizations.js.map b/dist/unipept-visualizations.js.map index af32b55..090f0e3 100644 --- a/dist/unipept-visualizations.js.map +++ b/dist/unipept-visualizations.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap b0b049baf223248a841f","webpack:///./src/index.js","webpack:///./src/treeview/treeview.js","webpack:///./src/shared/univis.js","webpack:///./src/shared/maxcountheap.js","webpack:///./src/treeview/treeviewNode.js","webpack:///./src/shared/node.js","webpack:///./src/treemap/treemap.js","webpack:///./src/treemap/treemapNode.js","webpack:///./src/sunburst/sunburst.js","webpack:///./src/sunburst/sunburstNode.js"],"names":["TreeView","element","data","options","that","MARGIN","top","right","bottom","left","DURATION","COLOR_SCALE","d3","scale","category10","DEFAULTS","height","width","nodeDistance","levelsToExpand","minNodeSize","maxNodeSize","countAccessor","d","count","rerootCallback","undefined","colors","name","nodeFillColor","nodeStrokeColor","linkStrokeColor","enableInnerArcs","enableExpandOnClick","enableRightClick","enableLabels","getLabel","enableTooltips","getTooltip","getTooltipTitle","getTooltipText","enableAutoExpand","settings","visibleRoot","tooltipTimer","nodeId","root","tree","tooltip","diagonal","widthScale","innerArc","zoomListener","svg","init","initTooltip","initInnerArcs","layout","nodeSize","separation","a","b","distance","parent","projection","y","x","linear","range","behavior","zoom","scaleExtent","on","attr","event","translate","select","append","call","draw","createNode","id","style","arcScale","Math","PI","arc","outerRadius","startAngle","endAngle","self_count","domain","x0","y0","setSelected","children","forEach","i","color","functor","setRecursiveProperty","collapseAll","initialExpand","expandAll","update","centerNode","expand","allowedCount","isFinite","pq","size","toExpand","remove","add","c","source","nodes","reverse","links","depth","node","selectAll","nodeEnter","enter","click","tooltipIn","tooltipOut","rightClick","isLeaf","text","nodeUpdate","transition","duration","_children","nodeExit","exit","link","target","insert","o","selected","defaultPrevented","shiftKey","collapse","reroot","preventDefault","html","pageY","pageX","setTimeout","clearTimeout","reset","setFullScreen","isFullScreen","w","h","$","window","getRoot","fn","treeview","get","Univis","s","split","reduce","charCodeAt","textColor","brightness","rgb","err","r","g","comp","heapify","floor","length","sink","bubbleUp","index","value","parentIndex","targetIndex","MaxCountHeap","iterable","_data","Array","from","item","push","output","pop","TreeviewNode","setCount","sum","new","Node","property","_height","max","getHeight","_depth","getDepth","construct","map","n","TreeMap","className","levels","getLevel","getBreadcrumbTooltip","colorRoot","colorLeaf","colorBreadcrumbs","labelHeight","current","treemapLayout","breadcrumbs","treemap","colorScale","initCSS","elementClass","addClass","prop","appendTo","empty","padding","interpolate","interpolateLab","setBreadcrumbs","crumbs","temp","triggerCallback","getReadableColorFor","tooltipMove","order","position","dx","dy","resize","TreemapNode","Sunburst","colorCounter","addEmptyChildren","redraw","breadcrumbWidth","radius","currentMaxLevel","vis","partition","sort","min","innerRadius","path","colour","getComputedTextLength","my","maxY","xd","yd","yr","t","shift","breadArc","bc","getTitleText","round","enableBreadcrumbs","attrTween","arcTween","e","isParentOf","angle","each","useFixedColors","fixedColors","abs","stringHash","rank","colours","hsl","singleChild","l","getColor","COLORS","FIXED_COLORS","p","ml","some","sunburst","SunburstNode"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA;;;;AACA;;;;AACA;;;;;;;;;;;;;;;;mQCFA;;;;;;;;mBAWwBA,Q;;AALxB;;;;AACA;;;;AACA;;;;;;AAGe,UAASA,QAAT,CAAkBC,OAAlB,EAA2BC,IAA3B,EAA+C;AAAA,SAAdC,OAAc,uEAAJ,EAAI;;AAC1D,SAAIC,OAAO,EAAX;;AAEA,SAAMC,SAAS;AACPC,cAAK,CADE;AAEPC,gBAAO,CAFA;AAGPC,iBAAQ,CAHD;AAIPC,eAAM;AAJC,MAAf;AAAA,SAMIC,WAAW,GANf;AAAA,SAOIC,cAAcC,GAAGC,KA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W,SAAjW,EAA4W,SAA5W,EAAuX,SAAvX,EAAkY,SAAlY,EAA6Y,SAA7Y,EAAwZ,SAAxZ,EAAma,SAAna,EAA8a,SAA9a,EAAyb,SAAzb,EAAoc,SAApc,EAA+c,SAA/c,EAA0d,SAA1d,EAAqe,SAAre,EAAgf,SAAhf,EAA2f,SAA3f,EAAsgB,SAAtgB,EAAihB,SAAjhB,EAA4hB,SAA5hB,EAAuiB,SAAviB,EAAkjB,SAAljB,EAA6jB,SAA7jB,EAAwkB,SAAxkB,EAAmlB,SAAnlB,EAA8lB,SAA9lB,EAAymB,SAAzmB,EAAonB,SAApnB,EAA+nB,SAA/nB,EAA0oB,SAA1oB,CAAP;AACH;;;;;;mBAxagBwO,Q;;;AAmfrBrF,GAAEG,EAAF,CAAKkI,QAAL,GAAgB,UAAU/R,IAAV,EAAgBC,OAAhB,EAAyB;AACrC,YAAO,IAAI8O,QAAJ,CAAa,KAAKhF,GAAL,CAAS,CAAT,CAAb,EAA0B/J,IAA1B,EAAgCC,OAAhC,CAAP;AACH,EAFD,C;;;;;;;;;;;;;;ACzfA;;;;;;;;;;;;KAEqB+R,Y;;;;;;;;;;;gCACK;AAAA,iBAAX1K,IAAW,uEAAJ,EAAI;;AAClB,oBAAO,IAAI0K,YAAJ,CAAiB1K,IAAjB,CAAP;AACH;;;oCAEiBA,I,EAAM;AACpB,oBAAO,eAAKxC,UAAL,CAAgBwC,IAAhB,EAAsB0K,aAAa/F,GAAnC,CAAP;AACH;;;;;;mBAPgB+F,Y","file":"unipept-visualizations.js","sourcesContent":[" \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 b0b049baf223248a841f","import TreeView from \"./treeview/treeview\";\nimport TreeMap from \"./treemap/treemap\";\nimport Sunburst from \"./sunburst/sunburst\";\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","/**\n * Zoomable treeview, inspiration from\n * - http://bl.ocks.org/mbostock/4339083\n * - https://gist.github.com/robschmuecker/7880033\n * - http://www.brightpointinc.com/interactive/budget/index.html?source=d3js\n */\nimport Univis from \"../shared/univis\";\nimport MaxCountHeap from \"../shared/maxcountheap\";\nimport TreeviewNode from \"./treeviewNode\";\n\n\nexport default function TreeView(element, data, options = {}) {\n let that = {};\n\n const MARGIN = {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5,\n },\n DURATION = 750,\n COLOR_SCALE = d3.scale.category10(),\n DEFAULTS = {\n height: 300,\n width: 600,\n nodeDistance: 180,\n levelsToExpand: 2,\n minNodeSize: 2,\n maxNodeSize: 105,\n\n countAccessor: d => d.data.count,\n rerootCallback: undefined,\n\n colors: d => COLOR_SCALE(d.name),\n nodeFillColor: nodeFillColor,\n nodeStrokeColor: nodeStrokeColor,\n linkStrokeColor: linkStrokeColor,\n\n enableInnerArcs: true,\n enableExpandOnClick: true,\n enableRightClick: true,\n\n enableLabels: true,\n getLabel: d => d.name,\n\n enableTooltips: true,\n getTooltip: getTooltip,\n getTooltipTitle: Univis.getTooltipTitle,\n getTooltipText: Univis.getTooltipText,\n enableAutoExpand: false,\n };\n\n let settings;\n\n let visibleRoot,\n tooltipTimer;\n\n let nodeId = 0,\n root;\n\n let tree,\n tooltip,\n diagonal,\n widthScale,\n innerArc,\n zoomListener,\n svg;\n\n function init() {\n settings = Object.assign({}, DEFAULTS, options);\n TreeviewNode.settings = settings;\n\n settings.width = settings.width - MARGIN.right - MARGIN.left;\n settings.height = settings.height - MARGIN.top - MARGIN.bottom;\n\n if (settings.enableTooltips) {\n initTooltip();\n }\n\n if (settings.enableInnerArcs) {\n initInnerArcs();\n }\n\n tree = d3.layout.tree()\n .nodeSize([2, 10])\n .separation((a, b) => {\n let width = (nodeSize(a) + nodeSize(b)),\n distance = width / 2 + 4;\n return (a.parent === b.parent) ? distance : distance + 4;\n });\n\n diagonal = d3.svg.diagonal().projection(d => [d.y, d.x]);\n\n widthScale = d3.scale.linear().range([settings.minNodeSize, settings.maxNodeSize]);\n\n // define the zoomListener which calls the zoom function on the \"zoom\" event constrained within the scaleExtents\n zoomListener = d3.behavior.zoom()\n .scaleExtent([0.1, 3])\n .on(\"zoom\", () => {\n svg.attr(\"transform\", `translate(${d3.event.translate})scale(${d3.event.scale})`);\n });\n\n svg = d3.select(element).append(\"svg\")\n .attr(\"version\", \"1.1\")\n .attr(\"xmlns\", \"http://www.w3.org/2000/svg\")\n .attr(\"viewBox\", `0 0 ${settings.width + MARGIN.right + MARGIN.left} ${settings.height + MARGIN.top + MARGIN.bottom}`)\n .attr(\"width\", settings.width + MARGIN.right + MARGIN.left)\n .attr(\"height\", settings.height + MARGIN.top + MARGIN.bottom)\n .call(zoomListener)\n .append(\"g\")\n .attr(\"transform\", `translate(${MARGIN.left},${MARGIN.top})`)\n .append(\"g\");\n\n draw(TreeviewNode.createNode(data));\n }\n\n function initTooltip() {\n tooltip = d3.select(\"body\")\n .append(\"div\")\n .attr(\"id\", element.id + \"-tooltip\")\n .attr(\"class\", \"tip\")\n .style(\"position\", \"absolute\")\n .style(\"z-index\", \"10\")\n .style(\"visibility\", \"hidden\")\n .style(\"background-color\", \"white\")\n .style(\"padding\", \"2px\")\n .style(\"border\", \"1px solid #dddddd\")\n .style(\"border-radius\", \"3px;\");\n }\n\n function initInnerArcs() {\n let arcScale = d3.scale.linear().range([0, 2 * Math.PI]);\n\n innerArc = d3.svg.arc()\n .outerRadius(nodeSize)\n .startAngle(0)\n .endAngle(d => arcScale(d.data.self_count / d.data.count) || 0);\n }\n\n function draw(data) {\n widthScale.domain([0, data.data.count]);\n\n root = data;\n root.x0 = settings.height / 2;\n root.y0 = 0;\n\n // set everything visible\n root.setSelected(true);\n\n root.children.forEach((d, i) => {\n d.color = d3.functor(settings.colors).call(this, d, i);\n d.setRecursiveProperty(\"color\", d.color);\n });\n\n if (settings.enableExpandOnClick) {\n root.collapseAll();\n initialExpand(root);\n } else {\n root.expandAll();\n }\n\n update(root);\n centerNode(root);\n }\n\n function initialExpand(root) {\n if(!settings.enableAutoExpand) {\n root.expand();\n return;\n }\n\n root.expand(1);\n let allowedCount = root.data.count * (isFinite(settings.enableAutoExpand) ? settings.enableAutoExpand : 0.8);\n const pq = new MaxCountHeap(root.children || []);\n while (allowedCount > 0 && pq.size > 0) {\n const toExpand = pq.remove();\n allowedCount -= toExpand.data.count;\n toExpand.expand(1);\n (toExpand.children || []).forEach(c => pq.add(c));\n }\n }\n\n function update(source) {\n // Compute the new tree layout.\n let nodes = tree.nodes(root).reverse(),\n links = tree.links(nodes);\n\n // Normalize for fixed-depth.\n nodes.forEach(d => {\n d.y = d.depth * settings.nodeDistance;\n });\n\n // Update the nodes…\n let node = svg.selectAll(\"g.node\")\n .data(nodes, d => d.id || (d.id = ++nodeId));\n\n // Enter any new nodes at the parent's previous position.\n let nodeEnter = node.enter().append(\"g\")\n .attr(\"class\", \"node\")\n .style(\"cursor\", \"pointer\")\n .attr(\"transform\", d => `translate(${source.y || 0},${source.x0 || 0})`)\n .on(\"click\", click)\n .on(\"mouseover\", tooltipIn)\n .on(\"mouseout\", tooltipOut)\n .on(\"contextmenu\", rightClick);\n\n nodeEnter.append(\"circle\")\n .attr(\"r\", 1e-6)\n .style(\"stroke-width\", \"1.5px\")\n .style(\"stroke\", settings.nodeStrokeColor)\n .style(\"fill\", settings.nodeFillColor);\n\n if (settings.enableInnerArcs) {\n nodeEnter.append(\"path\")\n .attr(\"d\", innerArc)\n .style(\"fill\", settings.nodeStrokeColor)\n .style(\"fill-opacity\", 0);\n }\n\n if (settings.enableLabels) {\n nodeEnter.append(\"text\")\n .attr(\"x\", d => d.isLeaf() ? 10 : -10)\n .attr(\"dy\", \".35em\")\n .attr(\"text-anchor\", d => d.isLeaf() ? \"start\" : \"end\")\n .text(settings.getLabel)\n .style(\"font\", \"10px sans-serif\")\n .style(\"fill-opacity\", 1e-6);\n }\n\n // Transition nodes to their new position.\n let nodeUpdate = node.transition()\n .duration(DURATION)\n .attr(\"transform\", d => `translate(${d.y},${d.x})`);\n\n nodeUpdate.select(\"circle\")\n .attr(\"r\", nodeSize)\n .style(\"fill-opacity\", d => d._children ? 1 : 0)\n .style(\"stroke\", settings.nodeStrokeColor)\n .style(\"fill\", settings.nodeFillColor);\n\n if (settings.enableLabels) {\n nodeUpdate.select(\"text\")\n .style(\"fill-opacity\", 1);\n }\n\n if (settings.enableInnerArcs) {\n nodeUpdate.select(\"path\")\n .duration(DURATION)\n .attr(\"d\", innerArc)\n .style(\"fill-opacity\", 0.8);\n }\n\n // Transition exiting nodes to the parent's new position.\n let nodeExit = node.exit().transition()\n .duration(DURATION)\n .attr(\"transform\", d => `translate(${source.y},${source.x})`)\n .remove();\n\n nodeExit.select(\"circle\")\n .attr(\"r\", 1e-6);\n\n nodeExit.select(\"path\")\n .style(\"fill-opacity\", 1e-6);\n\n nodeExit.select(\"text\")\n .style(\"fill-opacity\", 1e-6);\n\n // Update the links…\n let link = svg.selectAll(\"path.link\")\n .data(links, d => d.target.id);\n\n // Enter any new links at the parent's previous position.\n link.enter().insert(\"path\", \"g\")\n .attr(\"class\", \"link\")\n .style(\"fill\", \"none\")\n .style(\"stroke-opacity\", \"0.5\")\n .style(\"stroke-linecap\", \"round\")\n .style(\"stroke\", settings.linkStrokeColor)\n .style(\"stroke-width\", 1e-6)\n .attr(\"d\", d => {\n let o = {\n x: (source.x0 || 0),\n y: (source.y0 || 0),\n };\n return diagonal({\n source: o,\n target: o,\n });\n });\n\n // Transition links to their new position.\n link.transition()\n .duration(DURATION)\n .attr(\"d\", diagonal)\n .style(\"stroke\", settings.linkStrokeColor)\n .style(\"stroke-width\", d => {\n if (d.source.selected) {\n return widthScale(d.target.data.count) + \"px\";\n } else {\n return \"4px\";\n }\n });\n\n // Transition exiting nodes to the parent's new position.\n link.exit().transition()\n .duration(DURATION)\n .style(\"stroke-width\", 1e-6)\n .attr(\"d\", d => {\n let o = {\n x: source.x,\n y: source.y,\n };\n return diagonal({\n source: o,\n target: o,\n });\n })\n .remove();\n\n // Stash the old positions for transition.\n nodes.forEach(d => {\n [d.x0, d.y0] = [d.x, d.y];\n });\n }\n\n function nodeSize(d) {\n if (d.selected) {\n return widthScale(d.data.count) / 2;\n } else {\n return 2;\n }\n }\n\n // Toggle children on click.\n function click(d) {\n if (!settings.enableExpandOnClick) {\n return;\n }\n\n // check if click is triggered by panning on a node\n if (d3.event.defaultPrevented) {\n return;\n }\n\n if (d3.event.shiftKey) {\n d.expandAll();\n } else if (d.children) {\n d.collapse();\n } else {\n d.expand();\n }\n update(d);\n centerNode(d);\n }\n\n function rightClick(d) {\n if (settings.enableRightClick) {\n reroot(d);\n }\n }\n\n // Sets the width of the right clicked node to 100%\n function reroot(d) {\n if (d === visibleRoot && d !== root) {\n reroot(root);\n return;\n }\n visibleRoot = d;\n\n // set Selection properties\n root.setSelected(false);\n d.setSelected(true);\n\n // scale the lines\n widthScale.domain([0, d.data.count]);\n\n d.expand();\n\n // redraw\n if (d3.event !== null) {\n d3.event.preventDefault();\n }\n update(d);\n centerNode(d);\n\n if (settings.rerootCallback) {\n settings.rerootCallback.call(null, d);\n }\n }\n\n // Center a node\n function centerNode(source) {\n let scale = zoomListener.scale(),\n [x, y] = [-source.y0, -source.x0];\n x = x * scale + settings.width / 4;\n y = y * scale + settings.height / 2;\n svg.transition()\n .duration(DURATION)\n .attr(\"transform\", `translate(${x},${y})scale(${scale})`);\n zoomListener.scale(scale);\n zoomListener.translate([x, y]);\n }\n\n // tooltip functions\n function tooltipIn(d, i) {\n if (!settings.enableTooltips) {\n return;\n }\n tooltip.html(settings.getTooltip(d))\n .style(\"top\", (d3.event.pageY - 5) + \"px\")\n .style(\"left\", (d3.event.pageX + 15) + \"px\");\n\n tooltipTimer = setTimeout(() => {\n tooltip.style(\"visibility\", \"visible\");\n }, 1000);\n }\n\n function tooltipOut(d, i) {\n if (!settings.enableTooltips) {\n return;\n }\n clearTimeout(tooltipTimer);\n tooltip.style(\"visibility\", \"hidden\");\n }\n\n /** ************ Default methods ***************/\n // set fill color\n function nodeFillColor(d) {\n if (d.selected) {\n return d._children ? d.color || \"#aaa\" : \"#fff\";\n } else {\n return \"#aaa\";\n }\n }\n\n // set node stroke color\n function nodeStrokeColor(d) {\n if (d.selected) {\n return d.color || \"#aaa\";\n } else {\n return \"#aaa\";\n }\n }\n\n // set link stroke color\n function linkStrokeColor(d) {\n if (d.source.selected) {\n return d.target.color;\n } else {\n return \"#aaa\";\n }\n }\n\n function getTooltip(d) {\n return `
${settings.getTooltipText(d)}
`;\n }\n\n /** ************* Public methods ***************/\n that.reset = function reset() {\n zoomListener.scale(1);\n reroot(root);\n };\n\n /**\n * Sets the visualisation in full screen mode\n *\n * @param