diff --git a/config/router.json b/config/router.json deleted file mode 100644 index e946a9d..0000000 --- a/config/router.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "path": "", - "config": "collection-vis-config.json" - }, - { - "path": "clinical", - "config": "clinical-vis-config.json" - }, - { - "path": "collection", - "config": "collection-vis-config.json" - }, - { - "path": "demo", - "config": "demo.json" - } -] diff --git a/config/data.json b/config/wines.json similarity index 58% rename from config/data.json rename to config/wines.json index 4384a1b..6549b07 100644 --- a/config/data.json +++ b/config/wines.json @@ -1,11 +1,11 @@ { - "HOME_URL": "https://pathdb.cancerimagingarchive.net/", + "HOME_URL": "https://github.com/sharmalab/eaglescope/", "HEIGHT_OF_VIS_HEADER": 20, - "TITLE": "PRISM Collection Explorer", + "TITLE": "Eaglescope Demo | Wines", "MARGIN_OF_VIS": [10, 10], "UNIT_OF_GRID_VIEW": [230, 210], "MARGIN_OF_GRID_VIEW": [10, 10], - "DATA_RESOURCE_URL": "../config/wines.csv", + "DATA_RESOURCE_URL": "./config/wines.csv", "DATA_FORMAT": "csv", "VISUALIZATION_VIEW_CONFIGURATION": [ { @@ -71,14 +71,60 @@ "priority": 50 }, { - "id": "scatter", - "title": "scatter", - "description": "scatter", + "id": "Sugar and pH", + "title": "Sugar and pH", + "description": "Sugar and pH scatter", "chartType": "SCATTER_CHART", - "fields": { "x": "volatile acidity", "y": "citric acid" }, + "fields": { "x": "residual sugar", "y": "pH" }, "binsCount": 50, "size": [2, 2], "priority": 50 + }, + { + "id": "collection_data_table", + "title": "Collection Data Table", + "description": "Showing Collection Data", + "chartType": "VIS_DATA_TABLE", + "fields": [ + { + "dataKey": "wine_type", + "label": "Wine Type" + }, + { + "dataKey": "quality", + "label": "Quality" + }, + { + "dataKey": "alcohol", + "label": "Alcohol" + }, + { + "dataKey": "sulphates", + "label": "Sulphates" + }, + { + "dataKey": "pH", + "label": "Wine pH" + }, + { + "dataKey": "total sulfur dioxide", + "label": "Total Sulfur Dioxide" + }, + { + "dataKey": "free sulfur dioxide", + "label": "Free Sulfur Dioxide" + }, + { + "dataKey": "volatile acidity", + "label": "Volatile Acidity" + }, + { + "dataKey": "citric acid", + "label": "Citric Acid" + } + ], + "size": [4, 2], + "priority": 10 } ] } diff --git a/docs/BarChart.5f4d3c70.js b/docs/BarChart.5f4d3c70.js index 8151c15..94d8e83 100644 --- a/docs/BarChart.5f4d3c70.js +++ b/docs/BarChart.5f4d3c70.js @@ -358,7 +358,7 @@ var parent = module.bundle.parent; if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') { var hostname = "" || location.hostname; var protocol = location.protocol === 'https:' ? 'wss' : 'ws'; - var ws = new WebSocket(protocol + '://' + hostname + ':' + "50428" + '/'); + var ws = new WebSocket(protocol + '://' + hostname + ':' + "64865" + '/'); ws.onmessage = function (event) { checkedAssets = {}; assetsToAccept = []; diff --git a/docs/BarChart.5f4d3c70.js.map b/docs/BarChart.5f4d3c70.js.map index 665373d..9bcb29e 100644 --- a/docs/BarChart.5f4d3c70.js.map +++ b/docs/BarChart.5f4d3c70.js.map @@ -1 +1 @@ -{"version":3,"sources":["components/VisualTools/Chart/BarChart.js"],"names":["_react","_interopRequireWildcard","require","d3","_propTypes","_interopRequireDefault","_tooltip","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","transformList","data","f","map","Map","forEach","d","items","Array","isArray","from","key","value","transform","field","isList","arguments","length","undefined","nest","sortKeys","ascending","rollup","v","entries","wrap","text","width","each","updateBars","currentText","select","words","split","reverse","word","line","lineNumber","lineHeight","y","attr","dy","parseFloat","tspan","append","concat","pop","push","join","node","getComputedTextLength","BarChart","props","margin","top","right","bottom","left","fields","x","fullData","self","useRef","scaleRef","hightRef","viewerRef","createXScale","xScale","scaleBand","domain","flat","range","padding","createYScale","height","yScale","scaleLinear","max","drawBar","selection","className","addLabel","offset","tooltipHandlers","createTooltip","current","selectAll","enterBars","enter","bandwidth","on","mousemove","mouseleave","currentData","_props$fields","selected","filter","id","title","operation","values","filterAdded","merge","transition","duration","exit","remove","useEffect","setTimeout","rect","getBoundingClientRect","innerWidth","innerHeight","svg","xAxis","axisBottom","yAxis","axisLeft","tickSize","layout","filters","filterData","createElement","ref","style","_default","exports","propTypes","PropTypes","arrayOf","shape","isRequired","string","bool","func","number","currentCols"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,EAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAmD,SAAAG,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAZ,CAAA,oBAAAY,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAf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C/BjC,KAAK,EAAE8B,kBAAS,CAACI,MAAM,CAACD,UAAU;EAClCV,UAAU,EAAEO,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,UAAU;EAC7DX,OAAO,EAAEQ,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,UAAU;EAC1D9B,WAAW,EAAE2B,kBAAS,CAACM,IAAI,CAACH,UAAU;EACtCZ,MAAM,EAAES,kBAAS,CAACE,KAAK,CAAC;IACtBvG,KAAK,EAAEqG,kBAAS,CAACO,MAAM,CAACJ,UAAU;IAClCK,WAAW,EAAER,kBAAS,CAACO,MAAM,CAACJ;EAChC,CAAC,CAAC,CAACA;AACL,CAAC","file":"BarChart.5f4d3c70.js","sourceRoot":"../source","sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport * as d3 from 'd3';\nimport PropTypes from 'prop-types';\nimport createTooltip from '../../partials/tooltip';\n\nconst transformList = (data, f) => {\n const map = new Map();\n data.forEach((d) => {\n const items = d[f];\n if (Array.isArray(items)) {\n items.forEach((i) => {\n if (!map.has(i)) { map.set(i, 0); }\n map.set(i, map.get(i) + 1);\n });\n } else {\n if (!map.has(items)) { map.set(items, 0); }\n map.set(items, map.get(items) + 1);\n }\n });\n return Array.from(map).map((d) => ({ key: d[0], value: d[1] }));\n};\n\nconst transform = (data, field, isList = false) => {\n if (isList) {\n return transformList(data, field);\n }\n return d3.nest().key((d) => d[field])\n .sortKeys(d3.ascending)\n .rollup((v) => v.length)\n .entries(data);\n};\n\nconst wrap = (text, width) => {\n text.each(function updateBars() {\n const currentText = d3.select(this);\n const words = currentText.text().split(/\\s+/).reverse();\n let word;\n let line = [];\n let lineNumber = 0;\n const lineHeight = 1.1; // ems\n const y = currentText.attr('y');\n const dy = parseFloat(currentText.attr('dy'));\n let tspan = currentText\n .text(null)\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', `${dy}em`);\n word = words.pop();\n while (word) {\n line.push(word);\n tspan.text(line.join(' '));\n if (tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = currentText\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', `${++lineNumber * lineHeight + dy}em`)\n .text(word);\n }\n word = words.pop();\n }\n });\n};\n\nfunction BarChart(props) {\n const margin = {\n top: 10,\n right: 10,\n bottom: 35,\n left: 35,\n };\n\n const fields = { x: 'key', y: 'value' };\n const fullData = transform(props.data, props.fields.x, props.fields.isList);\n const self = useRef();\n const scaleRef = useRef();\n const hightRef = useRef();\n const viewerRef = useRef();\n\n const createXScale = (f, width) => {\n // set the ranges\n const xScale = d3\n .scaleBand()\n .domain(fullData.map((d) => d[f]).flat())\n .range([0, width])\n .padding(0.1);\n return xScale;\n };\n\n const createYScale = (f, height) => {\n const yScale = d3\n .scaleLinear()\n .domain([0, d3.max(fullData, (d) => d[f])])\n .range([height, 0]);\n return yScale;\n };\n\n const drawBar = (selection, data, className = 'og') => {\n const addLabel = (d) => `${d.key}: ${d.value}`;\n const offset = {\n x: 60,\n y: 0,\n };\n const tooltipHandlers = createTooltip(self.current, addLabel, offset);\n const updateBars = selection.selectAll(`rect.${className}`).data(data, (d) => d[fields.x]);\n\n const enterBars = updateBars.enter().append('rect');\n enterBars\n .attr('class', `${className}`)\n .attr('x', (d) => scaleRef.current.x(d[fields.x]))\n .attr('width', scaleRef.current.x.bandwidth())\n .attr('y', hightRef.current);\n enterBars\n .on('mousemove', tooltipHandlers.mousemove)\n .on('mouseleave', tooltipHandlers.mouseleave)\n .on('click', (currentData) => {\n const selected = enterBars.filter((d) => d === currentData);\n const value = selected.data()[0].key;\n const filter = props?.fields?.isList ? {\n id: props.id,\n title: props.title,\n field: props.fields.x,\n operation: 'has',\n values: value,\n } : {\n id: props.id,\n title: props.title,\n field: props.fields.x,\n operation: 'eq',\n values: value,\n };\n props.filterAdded([filter]);\n });\n\n updateBars\n .merge(enterBars)\n .transition()\n .duration(1000)\n .attr('y', (d) => scaleRef.current.y(d[fields.y]))\n .attr('height', (d) => hightRef.current - scaleRef.current.y(d[fields.y]));\n\n // update_bars\n updateBars\n .exit()\n .transition()\n .duration(1000)\n .attr('y', hightRef.current)\n .attr('height', 0)\n .remove();\n\n return updateBars;\n };\n\n useEffect(() => {\n setTimeout(() => {\n d3.select(self.current).selectAll('svg').remove('svg');\n const rect = self.current.getBoundingClientRect();\n const innerWidth = rect.width - margin.left - margin.right;\n const innerHeight = rect.height - margin.top - margin.bottom;\n hightRef.current = innerHeight;\n\n // create svg\n const svg = d3\n .select(self.current)\n .append('svg')\n .attr('width', rect.width)\n .attr('height', rect.height);\n // create viewer\n viewerRef.current = svg\n .append('g')\n .attr('transform', `translate(${margin.left},${margin.top})`);\n const xScale = createXScale(fields.x, innerWidth);\n const yScale = createYScale(fields.y, innerHeight);\n scaleRef.current = { x: xScale, y: yScale };\n\n const xAxis = d3.axisBottom(xScale);\n viewerRef.current\n .append('g')\n .attr('class', 'x axis')\n .attr('transform', `translate(0,${innerHeight})`)\n .call(xAxis)\n .selectAll('.tick text')\n .call(wrap, xScale.bandwidth());\n\n // add the y Axis\n const yAxis = d3.axisLeft(yScale).tickSize(-innerWidth);\n viewerRef.current.append('g').call(yAxis);\n\n drawBar(viewerRef.current, fullData, 'og');\n }, 100);\n }, [props.layout]);\n\n useEffect(() => {\n setTimeout(() => {\n let data = [];\n if (props.filters.length > 0) {\n data = transform(props.filterData, props.fields.x, props.fields.isList);\n } else {\n data = fullData;\n }\n drawBar(viewerRef.current, data, 'ft');\n }, 100);\n }, [props.filters, props.filterData, props.layout]);\n\n return
;\n}\n\nexport default BarChart;\n\nBarChart.propTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n fields: PropTypes.shape({ x: PropTypes.string.isRequired, isList: PropTypes.bool }).isRequired,\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n filterData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n filters: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n filterAdded: PropTypes.func.isRequired,\n layout: PropTypes.shape({\n width: PropTypes.number.isRequired,\n currentCols: PropTypes.number.isRequired,\n }).isRequired,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["components/VisualTools/Chart/BarChart.js","../node_modules/parcel-bundler/src/builtins/hmr-runtime.js"],"names":["_react","_interopRequireWildcard","require","d3","_propTypes","_interopRequireDefault","_tooltip","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","transformList","data","f","map","Map","forEach","d","items","Array","isArray","from","key","value","transform","field","isList","arguments","length","undefined","nest","sortKeys","ascending","rollup","v","entries","wrap","text","width","each","updateBars","currentText","select","words","split","reverse","word","line","lineNumber","lineHeight","y","attr","dy","parseFloat","tspan","append","concat","pop","push","join","node","getComputedTextLength","BarChart","props","margin","top","right","bottom","left","fields","x","fullData","self","useRef","scaleRef","hightRef","viewerRef","createXScale","xScale","scaleBand","domain","flat","range","padding","createYScale","height","yScale","scaleLinear","max","drawBar","selection","className","addLabel","offset","tooltipHandlers","createTooltip","current","selectAll","enterBars","enter","bandwidth","on","mousemove","mouseleave","currentData","_props$fields","selected","filter","id","title","operation","values","filterAdded","merge","transition","duration","exit","remove","useEffect","setTimeout","rect","getBoundingClientRect","innerWidth","innerHeight","svg","xAxis","axisBottom","yAxis","axisLeft","tickSize","layout","filters","filterData","createElement","ref","style","_default","exports","propTypes","PropTypes","arrayOf","shape","isRequired","string","bool","func","number","currentCols","OVERLAY_ID","OldModule","module","bundle","Module","moduleName","hot","hotData","_acceptCallbacks","_disposeCallbacks","accept","fn","dispose","checkedAssets","assetsToAccept","parent","isParcelRequire","WebSocket","hostname","location","protocol","ws","onmessage","event","JSON","parse","type","handled","assets","asset","isNew","didAccept","hmrAcceptCheck","global","parcelRequire","every","generated","js","console","clear","hmrApply","hmrAcceptRun","reload","close","onclose","log","removeErrorOverlay","error","message","stack","overlay","createErrorOverlay","document","body","appendChild","getElementById","stackTrace","innerText","innerHTML","getParents","modules","parents","k","dep","Function","deps","cached","cache","some","cb"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,EAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAmD,SAAAG,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAZ,CAAA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,CAAC;EACvB2C,MAAM,CAAC3C,EAAE,CAAC;EAEV0G,MAAM,GAAG/D,MAAM,CAACgE,KAAK,CAAC3G,EAAE,CAAC;EACzB,IAAI0G,MAAM,IAAIA,MAAM,CAAC5D,GAAG,IAAI4D,MAAM,CAAC5D,GAAG,CAACE,gBAAgB,CAAChI,MAAM,EAAE;IAC9D0L,MAAM,CAAC5D,GAAG,CAACE,gBAAgB,CAAC5I,OAAO,CAAC,UAAUyM,EAAE,EAAE;MAChDA,EAAE,CAAC,CAAC;IACN,CAAC,CAAC;IACF,OAAO,IAAI;EACb;AACF","file":"BarChart.5f4d3c70.js","sourceRoot":"../source","sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport * as d3 from 'd3';\nimport PropTypes from 'prop-types';\nimport createTooltip from '../../partials/tooltip';\n\nconst transformList = (data, f) => {\n const map = new Map();\n data.forEach((d) => {\n const items = d[f];\n if (Array.isArray(items)) {\n items.forEach((i) => {\n if (!map.has(i)) { map.set(i, 0); }\n map.set(i, map.get(i) + 1);\n });\n } else {\n if (!map.has(items)) { map.set(items, 0); }\n map.set(items, map.get(items) + 1);\n }\n });\n return Array.from(map).map((d) => ({ key: d[0], value: d[1] }));\n};\n\nconst transform = (data, field, isList = false) => {\n if (isList) {\n return transformList(data, field);\n }\n return d3.nest().key((d) => d[field])\n .sortKeys(d3.ascending)\n .rollup((v) => v.length)\n .entries(data);\n};\n\nconst wrap = (text, width) => {\n text.each(function updateBars() {\n const currentText = d3.select(this);\n const words = currentText.text().split(/\\s+/).reverse();\n let word;\n let line = [];\n let lineNumber = 0;\n const lineHeight = 1.1; // ems\n const y = currentText.attr('y');\n const dy = parseFloat(currentText.attr('dy'));\n let tspan = currentText\n .text(null)\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', `${dy}em`);\n word = words.pop();\n while (word) {\n line.push(word);\n tspan.text(line.join(' '));\n if (tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = currentText\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', `${++lineNumber * lineHeight + dy}em`)\n .text(word);\n }\n word = words.pop();\n }\n });\n};\n\nfunction BarChart(props) {\n const margin = {\n top: 10,\n right: 10,\n bottom: 35,\n left: 35,\n };\n\n const fields = { x: 'key', y: 'value' };\n const fullData = transform(props.data, props.fields.x, props.fields.isList);\n const self = useRef();\n const scaleRef = useRef();\n const hightRef = useRef();\n const viewerRef = useRef();\n\n const createXScale = (f, width) => {\n // set the ranges\n const xScale = d3\n .scaleBand()\n .domain(fullData.map((d) => d[f]).flat())\n .range([0, width])\n .padding(0.1);\n return xScale;\n };\n\n const createYScale = (f, height) => {\n const yScale = d3\n .scaleLinear()\n .domain([0, d3.max(fullData, (d) => d[f])])\n .range([height, 0]);\n return yScale;\n };\n\n const drawBar = (selection, data, className = 'og') => {\n const addLabel = (d) => `${d.key}: ${d.value}`;\n const offset = {\n x: 60,\n y: 0,\n };\n const tooltipHandlers = createTooltip(self.current, addLabel, offset);\n const updateBars = selection.selectAll(`rect.${className}`).data(data, (d) => d[fields.x]);\n\n const enterBars = updateBars.enter().append('rect');\n enterBars\n .attr('class', `${className}`)\n .attr('x', (d) => scaleRef.current.x(d[fields.x]))\n .attr('width', scaleRef.current.x.bandwidth())\n .attr('y', hightRef.current);\n enterBars\n .on('mousemove', tooltipHandlers.mousemove)\n .on('mouseleave', tooltipHandlers.mouseleave)\n .on('click', (currentData) => {\n const selected = enterBars.filter((d) => d === currentData);\n const value = selected.data()[0].key;\n const filter = props?.fields?.isList ? {\n id: props.id,\n title: props.title,\n field: props.fields.x,\n operation: 'has',\n values: value,\n } : {\n id: props.id,\n title: props.title,\n field: props.fields.x,\n operation: 'eq',\n values: value,\n };\n props.filterAdded([filter]);\n });\n\n updateBars\n .merge(enterBars)\n .transition()\n .duration(1000)\n .attr('y', (d) => scaleRef.current.y(d[fields.y]))\n .attr('height', (d) => hightRef.current - scaleRef.current.y(d[fields.y]));\n\n // update_bars\n updateBars\n .exit()\n .transition()\n .duration(1000)\n .attr('y', hightRef.current)\n .attr('height', 0)\n .remove();\n\n return updateBars;\n };\n\n useEffect(() => {\n setTimeout(() => {\n d3.select(self.current).selectAll('svg').remove('svg');\n const rect = self.current.getBoundingClientRect();\n const innerWidth = rect.width - margin.left - margin.right;\n const innerHeight = rect.height - margin.top - margin.bottom;\n hightRef.current = innerHeight;\n\n // create svg\n const svg = d3\n .select(self.current)\n .append('svg')\n .attr('width', rect.width)\n .attr('height', rect.height);\n // create viewer\n viewerRef.current = svg\n .append('g')\n .attr('transform', `translate(${margin.left},${margin.top})`);\n const xScale = createXScale(fields.x, innerWidth);\n const yScale = createYScale(fields.y, innerHeight);\n scaleRef.current = { x: xScale, y: yScale };\n\n const xAxis = d3.axisBottom(xScale);\n viewerRef.current\n .append('g')\n .attr('class', 'x axis')\n .attr('transform', `translate(0,${innerHeight})`)\n .call(xAxis)\n .selectAll('.tick text')\n .call(wrap, xScale.bandwidth());\n\n // add the y Axis\n const yAxis = d3.axisLeft(yScale).tickSize(-innerWidth);\n viewerRef.current.append('g').call(yAxis);\n\n drawBar(viewerRef.current, fullData, 'og');\n }, 100);\n }, [props.layout]);\n\n useEffect(() => {\n setTimeout(() => {\n let data = [];\n if (props.filters.length > 0) {\n data = transform(props.filterData, props.fields.x, props.fields.isList);\n } else {\n data = fullData;\n }\n drawBar(viewerRef.current, data, 'ft');\n }, 100);\n }, [props.filters, props.filterData, props.layout]);\n\n return ;\n}\n\nexport default BarChart;\n\nBarChart.propTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n fields: PropTypes.shape({ x: PropTypes.string.isRequired, isList: PropTypes.bool }).isRequired,\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n filterData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n filters: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n filterAdded: PropTypes.func.isRequired,\n layout: PropTypes.shape({\n width: PropTypes.number.isRequired,\n currentCols: PropTypes.number.isRequired,\n }).isRequired,\n};\n","var OVERLAY_ID = '__parcel__error__overlay__';\n\nvar OldModule = module.bundle.Module;\n\nfunction Module(moduleName) {\n OldModule.call(this, moduleName);\n this.hot = {\n data: module.bundle.hotData,\n _acceptCallbacks: [],\n _disposeCallbacks: [],\n accept: function (fn) {\n this._acceptCallbacks.push(fn || function () {});\n },\n dispose: function (fn) {\n this._disposeCallbacks.push(fn);\n }\n };\n\n module.bundle.hotData = null;\n}\n\nmodule.bundle.Module = Module;\nvar checkedAssets, assetsToAccept;\n\nvar parent = module.bundle.parent;\nif ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {\n var hostname = process.env.HMR_HOSTNAME || location.hostname;\n var protocol = location.protocol === 'https:' ? 'wss' : 'ws';\n var ws = new WebSocket(protocol + '://' + hostname + ':' + process.env.HMR_PORT + '/');\n ws.onmessage = function(event) {\n checkedAssets = {};\n assetsToAccept = [];\n\n var data = JSON.parse(event.data);\n\n if (data.type === 'update') {\n var handled = false;\n data.assets.forEach(function(asset) {\n if (!asset.isNew) {\n var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);\n if (didAccept) {\n handled = true;\n }\n }\n });\n\n // Enable HMR for CSS by default.\n handled = handled || data.assets.every(function(asset) {\n return asset.type === 'css' && asset.generated.js;\n });\n\n if (handled) {\n console.clear();\n\n data.assets.forEach(function (asset) {\n hmrApply(global.parcelRequire, asset);\n });\n\n assetsToAccept.forEach(function (v) {\n hmrAcceptRun(v[0], v[1]);\n });\n } else if (location.reload) { // `location` global exists in a web worker context but lacks `.reload()` function.\n location.reload();\n }\n }\n\n if (data.type === 'reload') {\n ws.close();\n ws.onclose = function () {\n location.reload();\n }\n }\n\n if (data.type === 'error-resolved') {\n console.log('[parcel] ✨ Error resolved');\n\n removeErrorOverlay();\n }\n\n if (data.type === 'error') {\n console.error('[parcel] 🚨 ' + data.error.message + '\\n' + data.error.stack);\n\n removeErrorOverlay();\n\n var overlay = createErrorOverlay(data);\n document.body.appendChild(overlay);\n }\n };\n}\n\nfunction removeErrorOverlay() {\n var overlay = document.getElementById(OVERLAY_ID);\n if (overlay) {\n overlay.remove();\n }\n}\n\nfunction createErrorOverlay(data) {\n var overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n\n // html encode message and stack trace\n var message = document.createElement('div');\n var stackTrace = document.createElement('pre');\n message.innerText = data.error.message;\n stackTrace.innerText = data.error.stack;\n\n overlay.innerHTML = (\n '' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
' + stackTrace.innerHTML + '' +\n '
=1)return+u(r[n-1],n-1,r);var n,f=(n-1)*t,l=Math.floor(f),o=+u(r[l],l,r);return o+(+u(r[l+1],l+1,r)-o)*(f-l)}}
+},{"./number":"XWLP"}],"nJJ4":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=l;var e=require("../array"),r=a(require("../ascending")),t=a(require("../number")),u=a(require("../quantile"));function a(e){return e&&e.__esModule?e:{default:e}}function l(a,l,n){return a=e.map.call(a,t.default).sort(r.default),Math.ceil((n-l)/(2*((0,u.default)(a,.75)-(0,u.default)(a,.25))*Math.pow(a.length,-1/3)))}
+},{"../array":"RkzJ","../ascending":"yJgn","../number":"XWLP","../quantile":"xM5B"}],"Rqev":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=t(require("../deviation"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t,r,u){return Math.ceil((u-r)/(3.5*(0,e.default)(t)*Math.pow(t.length,-1/3)))}
+},{"../deviation":"WEAa"}],"Ougw":[function(require,module,exports) {
+"use strict";function e(e,l){var r,u,f=e.length,n=-1;if(null==l){for(;++n l.length)return t;var r,o=c[u-1];return null!=e&&u>=l.length?r=t.entries():(r=[],t.each(function(t,e){r.push({key:e,values:n(t,u)})})),null!=o?r.sort(function(n,t){return o(n.key,t.key)}):r}(s(n,0,o,f),0)},key:function(n){return l.push(n),i},sortKeys:function(n){return c[l.length-1]=n,i},sortValues:function(n){return t=n,i},rollup:function(n){return e=n,i}}}function u(){return{}}function r(n,t,e){n[t]=e}function o(){return(0,n.default)()}function f(n,t,e){n.set(t,e)}
+},{"./map":"lDuF"}],"vFPv":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./map"));function t(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,n=new WeakMap;return(t=function(e){return e?n:r})(e)}function r(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=t(r);if(n&&n.has(e))return n.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var f=a?Object.getOwnPropertyDescriptor(e,u):null;f&&(f.get||f.set)?Object.defineProperty(o,u,f):o[u]=e[u]}return o.default=e,n&&n.set(e,o),o}function n(){}var o=e.default.prototype;function a(e,t){var r=new n;if(e instanceof n)e.each(function(e){r.add(e)});else if(e){var o=-1,a=e.length;if(null==t)for(;++ou!=p>u&&n<(d-l)*(u-s)/(p-s)+l&&(f=-f)}return f}function e(r,t,e){var f;return n(r,t,e)&&u(r[f=+(r[0]===t[0])],e[f],t[f])}function n(r,t,e){return(t[0]-r[0])*(e[1]-r[1])==(e[0]-r[0])*(t[1]-r[1])}function u(r,t,e){return r<=t&&t<=e||e<=t&&t<=r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;
+},{}],"zOhu":[function(require,module,exports) {
+"use strict";function e(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
+},{}],"DT0k":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=c;var r=require("d3-array"),e=require("./array"),t=u(require("./ascending")),n=u(require("./area")),a=u(require("./constant")),o=u(require("./contains")),i=u(require("./noop"));function u(r){return r&&r.__esModule?r:{default:r}}var f=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function c(){var u=1,c=1,s=r.thresholdSturges,l=v;function d(e){var n=s(e);if(Array.isArray(n))n=n.slice().sort(t.default);else{var a=(0,r.extent)(e),o=a[0],i=a[1];n=(0,r.tickStep)(o,i,n),n=(0,r.range)(Math.floor(o/n)*n,Math.floor(i/n)*n,n)}return n.map(function(r){return h(e,r)})}function h(r,e){var t=[],a=[];return function(r,e,t){var n,a,o,i,s,l,d=new Array,h=new Array;n=a=-1,i=r[0]>=e,f[i<<1].forEach(v);for(;++n=0&&o._call.call(null,n),o=o._next;--e}function h(){c=(l=u.now())+s,e=o=0;try{w()}finally{e=0,y(),c=0}}function x(){var t=u.now(),n=t-l;n>r&&(s-=n,l=t)}function y(){for(var e,o,i=t,r=1/0;i;)i._call?(r>i._time&&(r=i._time),e=i,i=i._next):(o=i._next,i._next=null,i=e?e._next=o:t=o);n=e,v(r)}function v(t){e||(o&&(o=clearTimeout(o)),t-c>24?(t<1/0&&(o=setTimeout(h,t-u.now()-s)),i&&(i=clearInterval(i))):(i||(l=u.now(),i=setInterval(x,r)),e=1,a(h)))}m.prototype=p.prototype={constructor:m,restart:function(e,o,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?f():+i)+(null==o?0:+o),this._next||n===this||(n?n._next=this:t=this,n=this),this._call=e,this._time=i,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}};
+},{}],"jIZm":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=require("./timer.js");function r(r,t,u){var n=new e.Timer;return t=null==t?0:+t,n.restart(function(e){n.stop(),r(e+t)},t,u),n}
+},{"./timer.js":"ea66"}],"QZ3s":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=require("./timer.js");function r(r,t,n){var u=new e.Timer,s=t;return null==t?(u.restart(r,t,n),u):(t=+t,n=null==n?(0,e.now)():+n,u.restart(function e(a){a+=s,u.restart(e,s+=t,n),r(a)},t,n),u)}
+},{"./timer.js":"ea66"}],"rdzS":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"interval",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"now",{enumerable:!0,get:function(){return e.now}}),Object.defineProperty(exports,"timeout",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"timer",{enumerable:!0,get:function(){return e.timer}}),Object.defineProperty(exports,"timerFlush",{enumerable:!0,get:function(){return e.timerFlush}});var e=require("./timer.js"),t=n(require("./timeout.js")),r=n(require("./interval.js"));function n(e){return e&&e.__esModule?e:{default:e}}
+},{"./timer.js":"ea66","./timeout.js":"jIZm","./interval.js":"QZ3s"}],"nqGJ":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.STARTING=exports.STARTED=exports.SCHEDULED=exports.RUNNING=exports.ENDING=exports.ENDED=exports.CREATED=void 0,exports.default=p,exports.get=f,exports.init=_,exports.set=c;var t=require("d3-dispatch"),e=require("d3-timer"),r=(0,t.dispatch)("start","end","cancel","interrupt"),n=[],a=exports.CREATED=0,o=exports.SCHEDULED=1,i=exports.STARTING=2,s=exports.STARTED=3,l=exports.RUNNING=4,u=exports.ENDING=5,d=exports.ENDED=6;function p(t,e,o,i,s,l){var u=t.__transition;if(u){if(o in u)return}else t.__transition={};x(t,o,{name:e,index:i,group:s,on:r,tween:n,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:a})}function _(t,e){var r=f(t,e);if(r.state>a)throw new Error("too late; already scheduled");return r}function c(t,e){var r=f(t,e);if(r.state>s)throw new Error("too late; already running");return r}function f(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function x(t,r,n){var a,p=t.__transition;function _(u){var x,m,E,D;if(n.state!==o)return f();for(x in p)if((D=p[x]).name===n.name){if(D.state===s)return(0,e.timeout)(_);D.state===l?(D.state=d,D.timer.stop(),D.on.call("interrupt",t,t.__data__,D.index,D.group),delete p[x]):+x=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(t)/Math.LN2),z()},v.thresholds=function(t){return arguments.length?(p="function"==typeof t?t:Array.isArray(t)?(0,n.default)(r.slice.call(t)):(0,n.default)(t),v):p},v.bandwidth=function(t){if(!arguments.length)return Math.sqrt(w*(w+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return w=Math.round((Math.sqrt(4*t*t+1)-1)/2),z()},v}
+},{"d3-array":"K0bd","./array":"TvZ5","./blur":"DGMp","./constant":"aCvo","./contours":"DT0k"}],"SiBy":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"contourDensity",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"contours",{enumerable:!0,get:function(){return e.default}});var e=r(require("./contours")),t=r(require("./density"));function r(e){return e&&e.__esModule?e:{default:e}}
+},{"./contours":"DT0k","./density":"NV0r"}],"uRW4":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;var n={},r={},t=34,e=10,o=13;function u(n){return new Function("d","return {"+n.map(function(n,r){return JSON.stringify(n)+": d["+r+'] || ""'}).join(",")+"}")}function i(n,r){var t=u(n);return function(e,o){return r(t(e),o,n)}}function a(n){var r=Object.create(null),t=[];return n.forEach(function(n){for(var e in n)e in r||t.push(r[e]=e)}),t}function c(n,r){var t=n+"",e=t.length;return el&&(l=n)}function v(e,n){var t=(0,r.cartesian)([e*a.radians,n*a.radians]);if(p){var i=(0,r.cartesianCross)(p,t),c=[i[1],-i[0],0],d=(0,r.cartesianCross)(c,i);(0,r.cartesianNormalizeInPlace)(d),d=(0,r.spherical)(d);var m,N=e-f,h=N>0?1:-1,v=d[0]*a.degrees*h,j=(0,a.abs)(N)>180;j^(h*fl&&(l=n),p=t,f=e}function j(){N.point=v}function E(){g[0]=o,g[1]=u,N.point=h,p=null}function q(e,r){if(p){var t=e-f;m.add((0,a.abs)(t)>180?t+(t>0?360:-360):t)}else c=e,d=r;n.areaStream.point(e,r),v(e,r)}function y(){n.areaStream.lineStart()}function b(){q(c,d),n.areaStream.lineEnd(),(0,a.abs)(m)>a.epsilon&&(o=-(u=180)),g[0]=o,g[1]=u,p=null}function _(e,n){return(n-=e)<0?n+360:n}function x(e,n){return e[0]-n[0]}function C(e,n){return e[0]<=e[1]?e[0]<=n&&n<=e[1]:n1&&t.push(t.pop().concat(t.shift()))},result:function(){var e=t;return t=[],n=null,e}}}
+},{"../noop.js":"zOhu"}],"yH90":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=require("./math.js");function r(r,s){return(0,e.abs)(r[0]-s[0])=0;--r)s.push(t[r]);return this}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
+},{}],"bidz":[function(require,module,exports) {
+"use strict";function e(e){for(var r,t,o,p=this,s=[p],u=[];p=s.pop();)if(u.push(p),r=p.children)for(t=0,o=r.length;tp&&(p=s),q=c*c*M,(v=Math.max(p/q,q/h))>x){c-=s;break}x=v}_.push(n={value:c,dice:d1);return e+r*n*Math.sqrt(-2*Math.log(l)/l)}}return r.source=e,r}(e.default);
+},{"./defaultSource":"m3Qw"}],"egwl":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./defaultSource")),r=t(require("./normal"));function t(e){return e&&e.__esModule?e:{default:e}}var u=exports.default=function e(t){function u(){var e=r.default.source(t).apply(this,arguments);return function(){return Math.exp(e())}}return u.source=e,u}(e.default);
+},{"./defaultSource":"m3Qw","./normal":"rHsL"}],"xpLv":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./defaultSource"));function r(e){return e&&e.__esModule?e:{default:e}}var t=exports.default=function e(r){function t(e){return function(){for(var t=0,u=0;u0){for(;ha)break;g.push(l)}}else for(;h=1;--c)if(!((l=f*c)a)break;g.push(l)}}else g=(0,n.ticks)(h,s,Math.min(s-h,M)).map(o);return r?g.reverse():g},l.tickFormat=function(n,r){if(null==r&&(r=10===d?".0e":","),"function"!=typeof r&&(r=(0,t.format)(r)),n===1/0)return r;null==n&&(n=10);var e=Math.max(1,d*n/l.ticks().length);return function(n){var t=n/o(Math.round(u(n)));return t*d