@carbon/charts 0.52.1 → 0.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/build/demo/data/alluvial.d.ts +34 -2
- package/build/src/components/graphs/alluvial.d.ts +1 -0
- package/bundle.js +1 -1
- package/components/graphs/alluvial.d.ts +1 -0
- package/components/graphs/alluvial.js +46 -4
- package/components/graphs/alluvial.js.map +1 -1
- package/demo/data/alluvial.d.ts +34 -2
- package/demo/data/alluvial.js +175 -17
- package/demo/data/alluvial.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/index.js +6 -1
- package/demo/data/index.js.map +1 -1
- package/demo/tsconfig.tsbuildinfo +3 -3
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +2 -2
|
@@ -26,6 +26,7 @@ var Alluvial = /** @class */ (function (_super) {
|
|
|
26
26
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
27
27
|
_this.type = 'alluvial';
|
|
28
28
|
_this.renderType = RenderTypes.SVG;
|
|
29
|
+
_this.gradient_id = 'gradient-id-' + Math.floor(Math.random() * 99999999999);
|
|
29
30
|
return _this;
|
|
30
31
|
}
|
|
31
32
|
Alluvial.prototype.render = function (animate) {
|
|
@@ -45,6 +46,8 @@ var Alluvial = /** @class */ (function (_super) {
|
|
|
45
46
|
}
|
|
46
47
|
var options = this.model.getOptions();
|
|
47
48
|
var data = this.model.getDisplayData();
|
|
49
|
+
// Is gradient enabled or not
|
|
50
|
+
var isGradientAllowed = Tools.getProperty(this.getOptions(), 'color', 'gradient', 'enabled');
|
|
48
51
|
// Set the custom node padding if provided
|
|
49
52
|
var nodePadding = Configuration.alluvial.minNodePadding;
|
|
50
53
|
if (options.alluvial.nodePadding > Configuration.alluvial.minNodePadding) {
|
|
@@ -115,11 +118,45 @@ var Alluvial = /** @class */ (function (_super) {
|
|
|
115
118
|
return x;
|
|
116
119
|
});
|
|
117
120
|
// Draws the links (Waves)
|
|
118
|
-
svg
|
|
121
|
+
var links = svg
|
|
122
|
+
.append('g')
|
|
119
123
|
.attr('fill', 'none')
|
|
120
124
|
.selectAll('g')
|
|
121
|
-
.data(this.graph.links)
|
|
122
|
-
|
|
125
|
+
.data(this.graph.links);
|
|
126
|
+
// Exit so we can have multiple appends in group
|
|
127
|
+
links.exit().remove();
|
|
128
|
+
// Add gradient if requsted
|
|
129
|
+
if (isGradientAllowed) {
|
|
130
|
+
var scale_1 = Tools.getProperty(this.getOptions(), 'color', 'scale');
|
|
131
|
+
if (scale_1) {
|
|
132
|
+
links
|
|
133
|
+
.enter()
|
|
134
|
+
.append('linearGradient')
|
|
135
|
+
.attr('id', function (d) { return _this.gradient_id + "-link-" + d.index; })
|
|
136
|
+
.attr('gradientUnits', 'userSpaceOnUse')
|
|
137
|
+
.call(function (gradient) {
|
|
138
|
+
return gradient
|
|
139
|
+
.append('stop')
|
|
140
|
+
.attr('offset', '0%')
|
|
141
|
+
.attr('stop-color', function (d) {
|
|
142
|
+
return scale_1[d.source.name];
|
|
143
|
+
});
|
|
144
|
+
})
|
|
145
|
+
.call(function (gradient) {
|
|
146
|
+
return gradient
|
|
147
|
+
.append('stop')
|
|
148
|
+
.attr('offset', '100%')
|
|
149
|
+
.attr('stop-color', function (d) {
|
|
150
|
+
return scale_1[d.target.name];
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
// Exit so path can be appended to the group
|
|
155
|
+
links.exit().remove();
|
|
156
|
+
}
|
|
157
|
+
links
|
|
158
|
+
.enter()
|
|
159
|
+
.append('path')
|
|
123
160
|
.classed('link', true)
|
|
124
161
|
.attr('d', sankeyLinkHorizontal())
|
|
125
162
|
.attr('id', function (d) {
|
|
@@ -140,7 +177,12 @@ var Alluvial = /** @class */ (function (_super) {
|
|
|
140
177
|
originalClassName: 'link',
|
|
141
178
|
});
|
|
142
179
|
})
|
|
143
|
-
.style('stroke', function (d) {
|
|
180
|
+
.style('stroke', function (d) {
|
|
181
|
+
if (isGradientAllowed) {
|
|
182
|
+
return "url(#" + _this.gradient_id + "-link-" + d.index + ")";
|
|
183
|
+
}
|
|
184
|
+
return _this.model.getFillColor(d.source.name);
|
|
185
|
+
})
|
|
144
186
|
.attr('stroke-width', function (d) { return Math.max(1, d.width); })
|
|
145
187
|
.style('stroke-opacity', Configuration.alluvial.opacity.default)
|
|
146
188
|
.attr('aria-label', function (d) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alluvial.js","sourceRoot":"","sources":["alluvial.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5E,aAAa;AACb,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAErE;IAA8B,4BAAS;IAAvC;QAAA,qEAonBC;QAnnBA,UAAI,GAAG,UAAU,CAAC;QAClB,gBAAU,GAAG,WAAW,CAAC,GAAG,CAAC;;IAknB9B,CAAC;IA9mBA,yBAAM,GAAN,UAAO,OAAc;QAArB,iBA4PC;QA5PM,wBAAA,EAAA,cAAc;QACpB,2BAA2B;QAC3B,IAAM,GAAG,GAAG,IAAI,CAAC,qBAAqB,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEP,IAAA;;UAEJ,EAFM,gBAAK,EAAE,kBAEb,CAAC;QAEH,8DAA8D;QA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AE,OAAO,EAAE,OAAO,CAAC,EAA1C,CAA0C,CAAC,CAAC;IACxE,CAAC;IAED,oCAAiB,GAAjB;QACC,OAAO,oUAIA,CAAC;IACT,CAAC;IAED,yBAAyB;IACzB,0BAAO,GAAP;QACC,IAAI,CAAC,MAAM;aACT,SAAS,CAAC,uBAAuB,CAAC;aAClC,EAAE,CAAC,WAAW,EAAE,IAAI,CAAC;aACrB,EAAE,CAAC,WAAW,EAAE,IAAI,CAAC;aACrB,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC;aACjB,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC;IACF,eAAC;AAAD,CAAC,AApnBD,CAA8B,SAAS,GAonBtC","sourcesContent":["// Internal imports\nimport { Component } from '../component';\nimport { DOMUtils } from '../../services';\nimport { Tools } from '../../tools';\nimport * as Configuration from '../../configuration';\nimport { Events, ColorClassNameTypes, RenderTypes } from '../../interfaces';\n\n// D3 imports\nimport { select } from 'd3-selection';\nimport { sankey as d3Sankey, sankeyLinkHorizontal } from 'd3-sankey';\n\nexport class Alluvial extends Component {\n\ttype = 'alluvial';\n\trenderType = RenderTypes.SVG;\n\n\tprivate graph: any;\n\n\trender(animate = true) {\n\t\t// svg and container widths\n\t\tconst svg = this.getComponentContainer({ withinChartClip: true });\n\t\tsvg.html('');\n\n\t\tconst { width, height } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\t// Because of a Firefox bug with regards to sizing & d3 packs,\n\t\t// rather than checking if height or width aren't 0,\n\t\t// we have to make sure they're not smaller than 1\n\t\tif (width < 1 || height < 1) {\n\t\t\treturn;\n\t\t}\n\t\tconst options = this.model.getOptions();\n\t\tconst data = this.model.getDisplayData();\n\n\t\t// Set the custom node padding if provided\n\t\tlet nodePadding = Configuration.alluvial.minNodePadding;\n\t\tif (\n\t\t\toptions.alluvial.nodePadding > Configuration.alluvial.minNodePadding\n\t\t) {\n\t\t\tnodePadding = options.alluvial.nodePadding;\n\t\t}\n\n\t\tconst sankey = d3Sankey()\n\t\t\t.nodeId((d) => d.name)\n\t\t\t.nodeWidth(Configuration.alluvial.nodeWidth)\n\t\t\t// Distance nodes are apart from each other\n\t\t\t.nodePadding(nodePadding)\n\t\t\t// Size of the chart and its padding\n\t\t\t// Chart starts at 2 and ends at width - 2 so the outer nodes can expand from center\n\t\t\t// Chart starts from 30 so node categories can be displayed\n\t\t\t.extent([\n\t\t\t\t[2, 30],\n\t\t\t\t[width - 2, height],\n\t\t\t]);\n\n\t\t// Construct a graph with the provided user data\n\t\t// Data must be deep cloned to ensure user passed data isn't deleted when themes change\n\t\tthis.graph = sankey({\n\t\t\tnodes: options.alluvial.nodes.map((d) => Object.assign({}, d)),\n\t\t\tlinks: data.map((d) => Object.assign({}, d)),\n\t\t});\n\n\t\t// Filter out unused nodes so they are not rendered\n\t\tthis.graph.nodes = this.graph.nodes.filter((node) => node.value !== 0);\n\n\t\t// Determine the category name placement x position\n\t\tconst nodeCoordinates = {};\n\t\tthis.graph.nodes.forEach((element) => {\n\t\t\tconst point = element.x0;\n\n\t\t\t// Only 1 category per x-value\n\t\t\tif (element.category) {\n\t\t\t\tnodeCoordinates[point] = element?.category;\n\t\t\t}\n\t\t});\n\n\t\t// Add node category text\n\t\tconst alluvialCategory = svg\n\t\t\t.append('g')\n\t\t\t.classed('header-arrows', true)\n\t\t\t.selectAll('g')\n\t\t\t.data(Object.keys(nodeCoordinates))\n\t\t\t.join('g')\n\t\t\t.attr('transform', (d) => {\n\t\t\t\treturn `translate(${d}, 0)`;\n\t\t\t});\n\n\t\t// Add the category text\n\t\talluvialCategory\n\t\t\t.append('text')\n\t\t\t.attr('id', (d, i) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-category-${i}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.style('font-size', '14px')\n\t\t\t.text((d) => {\n\t\t\t\tif (nodeCoordinates[d]) {\n\t\t\t\t\treturn nodeCoordinates[d];\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t})\n\t\t\t.attr('y', 20)\n\t\t\t.attr('x', (d, i) => {\n\t\t\t\tconst elementID = this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-category-${i}`\n\t\t\t\t);\n\n\t\t\t\tconst { width } = DOMUtils.getSVGElementSize(\n\t\t\t\t\tselect(`text#${elementID}`),\n\t\t\t\t\t{ useBBox: true }\n\t\t\t\t);\n\n\t\t\t\t// Make the text on the left on node group (except first column)\n\t\t\t\tlet x = 0;\n\t\t\t\tif (d + x >= width) {\n\t\t\t\t\tx = -width + 4;\n\t\t\t\t}\n\t\t\t\treturn x;\n\t\t\t});\n\n\t\t// Draws the links (Waves)\n\t\tsvg.append('g')\n\t\t\t.attr('fill', 'none')\n\t\t\t.selectAll('g')\n\t\t\t.data(this.graph.links)\n\t\t\t.join('path')\n\t\t\t.classed('link', true)\n\t\t\t.attr('d', sankeyLinkHorizontal())\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-line-${d.index}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.attr('class', (d) => {\n\t\t\t\t// Use a single color for the lines\n\t\t\t\tif (options.alluvial.monochrome) {\n\t\t\t\t\treturn this.model.getColorClassName({\n\t\t\t\t\t\tclassNameTypes: [ColorClassNameTypes.STROKE],\n\t\t\t\t\t\tdataGroupName: 0,\n\t\t\t\t\t\toriginalClassName: 'link',\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn this.model.getColorClassName({\n\t\t\t\t\tclassNameTypes: [ColorClassNameTypes.STROKE],\n\t\t\t\t\tdataGroupName: d.source.index,\n\t\t\t\t\toriginalClassName: 'link',\n\t\t\t\t});\n\t\t\t})\n\t\t\t.style('stroke', (d) => this.model.getFillColor(d.source.name))\n\t\t\t.attr('stroke-width', (d) => Math.max(1, d.width))\n\t\t\t.style('stroke-opacity', Configuration.alluvial.opacity.default)\n\t\t\t.attr(\n\t\t\t\t'aria-label',\n\t\t\t\t(d) =>\n\t\t\t\t\t`${d.source.name} → ${d.target.name} (${d.value}${\n\t\t\t\t\t\toptions.alluvial.units\n\t\t\t\t\t\t\t? ' ' + options.alluvial.units\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t})`\n\t\t\t);\n\n\t\t// Creating the groups\n\t\tconst node = svg\n\t\t\t.append('g')\n\t\t\t.selectAll('g')\n\t\t\t.data(this.graph.nodes)\n\t\t\t.enter()\n\t\t\t.append('g')\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-${d.index}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.classed('node-group', true)\n\t\t\t.attr('transform', (d) => `translate(${d.x0}, ${d.y0})`);\n\n\t\t// Creating the nodes\n\t\tnode.append('rect')\n\t\t\t.classed('node', true)\n\t\t\t.attr('height', (d) => d.y1 - d.y0)\n\t\t\t.attr('width', (d) => d.x1 - d.x0)\n\t\t\t.attr('fill', 'black');\n\n\t\t// Group to hold the text & rectangle background\n\t\tconst textNode = node\n\t\t\t.append('g')\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-title-${d.index}`\n\t\t\t\t)\n\t\t\t);\n\n\t\t// Node title - text\n\t\ttextNode\n\t\t\t.append('text')\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-text-${d.index}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.attr('class', 'node-text')\n\t\t\t.style('font-size', '12px')\n\t\t\t.attr('text-anchor', 'start')\n\t\t\t.attr('fill', 'white')\n\t\t\t// Padding to text\n\t\t\t.attr('x', 4)\n\t\t\t// shift 13 pixels down to fit background container\n\t\t\t.attr('dy', 13)\n\t\t\t.text((d) => {\n\t\t\t\treturn `${d.name} (${d.value})`;\n\t\t\t})\n\t\t\t.attr('aria-label', (d) => {\n\t\t\t\treturn `${d.name} (${d.value})`;\n\t\t\t});\n\n\t\t// Text background\n\t\ttextNode\n\t\t\t.append('rect')\n\t\t\t.classed('node-text-bg', true)\n\t\t\t.attr('width', (d, i) => {\n\t\t\t\tconst elementID = this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-text-${i}`\n\t\t\t\t);\n\n\t\t\t\t// Determine rectangle width based on text width\n\t\t\t\tconst { width } = DOMUtils.getSVGElementSize(\n\t\t\t\t\tselect(`text#${elementID}`),\n\t\t\t\t\t{ useBBox: true }\n\t\t\t\t);\n\n\t\t\t\treturn width + 8;\n\t\t\t})\n\t\t\t.attr('height', 18)\n\t\t\t.attr('stroke-width', 2)\n\t\t\t.lower();\n\n\t\t// Position group based on text width\n\t\ttextNode.attr('transform', (d, i) => {\n\t\t\tconst elementID = this.services.domUtils.generateElementIDString(\n\t\t\t\t`alluvial-node-text-${i}`\n\t\t\t);\n\n\t\t\tconst { width } = DOMUtils.getSVGElementSize(\n\t\t\t\tselect(`text#${elementID}`),\n\t\t\t\t{ useBBox: true }\n\t\t\t);\n\n\t\t\t// Subtracting 9 since text background is 18 to center\n\t\t\tconst y = (d.y1 - d.y0) / 2 - 9;\n\t\t\t// Node width\n\t\t\tlet x = d.x1 - d.x0;\n\n\t\t\t// Display bars on the right instead of left of the node\n\t\t\tif (d.x1 >= width) {\n\t\t\t\t// 16 = node width (4) + text container padding (8) + distance between node and text container (4)\n\t\t\t\tx = x - (width + 16);\n\t\t\t} else {\n\t\t\t\t// Add padding to text containers\n\t\t\t\tx += 4;\n\t\t\t}\n\n\t\t\treturn `translate(${x}, ${y})`;\n\t\t});\n\n\t\tthis.addLineEventListener();\n\t\tthis.addNodeEventListener();\n\t}\n\n\taddLineEventListener() {\n\t\tconst options = this.getOptions();\n\t\tconst self = this;\n\n\t\t// Set delay to counter flashy behaviour\n\t\tconst debouncedLineHighlight = Tools.debounce(\n\t\t\t(link, event = 'mouseover') => {\n\t\t\t\tconst allLinks = self.parent\n\t\t\t\t\t.selectAll('path.link')\n\t\t\t\t\t.transition()\n\t\t\t\t\t.call((t) =>\n\t\t\t\t\t\tself.services.transitions.setupTransition({\n\t\t\t\t\t\t\ttransition: t,\n\t\t\t\t\t\t\tname: 'alluvial-links-mouse-highlight',\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\n\t\t\t\tif (event === 'mouseout') {\n\t\t\t\t\tselect(link).lower();\n\t\t\t\t\tallLinks.style(\n\t\t\t\t\t\t'stroke-opacity',\n\t\t\t\t\t\tConfiguration.alluvial.opacity.default\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tallLinks.style('stroke-opacity', function () {\n\t\t\t\t\t\t// highlight and raise if link is this\n\t\t\t\t\t\tif (link === this) {\n\t\t\t\t\t\t\tselect(this).raise();\n\t\t\t\t\t\t\treturn Configuration.alluvial.opacity.selected;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn Configuration.alluvial.opacity.unfocus;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\t33\n\t\t);\n\n\t\tthis.parent\n\t\t\t.selectAll('path.link')\n\t\t\t.on('mouseover', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\t\t\t\tdebouncedLineHighlight(this, 'mouseover');\n\t\t\t\thoveredElement.classed('link-hovered', true);\n\n\t\t\t\tconst strokeColor = getComputedStyle(this).getPropertyValue(\n\t\t\t\t\t'stroke'\n\t\t\t\t);\n\n\t\t\t\t// Dispatch mouse over event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.LINE_MOUSEOVER,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: hoveredElement,\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Dispatch tooltip show event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.SHOW, {\n\t\t\t\t\tevent,\n\t\t\t\t\thoveredElement,\n\t\t\t\t\titems: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: datum.target.name,\n\t\t\t\t\t\t\tvalue:\n\t\t\t\t\t\t\t\tdatum.value +\n\t\t\t\t\t\t\t\t(options.alluvial.units\n\t\t\t\t\t\t\t\t\t? ` ${options.alluvial.units}`\n\t\t\t\t\t\t\t\t\t: ''),\n\t\t\t\t\t\t\tcolor: strokeColor,\n\t\t\t\t\t\t\tlabelIcon: self.getRightArrowIcon(),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('mousemove', function (event, datum) {\n\t\t\t\t// Dispatch mouse move event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.LINE_MOUSEMOVE,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: select(this),\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t// Dispatch tooltip move event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.MOVE, {\n\t\t\t\t\tevent,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('click', function (event, datum) {\n\t\t\t\t// Dispatch mouse click event\n\t\t\t\tself.services.events.dispatchEvent(Events.Alluvial.LINE_CLICK, {\n\t\t\t\t\tevent,\n\t\t\t\t\telement: select(this),\n\t\t\t\t\tdatum,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('mouseout', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\t\t\t\tdebouncedLineHighlight(this, 'mouseout');\n\t\t\t\thoveredElement.classed('link-hovered', false);\n\n\t\t\t\t// Dispatch mouse out event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.LINE_MOUSEOUT,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: hoveredElement,\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Dispatch hide tooltip event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.HIDE, {\n\t\t\t\t\tevent,\n\t\t\t\t\thoveredElement,\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\taddNodeEventListener() {\n\t\tconst self = this;\n\n\t\t// Set delay to counter flashy behaviour\n\t\tconst debouncedLineHighlight = Tools.debounce(\n\t\t\t(links = [], event = 'mouseover') => {\n\t\t\t\tif (event === 'mouseout' || links.length === 0) {\n\t\t\t\t\t// set all links to default opacity & corret link order\n\t\t\t\t\tself.parent\n\t\t\t\t\t\t.selectAll('path.link')\n\t\t\t\t\t\t.classed('link-hovered', false)\n\t\t\t\t\t\t.data(this.graph.links, (d) => d.index)\n\t\t\t\t\t\t.order()\n\t\t\t\t\t\t.style(\n\t\t\t\t\t\t\t'stroke-opacity',\n\t\t\t\t\t\t\tConfiguration.alluvial.opacity.default\n\t\t\t\t\t\t);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Highlight all nodes\n\t\t\t\tconst allLinks = self.parent\n\t\t\t\t\t.selectAll('path.link')\n\t\t\t\t\t.transition()\n\t\t\t\t\t.call((t) =>\n\t\t\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\t\t\ttransition: t,\n\t\t\t\t\t\t\tname: 'alluvial-link-mouse-highlight',\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\n\t\t\t\tallLinks.style('stroke-opacity', function (d) {\n\t\t\t\t\t// Raise the links & increase stroke-opacity to selected\n\t\t\t\t\tif (links.some((element) => element === d.index)) {\n\t\t\t\t\t\tselect(this).classed('link-hovered', true).raise();\n\t\t\t\t\t\treturn Configuration.alluvial.opacity.selected;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Configuration.alluvial.opacity.unfocus;\n\t\t\t\t});\n\t\t\t},\n\t\t\t66\n\t\t);\n\n\t\tself.parent\n\t\t\t.selectAll('.node-group')\n\t\t\t.on('mouseover', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\n\t\t\t\t// Highlight all links that pass through node\n\t\t\t\tconst paths = [];\n\n\t\t\t\t// Outgoing links\n\t\t\t\tself.traverse(\n\t\t\t\t\t{ link: 'sourceLinks', node: 'target' },\n\t\t\t\t\tdatum,\n\t\t\t\t\tpaths\n\t\t\t\t);\n\n\t\t\t\t//Incoming links\n\t\t\t\tself.traverse(\n\t\t\t\t\t{ link: 'targetLinks', node: 'source' },\n\t\t\t\t\tdatum,\n\t\t\t\t\tpaths\n\t\t\t\t);\n\n\t\t\t\t// Highlight all linked lines in the graph data structure\n\t\t\t\tif (paths.length) {\n\t\t\t\t\t// Get transformation value of node\n\t\t\t\t\tconst nodeMatrix = Tools.getTranformOffsets(\n\t\t\t\t\t\thoveredElement.attr('transform')\n\t\t\t\t\t);\n\n\t\t\t\t\t// Move node to the left by 2 to grow node from the center\n\t\t\t\t\thoveredElement.attr(\n\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t`translate(${nodeMatrix.x - 2}, ${nodeMatrix.y})`\n\t\t\t\t\t);\n\n\t\t\t\t\thoveredElement\n\t\t\t\t\t\t.classed('node-hovered', true)\n\t\t\t\t\t\t.selectAll('rect.node')\n\t\t\t\t\t\t.attr('width', 8);\n\n\t\t\t\t\t// Translate first column text container to the\n\t\t\t\t\t// right so it doesn't clash with expanding node\n\t\t\t\t\tif (datum.x0 - 2 === 0) {\n\t\t\t\t\t\tconst elementID = self.services.domUtils.generateElementIDString(\n\t\t\t\t\t\t\t`alluvial-node-title-${datum.index}`\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst titleContainer = self.parent.select(\n\t\t\t\t\t\t\t`g#${elementID}`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst titleMatrix = Tools.getTranformOffsets(\n\t\t\t\t\t\t\ttitleContainer.attr('transform')\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\ttitleContainer.attr(\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate(${titleMatrix.x + 4},${titleMatrix.y})`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst elementID = self.services.domUtils.generateElementIDString(\n\t\t\t\t\t\t`alluvial-node-text-${datum.index}`\n\t\t\t\t\t);\n\n\t\t\t\t\tself.parent\n\t\t\t\t\t\t.select(`text#${elementID}`)\n\t\t\t\t\t\t.style('font-weight', 'bold');\n\n\t\t\t\t\tdebouncedLineHighlight(paths, 'mouseover');\n\n\t\t\t\t\t// Dispatch mouse over event\n\t\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\t\tEvents.Alluvial.NODE_MOUSEOVER,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\telement: hoveredElement,\n\t\t\t\t\t\t\tdatum,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('mousemove', function (event, datum) {\n\t\t\t\t// Dispatch mouse move event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.NODE_MOUSEMOVE,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: select(this),\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Dispatch tooltip move event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.MOVE, {\n\t\t\t\t\tevent,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('click', function (event, datum) {\n\t\t\t\t// Dispatch mouse click event\n\t\t\t\tself.services.events.dispatchEvent(Events.Alluvial.NODE_CLICK, {\n\t\t\t\t\tevent,\n\t\t\t\t\telement: select(this),\n\t\t\t\t\tdatum,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('mouseout', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\n\t\t\t\t// Set the node position to initial state (unexpanded)\n\t\t\t\tconst nodeMatrix = Tools.getTranformOffsets(\n\t\t\t\t\thoveredElement.attr('transform')\n\t\t\t\t);\n\n\t\t\t\thoveredElement\n\t\t\t\t\t.classed('node-hovered', false)\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t`translate(${nodeMatrix.x + 2}, ${nodeMatrix.y})`\n\t\t\t\t\t)\n\t\t\t\t\t.select('rect.node')\n\t\t\t\t\t.attr('width', Configuration.alluvial.nodeWidth);\n\n\t\t\t\t// Translate text container back to initial state\n\t\t\t\tif (datum.x0 - 2 === 0) {\n\t\t\t\t\tconst elementID = self.services.domUtils.generateElementIDString(\n\t\t\t\t\t\t`alluvial-node-title-${datum.index}`\n\t\t\t\t\t);\n\n\t\t\t\t\tconst titleContainer = self.parent.select(`g#${elementID}`);\n\t\t\t\t\tconst titleMatrix = Tools.getTranformOffsets(\n\t\t\t\t\t\ttitleContainer.attr('transform')\n\t\t\t\t\t);\n\n\t\t\t\t\ttitleContainer.attr(\n\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t`translate(${titleMatrix.x - 4},${titleMatrix.y})`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst elementID = self.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-text-${datum.index}`\n\t\t\t\t);\n\n\t\t\t\tself.parent\n\t\t\t\t\t.select(`text#${elementID}`)\n\t\t\t\t\t.style('font-weight', 'normal');\n\n\t\t\t\tdebouncedLineHighlight([], 'mouseout');\n\n\t\t\t\t// Dispatch mouse out event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.NODE_MOUSEOUT,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: hoveredElement,\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Dispatch hide tooltip event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.HIDE, {\n\t\t\t\t\thoveredElement,\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\t// Traverse graph and get all connected links to node\n\tprivate traverse(\n\t\tdirection:\n\t\t\t| { link: 'sourceLinks'; node: 'target' }\n\t\t\t| { link: 'targetLinks'; node: 'source' },\n\t\tnode,\n\t\tvisited = []\n\t) {\n\t\tconst links = node[direction.link].map((element) => {\n\t\t\tvisited.push(element.index);\n\t\t\treturn element[direction.node];\n\t\t});\n\n\t\t// Retrieve the child nodes\n\t\tlinks.forEach((element) => this.traverse(direction, element, visited));\n\t}\n\n\tgetRightArrowIcon() {\n\t\treturn `\n\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\">\n\t\t\t<polygon points=\"18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6\"/>\n\t\t\t<rect data-name=\"<Transparent Rectangle>\" style=\"fill: none;\" width=\"32\" height=\"32\"/>\n\t\t</svg>`;\n\t}\n\n\t// Remove event listeners\n\tdestroy() {\n\t\tthis.parent\n\t\t\t.selectAll('path.line,.node-group')\n\t\t\t.on('mouseover', null)\n\t\t\t.on('mousemove', null)\n\t\t\t.on('click', null)\n\t\t\t.on('mouseout', null);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"alluvial.js","sourceRoot":"","sources":["alluvial.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5E,aAAa;AACb,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MA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'../component';\nimport { DOMUtils } from '../../services';\nimport { Tools } from '../../tools';\nimport * as Configuration from '../../configuration';\nimport { Events, ColorClassNameTypes, RenderTypes } from '../../interfaces';\n\n// D3 imports\nimport { select } from 'd3-selection';\nimport { sankey as d3Sankey, sankeyLinkHorizontal } from 'd3-sankey';\n\nexport class Alluvial extends Component {\n\ttype = 'alluvial';\n\trenderType = RenderTypes.SVG;\n\n\tprivate graph: any;\n\tgradient_id = 'gradient-id-' + Math.floor(Math.random() * 99999999999);\n\n\trender(animate = true) {\n\t\t// svg and container widths\n\t\tconst svg = this.getComponentContainer({ withinChartClip: true });\n\t\tsvg.html('');\n\n\t\tconst { width, height } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\t// Because of a Firefox bug with regards to sizing & d3 packs,\n\t\t// rather than checking if height or width aren't 0,\n\t\t// we have to make sure they're not smaller than 1\n\t\tif (width < 1 || height < 1) {\n\t\t\treturn;\n\t\t}\n\t\tconst options = this.model.getOptions();\n\t\tconst data = this.model.getDisplayData();\n\n\t\t// Is gradient enabled or not\n\t\tconst isGradientAllowed = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'color',\n\t\t\t'gradient',\n\t\t\t'enabled'\n\t\t);\n\n\t\t// Set the custom node padding if provided\n\t\tlet nodePadding = Configuration.alluvial.minNodePadding;\n\t\tif (\n\t\t\toptions.alluvial.nodePadding > Configuration.alluvial.minNodePadding\n\t\t) {\n\t\t\tnodePadding = options.alluvial.nodePadding;\n\t\t}\n\n\t\tconst sankey = d3Sankey()\n\t\t\t.nodeId((d) => d.name)\n\t\t\t.nodeWidth(Configuration.alluvial.nodeWidth)\n\t\t\t// Distance nodes are apart from each other\n\t\t\t.nodePadding(nodePadding)\n\t\t\t// Size of the chart and its padding\n\t\t\t// Chart starts at 2 and ends at width - 2 so the outer nodes can expand from center\n\t\t\t// Chart starts from 30 so node categories can be displayed\n\t\t\t.extent([\n\t\t\t\t[2, 30],\n\t\t\t\t[width - 2, height],\n\t\t\t]);\n\n\t\t// Construct a graph with the provided user data\n\t\t// Data must be deep cloned to ensure user passed data isn't deleted when themes change\n\t\tthis.graph = sankey({\n\t\t\tnodes: options.alluvial.nodes.map((d) => Object.assign({}, d)),\n\t\t\tlinks: data.map((d) => Object.assign({}, d)),\n\t\t});\n\n\t\t// Filter out unused nodes so they are not rendered\n\t\tthis.graph.nodes = this.graph.nodes.filter((node) => node.value !== 0);\n\n\t\t// Determine the category name placement x position\n\t\tconst nodeCoordinates = {};\n\t\tthis.graph.nodes.forEach((element) => {\n\t\t\tconst point = element.x0;\n\n\t\t\t// Only 1 category per x-value\n\t\t\tif (element.category) {\n\t\t\t\tnodeCoordinates[point] = element?.category;\n\t\t\t}\n\t\t});\n\n\t\t// Add node category text\n\t\tconst alluvialCategory = svg\n\t\t\t.append('g')\n\t\t\t.classed('header-arrows', true)\n\t\t\t.selectAll('g')\n\t\t\t.data(Object.keys(nodeCoordinates))\n\t\t\t.join('g')\n\t\t\t.attr('transform', (d) => {\n\t\t\t\treturn `translate(${d}, 0)`;\n\t\t\t});\n\n\t\t// Add the category text\n\t\talluvialCategory\n\t\t\t.append('text')\n\t\t\t.attr('id', (d, i) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-category-${i}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.style('font-size', '14px')\n\t\t\t.text((d) => {\n\t\t\t\tif (nodeCoordinates[d]) {\n\t\t\t\t\treturn nodeCoordinates[d];\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t})\n\t\t\t.attr('y', 20)\n\t\t\t.attr('x', (d, i) => {\n\t\t\t\tconst elementID = this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-category-${i}`\n\t\t\t\t);\n\n\t\t\t\tconst { width } = DOMUtils.getSVGElementSize(\n\t\t\t\t\tselect(`text#${elementID}`),\n\t\t\t\t\t{ useBBox: true }\n\t\t\t\t);\n\n\t\t\t\t// Make the text on the left on node group (except first column)\n\t\t\t\tlet x = 0;\n\t\t\t\tif (d + x >= width) {\n\t\t\t\t\tx = -width + 4;\n\t\t\t\t}\n\t\t\t\treturn x;\n\t\t\t});\n\n\t\t// Draws the links (Waves)\n\t\tconst links = svg\n\t\t\t.append('g')\n\t\t\t.attr('fill', 'none')\n\t\t\t.selectAll('g')\n\t\t\t.data(this.graph.links);\n\n\t\t// Exit so we can have multiple appends in group\n\t\tlinks.exit().remove();\n\n\t\t// Add gradient if requsted\n\t\tif (isGradientAllowed) {\n\t\t\tconst scale = Tools.getProperty(\n\t\t\t\tthis.getOptions(),\n\t\t\t\t'color',\n\t\t\t\t'scale'\n\t\t\t);\n\n\t\t\tif (scale) {\n\t\t\t\tlinks\n\t\t\t\t\t.enter()\n\t\t\t\t\t.append('linearGradient')\n\t\t\t\t\t.attr('id', (d) => `${this.gradient_id}-link-${d.index}`)\n\t\t\t\t\t.attr('gradientUnits', 'userSpaceOnUse')\n\t\t\t\t\t.call((gradient) =>\n\t\t\t\t\t\tgradient\n\t\t\t\t\t\t\t.append('stop')\n\t\t\t\t\t\t\t.attr('offset', '0%')\n\t\t\t\t\t\t\t.attr('stop-color', (d) => {\n\t\t\t\t\t\t\t\treturn scale[d.source.name];\n\t\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.call((gradient) =>\n\t\t\t\t\t\tgradient\n\t\t\t\t\t\t\t.append('stop')\n\t\t\t\t\t\t\t.attr('offset', '100%')\n\t\t\t\t\t\t\t.attr('stop-color', (d) => {\n\t\t\t\t\t\t\t\treturn scale[d.target.name];\n\t\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t// Exit so path can be appended to the group\n\t\t\tlinks.exit().remove();\n\t\t}\n\n\t\tlinks\n\t\t\t.enter()\n\t\t\t.append('path')\n\t\t\t.classed('link', true)\n\t\t\t.attr('d', sankeyLinkHorizontal())\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-line-${d.index}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.attr('class', (d) => {\n\t\t\t\t// Use a single color for the lines\n\t\t\t\tif (options.alluvial.monochrome) {\n\t\t\t\t\treturn this.model.getColorClassName({\n\t\t\t\t\t\tclassNameTypes: [ColorClassNameTypes.STROKE],\n\t\t\t\t\t\tdataGroupName: 0,\n\t\t\t\t\t\toriginalClassName: 'link',\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn this.model.getColorClassName({\n\t\t\t\t\tclassNameTypes: [ColorClassNameTypes.STROKE],\n\t\t\t\t\tdataGroupName: d.source.index,\n\t\t\t\t\toriginalClassName: 'link',\n\t\t\t\t});\n\t\t\t})\n\t\t\t.style('stroke', (d) => {\n\t\t\t\tif (isGradientAllowed) {\n\t\t\t\t\treturn `url(#${this.gradient_id}-link-${d.index})`;\n\t\t\t\t}\n\n\t\t\t\treturn this.model.getFillColor(d.source.name);\n\t\t\t})\n\t\t\t.attr('stroke-width', (d) => Math.max(1, d.width))\n\t\t\t.style('stroke-opacity', Configuration.alluvial.opacity.default)\n\t\t\t.attr(\n\t\t\t\t'aria-label',\n\t\t\t\t(d) =>\n\t\t\t\t\t`${d.source.name} → ${d.target.name} (${d.value}${\n\t\t\t\t\t\toptions.alluvial.units\n\t\t\t\t\t\t\t? ' ' + options.alluvial.units\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t})`\n\t\t\t);\n\n\t\t// Creating the groups\n\t\tconst node = svg\n\t\t\t.append('g')\n\t\t\t.selectAll('g')\n\t\t\t.data(this.graph.nodes)\n\t\t\t.enter()\n\t\t\t.append('g')\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-${d.index}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.classed('node-group', true)\n\t\t\t.attr('transform', (d) => `translate(${d.x0}, ${d.y0})`);\n\n\t\t// Creating the nodes\n\t\tnode.append('rect')\n\t\t\t.classed('node', true)\n\t\t\t.attr('height', (d) => d.y1 - d.y0)\n\t\t\t.attr('width', (d) => d.x1 - d.x0)\n\t\t\t.attr('fill', 'black');\n\n\t\t// Group to hold the text & rectangle background\n\t\tconst textNode = node\n\t\t\t.append('g')\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-title-${d.index}`\n\t\t\t\t)\n\t\t\t);\n\n\t\t// Node title - text\n\t\ttextNode\n\t\t\t.append('text')\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-text-${d.index}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.attr('class', 'node-text')\n\t\t\t.style('font-size', '12px')\n\t\t\t.attr('text-anchor', 'start')\n\t\t\t.attr('fill', 'white')\n\t\t\t// Padding to text\n\t\t\t.attr('x', 4)\n\t\t\t// shift 13 pixels down to fit background container\n\t\t\t.attr('dy', 13)\n\t\t\t.text((d) => {\n\t\t\t\treturn `${d.name} (${d.value})`;\n\t\t\t})\n\t\t\t.attr('aria-label', (d) => {\n\t\t\t\treturn `${d.name} (${d.value})`;\n\t\t\t});\n\n\t\t// Text background\n\t\ttextNode\n\t\t\t.append('rect')\n\t\t\t.classed('node-text-bg', true)\n\t\t\t.attr('width', (d, i) => {\n\t\t\t\tconst elementID = this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-text-${i}`\n\t\t\t\t);\n\n\t\t\t\t// Determine rectangle width based on text width\n\t\t\t\tconst { width } = DOMUtils.getSVGElementSize(\n\t\t\t\t\tselect(`text#${elementID}`),\n\t\t\t\t\t{ useBBox: true }\n\t\t\t\t);\n\n\t\t\t\treturn width + 8;\n\t\t\t})\n\t\t\t.attr('height', 18)\n\t\t\t.attr('stroke-width', 2)\n\t\t\t.lower();\n\n\t\t// Position group based on text width\n\t\ttextNode.attr('transform', (d, i) => {\n\t\t\tconst elementID = this.services.domUtils.generateElementIDString(\n\t\t\t\t`alluvial-node-text-${i}`\n\t\t\t);\n\n\t\t\tconst { width } = DOMUtils.getSVGElementSize(\n\t\t\t\tselect(`text#${elementID}`),\n\t\t\t\t{ useBBox: true }\n\t\t\t);\n\n\t\t\t// Subtracting 9 since text background is 18 to center\n\t\t\tconst y = (d.y1 - d.y0) / 2 - 9;\n\t\t\t// Node width\n\t\t\tlet x = d.x1 - d.x0;\n\n\t\t\t// Display bars on the right instead of left of the node\n\t\t\tif (d.x1 >= width) {\n\t\t\t\t// 16 = node width (4) + text container padding (8) + distance between node and text container (4)\n\t\t\t\tx = x - (width + 16);\n\t\t\t} else {\n\t\t\t\t// Add padding to text containers\n\t\t\t\tx += 4;\n\t\t\t}\n\n\t\t\treturn `translate(${x}, ${y})`;\n\t\t});\n\n\t\tthis.addLineEventListener();\n\t\tthis.addNodeEventListener();\n\t}\n\n\taddLineEventListener() {\n\t\tconst options = this.getOptions();\n\t\tconst self = this;\n\n\t\t// Set delay to counter flashy behaviour\n\t\tconst debouncedLineHighlight = Tools.debounce(\n\t\t\t(link, event = 'mouseover') => {\n\t\t\t\tconst allLinks = self.parent\n\t\t\t\t\t.selectAll('path.link')\n\t\t\t\t\t.transition()\n\t\t\t\t\t.call((t) =>\n\t\t\t\t\t\tself.services.transitions.setupTransition({\n\t\t\t\t\t\t\ttransition: t,\n\t\t\t\t\t\t\tname: 'alluvial-links-mouse-highlight',\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\n\t\t\t\tif (event === 'mouseout') {\n\t\t\t\t\tselect(link).lower();\n\t\t\t\t\tallLinks.style(\n\t\t\t\t\t\t'stroke-opacity',\n\t\t\t\t\t\tConfiguration.alluvial.opacity.default\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tallLinks.style('stroke-opacity', function () {\n\t\t\t\t\t\t// highlight and raise if link is this\n\t\t\t\t\t\tif (link === this) {\n\t\t\t\t\t\t\tselect(this).raise();\n\t\t\t\t\t\t\treturn Configuration.alluvial.opacity.selected;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn Configuration.alluvial.opacity.unfocus;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\t33\n\t\t);\n\n\t\tthis.parent\n\t\t\t.selectAll('path.link')\n\t\t\t.on('mouseover', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\t\t\t\tdebouncedLineHighlight(this, 'mouseover');\n\t\t\t\thoveredElement.classed('link-hovered', true);\n\n\t\t\t\tconst strokeColor = getComputedStyle(this).getPropertyValue(\n\t\t\t\t\t'stroke'\n\t\t\t\t);\n\n\t\t\t\t// Dispatch mouse over event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.LINE_MOUSEOVER,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: hoveredElement,\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Dispatch tooltip show event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.SHOW, {\n\t\t\t\t\tevent,\n\t\t\t\t\thoveredElement,\n\t\t\t\t\titems: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: datum.target.name,\n\t\t\t\t\t\t\tvalue:\n\t\t\t\t\t\t\t\tdatum.value +\n\t\t\t\t\t\t\t\t(options.alluvial.units\n\t\t\t\t\t\t\t\t\t? ` ${options.alluvial.units}`\n\t\t\t\t\t\t\t\t\t: ''),\n\t\t\t\t\t\t\tcolor: strokeColor,\n\t\t\t\t\t\t\tlabelIcon: self.getRightArrowIcon(),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('mousemove', function (event, datum) {\n\t\t\t\t// Dispatch mouse move event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.LINE_MOUSEMOVE,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: select(this),\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t// Dispatch tooltip move event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.MOVE, {\n\t\t\t\t\tevent,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('click', function (event, datum) {\n\t\t\t\t// Dispatch mouse click event\n\t\t\t\tself.services.events.dispatchEvent(Events.Alluvial.LINE_CLICK, {\n\t\t\t\t\tevent,\n\t\t\t\t\telement: select(this),\n\t\t\t\t\tdatum,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('mouseout', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\t\t\t\tdebouncedLineHighlight(this, 'mouseout');\n\t\t\t\thoveredElement.classed('link-hovered', false);\n\n\t\t\t\t// Dispatch mouse out event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.LINE_MOUSEOUT,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: hoveredElement,\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Dispatch hide tooltip event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.HIDE, {\n\t\t\t\t\tevent,\n\t\t\t\t\thoveredElement,\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\taddNodeEventListener() {\n\t\tconst self = this;\n\n\t\t// Set delay to counter flashy behaviour\n\t\tconst debouncedLineHighlight = Tools.debounce(\n\t\t\t(links = [], event = 'mouseover') => {\n\t\t\t\tif (event === 'mouseout' || links.length === 0) {\n\t\t\t\t\t// set all links to default opacity & corret link order\n\t\t\t\t\tself.parent\n\t\t\t\t\t\t.selectAll('path.link')\n\t\t\t\t\t\t.classed('link-hovered', false)\n\t\t\t\t\t\t.data(this.graph.links, (d) => d.index)\n\t\t\t\t\t\t.order()\n\t\t\t\t\t\t.style(\n\t\t\t\t\t\t\t'stroke-opacity',\n\t\t\t\t\t\t\tConfiguration.alluvial.opacity.default\n\t\t\t\t\t\t);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Highlight all nodes\n\t\t\t\tconst allLinks = self.parent\n\t\t\t\t\t.selectAll('path.link')\n\t\t\t\t\t.transition()\n\t\t\t\t\t.call((t) =>\n\t\t\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\t\t\ttransition: t,\n\t\t\t\t\t\t\tname: 'alluvial-link-mouse-highlight',\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\n\t\t\t\tallLinks.style('stroke-opacity', function (d) {\n\t\t\t\t\t// Raise the links & increase stroke-opacity to selected\n\t\t\t\t\tif (links.some((element) => element === d.index)) {\n\t\t\t\t\t\tselect(this).classed('link-hovered', true).raise();\n\t\t\t\t\t\treturn Configuration.alluvial.opacity.selected;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Configuration.alluvial.opacity.unfocus;\n\t\t\t\t});\n\t\t\t},\n\t\t\t66\n\t\t);\n\n\t\tself.parent\n\t\t\t.selectAll('.node-group')\n\t\t\t.on('mouseover', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\n\t\t\t\t// Highlight all links that pass through node\n\t\t\t\tconst paths = [];\n\n\t\t\t\t// Outgoing links\n\t\t\t\tself.traverse(\n\t\t\t\t\t{ link: 'sourceLinks', node: 'target' },\n\t\t\t\t\tdatum,\n\t\t\t\t\tpaths\n\t\t\t\t);\n\n\t\t\t\t//Incoming links\n\t\t\t\tself.traverse(\n\t\t\t\t\t{ link: 'targetLinks', node: 'source' },\n\t\t\t\t\tdatum,\n\t\t\t\t\tpaths\n\t\t\t\t);\n\n\t\t\t\t// Highlight all linked lines in the graph data structure\n\t\t\t\tif (paths.length) {\n\t\t\t\t\t// Get transformation value of node\n\t\t\t\t\tconst nodeMatrix = Tools.getTranformOffsets(\n\t\t\t\t\t\thoveredElement.attr('transform')\n\t\t\t\t\t);\n\n\t\t\t\t\t// Move node to the left by 2 to grow node from the center\n\t\t\t\t\thoveredElement.attr(\n\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t`translate(${nodeMatrix.x - 2}, ${nodeMatrix.y})`\n\t\t\t\t\t);\n\n\t\t\t\t\thoveredElement\n\t\t\t\t\t\t.classed('node-hovered', true)\n\t\t\t\t\t\t.selectAll('rect.node')\n\t\t\t\t\t\t.attr('width', 8);\n\n\t\t\t\t\t// Translate first column text container to the\n\t\t\t\t\t// right so it doesn't clash with expanding node\n\t\t\t\t\tif (datum.x0 - 2 === 0) {\n\t\t\t\t\t\tconst elementID = self.services.domUtils.generateElementIDString(\n\t\t\t\t\t\t\t`alluvial-node-title-${datum.index}`\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst titleContainer = self.parent.select(\n\t\t\t\t\t\t\t`g#${elementID}`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst titleMatrix = Tools.getTranformOffsets(\n\t\t\t\t\t\t\ttitleContainer.attr('transform')\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\ttitleContainer.attr(\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate(${titleMatrix.x + 4},${titleMatrix.y})`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst elementID = self.services.domUtils.generateElementIDString(\n\t\t\t\t\t\t`alluvial-node-text-${datum.index}`\n\t\t\t\t\t);\n\n\t\t\t\t\tself.parent\n\t\t\t\t\t\t.select(`text#${elementID}`)\n\t\t\t\t\t\t.style('font-weight', 'bold');\n\n\t\t\t\t\tdebouncedLineHighlight(paths, 'mouseover');\n\n\t\t\t\t\t// Dispatch mouse over event\n\t\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\t\tEvents.Alluvial.NODE_MOUSEOVER,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\telement: hoveredElement,\n\t\t\t\t\t\t\tdatum,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('mousemove', function (event, datum) {\n\t\t\t\t// Dispatch mouse move event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.NODE_MOUSEMOVE,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: select(this),\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Dispatch tooltip move event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.MOVE, {\n\t\t\t\t\tevent,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('click', function (event, datum) {\n\t\t\t\t// Dispatch mouse click event\n\t\t\t\tself.services.events.dispatchEvent(Events.Alluvial.NODE_CLICK, {\n\t\t\t\t\tevent,\n\t\t\t\t\telement: select(this),\n\t\t\t\t\tdatum,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('mouseout', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\n\t\t\t\t// Set the node position to initial state (unexpanded)\n\t\t\t\tconst nodeMatrix = Tools.getTranformOffsets(\n\t\t\t\t\thoveredElement.attr('transform')\n\t\t\t\t);\n\n\t\t\t\thoveredElement\n\t\t\t\t\t.classed('node-hovered', false)\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t`translate(${nodeMatrix.x + 2}, ${nodeMatrix.y})`\n\t\t\t\t\t)\n\t\t\t\t\t.select('rect.node')\n\t\t\t\t\t.attr('width', Configuration.alluvial.nodeWidth);\n\n\t\t\t\t// Translate text container back to initial state\n\t\t\t\tif (datum.x0 - 2 === 0) {\n\t\t\t\t\tconst elementID = self.services.domUtils.generateElementIDString(\n\t\t\t\t\t\t`alluvial-node-title-${datum.index}`\n\t\t\t\t\t);\n\n\t\t\t\t\tconst titleContainer = self.parent.select(`g#${elementID}`);\n\t\t\t\t\tconst titleMatrix = Tools.getTranformOffsets(\n\t\t\t\t\t\ttitleContainer.attr('transform')\n\t\t\t\t\t);\n\n\t\t\t\t\ttitleContainer.attr(\n\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t`translate(${titleMatrix.x - 4},${titleMatrix.y})`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst elementID = self.services.domUtils.generateElementIDString(\n\t\t\t\t\t`alluvial-node-text-${datum.index}`\n\t\t\t\t);\n\n\t\t\t\tself.parent\n\t\t\t\t\t.select(`text#${elementID}`)\n\t\t\t\t\t.style('font-weight', 'normal');\n\n\t\t\t\tdebouncedLineHighlight([], 'mouseout');\n\n\t\t\t\t// Dispatch mouse out event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Alluvial.NODE_MOUSEOUT,\n\t\t\t\t\t{\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\telement: hoveredElement,\n\t\t\t\t\t\tdatum,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Dispatch hide tooltip event\n\t\t\t\tself.services.events.dispatchEvent(Events.Tooltip.HIDE, {\n\t\t\t\t\thoveredElement,\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\t// Traverse graph and get all connected links to node\n\tprivate traverse(\n\t\tdirection:\n\t\t\t| { link: 'sourceLinks'; node: 'target' }\n\t\t\t| { link: 'targetLinks'; node: 'source' },\n\t\tnode,\n\t\tvisited = []\n\t) {\n\t\tconst links = node[direction.link].map((element) => {\n\t\t\tvisited.push(element.index);\n\t\t\treturn element[direction.node];\n\t\t});\n\n\t\t// Retrieve the child nodes\n\t\tlinks.forEach((element) => this.traverse(direction, element, visited));\n\t}\n\n\tgetRightArrowIcon() {\n\t\treturn `\n\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\">\n\t\t\t<polygon points=\"18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6\"/>\n\t\t\t<rect data-name=\"<Transparent Rectangle>\" style=\"fill: none;\" width=\"32\" height=\"32\"/>\n\t\t</svg>`;\n\t}\n\n\t// Remove event listeners\n\tdestroy() {\n\t\tthis.parent\n\t\t\t.selectAll('path.line,.node-group')\n\t\t\t.on('mouseover', null)\n\t\t\t.on('mousemove', null)\n\t\t\t.on('click', null)\n\t\t\t.on('mouseout', null);\n\t}\n}\n"]}
|
package/demo/data/alluvial.d.ts
CHANGED
|
@@ -6,12 +6,12 @@ export declare const alluvialSimpleData: {
|
|
|
6
6
|
export declare const alluvialSimpleOptions: {
|
|
7
7
|
title: string;
|
|
8
8
|
alluvial: {
|
|
9
|
-
units: string;
|
|
10
9
|
nodes: {
|
|
11
10
|
name: string;
|
|
12
11
|
category: string;
|
|
13
12
|
}[];
|
|
14
13
|
};
|
|
14
|
+
height: string;
|
|
15
15
|
};
|
|
16
16
|
export declare const alluvialSimpleCustomColorOptions: {
|
|
17
17
|
title: string;
|
|
@@ -23,12 +23,44 @@ export declare const alluvialSimpleCustomColorOptions: {
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
alluvial: {
|
|
26
|
-
units: string;
|
|
27
26
|
nodes: {
|
|
28
27
|
name: string;
|
|
29
28
|
category: string;
|
|
30
29
|
}[];
|
|
31
30
|
};
|
|
31
|
+
height: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const alluvialGradientData: {
|
|
34
|
+
source: string;
|
|
35
|
+
target: string;
|
|
36
|
+
value: number;
|
|
37
|
+
}[];
|
|
38
|
+
export declare const alluvialSimpleGradientOptions: {
|
|
39
|
+
title: string;
|
|
40
|
+
color: {
|
|
41
|
+
scale: {
|
|
42
|
+
Cards: string;
|
|
43
|
+
'About Modal': string;
|
|
44
|
+
'Create Flow': string;
|
|
45
|
+
'Page Header': string;
|
|
46
|
+
Notifications: string;
|
|
47
|
+
'Data and AI, AI Apps': string;
|
|
48
|
+
'Data and AI, Info Architecture': string;
|
|
49
|
+
Security: string;
|
|
50
|
+
Automation: string;
|
|
51
|
+
'Public Cloud': string;
|
|
52
|
+
};
|
|
53
|
+
gradient: {
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
alluvial: {
|
|
58
|
+
nodes: {
|
|
59
|
+
name: string;
|
|
60
|
+
category: string;
|
|
61
|
+
}[];
|
|
62
|
+
};
|
|
63
|
+
height: string;
|
|
32
64
|
};
|
|
33
65
|
export declare const alluvialMultipleCategoryOptions: {
|
|
34
66
|
title: string;
|
package/demo/data/alluvial.js
CHANGED
|
@@ -10,29 +10,159 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
export var alluvialSimpleData = [
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
{
|
|
14
|
+
source: 'About Modal',
|
|
15
|
+
target: 'Data and AI, AI Apps',
|
|
16
|
+
value: 5,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
source: 'About Modal',
|
|
20
|
+
target: 'Data and AI, Info Architecture',
|
|
21
|
+
value: 4,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
source: 'About Modal',
|
|
25
|
+
target: 'Public Cloud',
|
|
26
|
+
value: 3,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
source: 'About Modal',
|
|
30
|
+
target: 'Security',
|
|
31
|
+
value: 4,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
source: 'About Modal',
|
|
35
|
+
target: 'Automation',
|
|
36
|
+
value: 8,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
source: 'Cards',
|
|
40
|
+
target: 'Data and AI, AI Apps',
|
|
41
|
+
value: 6,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
source: 'Cards',
|
|
45
|
+
target: 'Data and AI, Info Architecture',
|
|
46
|
+
value: 15,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
source: 'Cards',
|
|
50
|
+
target: 'Public Cloud',
|
|
51
|
+
value: 2,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
source: 'Cards',
|
|
55
|
+
target: 'Security',
|
|
56
|
+
value: 10,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
source: 'Cards',
|
|
60
|
+
target: 'Automation',
|
|
61
|
+
value: 13,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
source: 'Create Flow',
|
|
65
|
+
target: 'Data and AI, AI Apps',
|
|
66
|
+
value: 2,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
source: 'Create Flow',
|
|
70
|
+
target: 'Data and AI, Info Architecture',
|
|
71
|
+
value: 15,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
source: 'Create Flow',
|
|
75
|
+
target: 'Public Cloud',
|
|
76
|
+
value: 1,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
source: 'Create Flow',
|
|
80
|
+
target: 'Security',
|
|
81
|
+
value: 6,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
source: 'Create Flow',
|
|
85
|
+
target: 'Automation',
|
|
86
|
+
value: 15,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
source: 'Notifications',
|
|
90
|
+
target: 'Data and AI, Info Architecture',
|
|
91
|
+
value: 14,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
source: 'Notifications',
|
|
95
|
+
target: 'Public Cloud',
|
|
96
|
+
value: 3,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
source: 'Notifications',
|
|
100
|
+
target: 'Security',
|
|
101
|
+
value: 3,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
source: 'Page Header',
|
|
105
|
+
target: 'Data and AI, AI Apps',
|
|
106
|
+
value: 4,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
source: 'Page Header',
|
|
110
|
+
target: 'Data and AI, Info Architecture',
|
|
111
|
+
value: 8,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
source: 'Page Header',
|
|
115
|
+
target: 'Automation',
|
|
116
|
+
value: 13,
|
|
117
|
+
},
|
|
22
118
|
];
|
|
23
119
|
export var alluvialSimpleOptions = {
|
|
24
120
|
title: 'Alluvial',
|
|
25
121
|
alluvial: {
|
|
26
|
-
units: 'GB',
|
|
27
122
|
nodes: [
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
|
|
123
|
+
{
|
|
124
|
+
name: 'About Modal',
|
|
125
|
+
category: 'Pattern',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'Cards',
|
|
129
|
+
category: 'Pattern',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'Create Flow',
|
|
133
|
+
category: 'Pattern',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'Page Header',
|
|
137
|
+
category: 'Pattern',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'Notifications',
|
|
141
|
+
category: 'Pattern',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'Data and AI, AI Apps',
|
|
145
|
+
category: 'Group',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'Data and AI, Info Architecture',
|
|
149
|
+
category: 'Group',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'Public Cloud',
|
|
153
|
+
category: 'Group',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: 'Security',
|
|
157
|
+
category: 'Group',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'Automation',
|
|
161
|
+
category: 'Group',
|
|
162
|
+
},
|
|
34
163
|
],
|
|
35
164
|
},
|
|
165
|
+
height: '600px',
|
|
36
166
|
};
|
|
37
167
|
export var alluvialSimpleCustomColorOptions = __assign(__assign({}, alluvialSimpleOptions), { title: 'Custom colors (alluvial)', color: {
|
|
38
168
|
scale: {
|
|
@@ -41,6 +171,24 @@ export var alluvialSimpleCustomColorOptions = __assign(__assign({}, alluvialSimp
|
|
|
41
171
|
C: '#6fdc8c',
|
|
42
172
|
},
|
|
43
173
|
} });
|
|
174
|
+
export var alluvialGradientData = alluvialSimpleData;
|
|
175
|
+
export var alluvialSimpleGradientOptions = __assign(__assign({}, alluvialSimpleOptions), { title: 'Alluvial (gradient)', color: {
|
|
176
|
+
scale: {
|
|
177
|
+
Cards: '#da1e28',
|
|
178
|
+
'About Modal': '#b28600',
|
|
179
|
+
'Create Flow': '#198038',
|
|
180
|
+
'Page Header': '#ee538b',
|
|
181
|
+
Notifications: '#08bdba',
|
|
182
|
+
'Data and AI, AI Apps': '#1192e8',
|
|
183
|
+
'Data and AI, Info Architecture': '#a56eff',
|
|
184
|
+
Security: '#009d9a',
|
|
185
|
+
Automation: '#fa4d56',
|
|
186
|
+
'Public Cloud': '#198038',
|
|
187
|
+
},
|
|
188
|
+
gradient: {
|
|
189
|
+
enabled: true,
|
|
190
|
+
},
|
|
191
|
+
} });
|
|
44
192
|
export var alluvialMultipleCategoryOptions = {
|
|
45
193
|
title: 'Alluvial (multiple categories)',
|
|
46
194
|
alluvial: {
|
|
@@ -129,7 +277,17 @@ export var alluvialMultipleCategoryData = [
|
|
|
129
277
|
value: 120,
|
|
130
278
|
},
|
|
131
279
|
];
|
|
132
|
-
export var alluvialMonochromeData =
|
|
280
|
+
export var alluvialMonochromeData = [
|
|
281
|
+
{ source: 'A', target: 'X', value: 3 },
|
|
282
|
+
{ source: 'A', target: 'Y', value: 5 },
|
|
283
|
+
{ source: 'A', target: 'Z', value: 8 },
|
|
284
|
+
{ source: 'B', target: 'X', value: 6 },
|
|
285
|
+
{ source: 'B', target: 'Y', value: 1 },
|
|
286
|
+
{ source: 'B', target: 'Z', value: 7 },
|
|
287
|
+
{ source: 'C', target: 'X', value: 5 },
|
|
288
|
+
{ source: 'C', target: 'Y', value: 5 },
|
|
289
|
+
{ source: 'C', target: 'Z', value: 1 },
|
|
290
|
+
];
|
|
133
291
|
export var alluvialMonochromeOptions = {
|
|
134
292
|
title: 'Alluvial (monochrome with custom node padding)',
|
|
135
293
|
alluvial: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alluvial.js","sourceRoot":"","sources":["alluvial.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,CAAC,IAAM,kBAAkB,GAAG;IACjC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;CACtC,CAAC;AAEF,MAAM,CAAC,IAAM,qBAAqB,GAAG;IACpC,KAAK,EAAE,UAAU;IACjB,QAAQ,EAAE;QAC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AAC;AAEF,MAAM,CAAC,IAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAEzD,MAAM,CAAC,IAAM,yBAAyB,GAAG;IACxC,KAAK,EAAE,gDAAgD;IACvD,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE;YAChC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE;YAChC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE;YAChC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE;YACjC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE;YACjC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE;SACjC;QACD,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,EAAE;KACf;CACD,CAAC","sourcesContent":["export const alluvialSimpleData = [\n\t{ source: 'A', target: 'X', value: 3 },\n\t{ source: 'A', target: 'Y', value: 5 },\n\t{ source: 'A', target: 'Z', value: 8 },\n\t{ source: 'B', target: 'X', value: 6 },\n\t{ source: 'B', target: 'Y', value: 1 },\n\t{ source: 'B', target: 'Z', value: 7 },\n\t{ source: 'C', target: 'X', value: 5 },\n\t{ source: 'C', target: 'Y', value: 5 },\n\t{ source: 'C', target: 'Z', value: 1 },\n];\n\nexport const alluvialSimpleOptions = {\n\ttitle: 'Alluvial',\n\talluvial: {\n\t\tunits: 'GB',\n\t\tnodes: [\n\t\t\t{ name: 'A', category: 'Start' },\n\t\t\t{ name: 'B', category: 'Start' },\n\t\t\t{ name: 'C', category: 'Start' },\n\t\t\t{ name: 'X', category: 'Finish' },\n\t\t\t{ name: 'Y', category: 'Finish' },\n\t\t\t{ name: 'Z', category: 'Finish' },\n\t\t],\n\t},\n};\n\nexport const alluvialSimpleCustomColorOptions = {\n\t...alluvialSimpleOptions,\n\ttitle: 'Custom colors (alluvial)',\n\tcolor: {\n\t\tscale: {\n\t\t\tA: '#d12771',\n\t\t\tB: '#08bdba',\n\t\t\tC: '#6fdc8c',\n\t\t},\n\t},\n};\n\nexport const alluvialMultipleCategoryOptions = {\n\ttitle: 'Alluvial (multiple categories)',\n\talluvial: {\n\t\tnodes: [\n\t\t\t{ name: '1st', category: 'Class' },\n\t\t\t{ name: '2nd', category: 'Class' },\n\t\t\t{ name: 'Crew', category: 'Class' },\n\t\t\t{ name: 'Male', category: 'Sex' },\n\t\t\t{ name: 'Female', category: 'Sex' },\n\t\t\t{ name: 'Child', category: 'Age' },\n\t\t\t{ name: 'Adult', category: 'Age' },\n\t\t\t{ name: 'Yes', category: 'Survived' },\n\t\t\t{ name: 'No', category: 'Survived' },\n\t\t],\n\t},\n};\n\nexport const alluvialMultipleCategoryData = [\n\t{\n\t\tsource: '1st',\n\t\ttarget: 'Female',\n\t\tvalue: 25,\n\t},\n\t{\n\t\tsource: '1st',\n\t\ttarget: 'Male',\n\t\tvalue: 35,\n\t},\n\t{\n\t\tsource: '2nd',\n\t\ttarget: 'Female',\n\t\tvalue: 35,\n\t},\n\t{\n\t\tsource: '2nd',\n\t\ttarget: 'Male',\n\t\tvalue: 50,\n\t},\n\t{\n\t\tsource: 'Crew',\n\t\ttarget: 'Male',\n\t\tvalue: 43,\n\t},\n\t{\n\t\tsource: 'Crew',\n\t\ttarget: 'Female',\n\t\tvalue: 18,\n\t},\n\t{\n\t\tsource: 'Male',\n\t\ttarget: 'Child',\n\t\tvalue: 38,\n\t},\n\t{\n\t\tsource: 'Male',\n\t\ttarget: 'Adult',\n\t\tvalue: 90,\n\t},\n\t{\n\t\tsource: 'Female',\n\t\ttarget: 'Adult',\n\t\tvalue: 52,\n\t},\n\t{\n\t\tsource: 'Female',\n\t\ttarget: 'Child',\n\t\tvalue: 26,\n\t},\n\t{\n\t\tsource: 'Child',\n\t\ttarget: 'Yes',\n\t\tvalue: 58,\n\t},\n\t{\n\t\tsource: 'Child',\n\t\ttarget: 'No',\n\t\tvalue: 6,\n\t},\n\t{\n\t\tsource: 'Adult',\n\t\ttarget: 'Yes',\n\t\tvalue: 22,\n\t},\n\t{\n\t\tsource: 'Adult',\n\t\ttarget: 'No',\n\t\tvalue: 120,\n\t},\n];\n\nexport const alluvialMonochromeData = alluvialSimpleData;\n\nexport const alluvialMonochromeOptions = {\n\ttitle: 'Alluvial (monochrome with custom node padding)',\n\talluvial: {\n\t\tnodes: [\n\t\t\t{ name: 'A', category: 'Start' },\n\t\t\t{ name: 'B', category: 'Start' },\n\t\t\t{ name: 'C', category: 'Start' },\n\t\t\t{ name: 'X', category: 'Finish' },\n\t\t\t{ name: 'Y', category: 'Finish' },\n\t\t\t{ name: 'Z', category: 'Finish' },\n\t\t],\n\t\tmonochrome: true,\n\t\tnodePadding: 33,\n\t},\n};\n"]}
|
|
1
|
+
{"version":3,"file":"alluvial.js","sourceRoot":"","sources":["alluvial.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,CAAC,IAAM,kBAAkB,GAAG;IACjC;QACC,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,sBAAsB;QAC9B,KAAK,EAAE,CAAC;KACR;IACD;QACC,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,gCAAgC;QACxC,KAAK,EAAE,CAAC;KACR;IACD;QACC,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,cAAc;QACtB,KAAK,EAAE,CAAC;KACR;IACD;QACC,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,CAAC;KACR;IACD;QACC,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,YAAY;QACpB,KAAK,EAAE,CAAC;KACR;IACD;QACC,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,sBAAsB;QAC9B,KAAK,EAAE,CAAC;KACR;IACD;QACC,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,gCAAgC;QACxC,KAAK,EAAE,EAAE;KACT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AM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IACtC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;CACtC,CAAC;AAEF,MAAM,CAAC,IAAM,yBAAyB,GAAG;IACxC,KAAK,EAAE,gDAAgD;IACvD,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE;YAChC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE;YAChC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE;YAChC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE;YACjC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE;YACjC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE;SACjC;QACD,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,EAAE;KACf;CACD,CAAC","sourcesContent":["export const alluvialSimpleData = [\n\t{\n\t\tsource: 'About Modal',\n\t\ttarget: 'Data and AI, AI Apps',\n\t\tvalue: 5,\n\t},\n\t{\n\t\tsource: 'About Modal',\n\t\ttarget: 'Data and AI, Info Architecture',\n\t\tvalue: 4,\n\t},\n\t{\n\t\tsource: 'About Modal',\n\t\ttarget: 'Public Cloud',\n\t\tvalue: 3,\n\t},\n\t{\n\t\tsource: 'About Modal',\n\t\ttarget: 'Security',\n\t\tvalue: 4,\n\t},\n\t{\n\t\tsource: 'About Modal',\n\t\ttarget: 'Automation',\n\t\tvalue: 8,\n\t},\n\t{\n\t\tsource: 'Cards',\n\t\ttarget: 'Data and AI, AI Apps',\n\t\tvalue: 6,\n\t},\n\t{\n\t\tsource: 'Cards',\n\t\ttarget: 'Data and AI, Info Architecture',\n\t\tvalue: 15,\n\t},\n\t{\n\t\tsource: 'Cards',\n\t\ttarget: 'Public Cloud',\n\t\tvalue: 2,\n\t},\n\t{\n\t\tsource: 'Cards',\n\t\ttarget: 'Security',\n\t\tvalue: 10,\n\t},\n\t{\n\t\tsource: 'Cards',\n\t\ttarget: 'Automation',\n\t\tvalue: 13,\n\t},\n\t{\n\t\tsource: 'Create Flow',\n\t\ttarget: 'Data and AI, AI Apps',\n\t\tvalue: 2,\n\t},\n\t{\n\t\tsource: 'Create Flow',\n\t\ttarget: 'Data and AI, Info Architecture',\n\t\tvalue: 15,\n\t},\n\t{\n\t\tsource: 'Create Flow',\n\t\ttarget: 'Public Cloud',\n\t\tvalue: 1,\n\t},\n\t{\n\t\tsource: 'Create Flow',\n\t\ttarget: 'Security',\n\t\tvalue: 6,\n\t},\n\t{\n\t\tsource: 'Create Flow',\n\t\ttarget: 'Automation',\n\t\tvalue: 15,\n\t},\n\t{\n\t\tsource: 'Notifications',\n\t\ttarget: 'Data and AI, Info Architecture',\n\t\tvalue: 14,\n\t},\n\t{\n\t\tsource: 'Notifications',\n\t\ttarget: 'Public Cloud',\n\t\tvalue: 3,\n\t},\n\t{\n\t\tsource: 'Notifications',\n\t\ttarget: 'Security',\n\t\tvalue: 3,\n\t},\n\t{\n\t\tsource: 'Page Header',\n\t\ttarget: 'Data and AI, AI Apps',\n\t\tvalue: 4,\n\t},\n\t{\n\t\tsource: 'Page Header',\n\t\ttarget: 'Data and AI, Info Architecture',\n\t\tvalue: 8,\n\t},\n\t{\n\t\tsource: 'Page Header',\n\t\ttarget: 'Automation',\n\t\tvalue: 13,\n\t},\n];\n\nexport const alluvialSimpleOptions = {\n\ttitle: 'Alluvial',\n\talluvial: {\n\t\tnodes: [\n\t\t\t{\n\t\t\t\tname: 'About Modal',\n\t\t\t\tcategory: 'Pattern',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Cards',\n\t\t\t\tcategory: 'Pattern',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Create Flow',\n\t\t\t\tcategory: 'Pattern',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Page Header',\n\t\t\t\tcategory: 'Pattern',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Notifications',\n\t\t\t\tcategory: 'Pattern',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Data and AI, AI Apps',\n\t\t\t\tcategory: 'Group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Data and AI, Info Architecture',\n\t\t\t\tcategory: 'Group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Public Cloud',\n\t\t\t\tcategory: 'Group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Security',\n\t\t\t\tcategory: 'Group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Automation',\n\t\t\t\tcategory: 'Group',\n\t\t\t},\n\t\t],\n\t},\n\theight: '600px',\n};\n\nexport const alluvialSimpleCustomColorOptions = {\n\t...alluvialSimpleOptions,\n\ttitle: 'Custom colors (alluvial)',\n\tcolor: {\n\t\tscale: {\n\t\t\tA: '#d12771',\n\t\t\tB: '#08bdba',\n\t\t\tC: '#6fdc8c',\n\t\t},\n\t},\n};\n\nexport const alluvialGradientData = alluvialSimpleData;\n\nexport const alluvialSimpleGradientOptions = {\n\t...alluvialSimpleOptions,\n\ttitle: 'Alluvial (gradient)',\n\tcolor: {\n\t\tscale: {\n\t\t\tCards: '#da1e28',\n\t\t\t'About Modal': '#b28600',\n\t\t\t'Create Flow': '#198038',\n\t\t\t'Page Header': '#ee538b',\n\t\t\tNotifications: '#08bdba',\n\t\t\t'Data and AI, AI Apps': '#1192e8',\n\t\t\t'Data and AI, Info Architecture': '#a56eff',\n\t\t\tSecurity: '#009d9a',\n\t\t\tAutomation: '#fa4d56',\n\t\t\t'Public Cloud': '#198038',\n\t\t},\n\t\tgradient: {\n\t\t\tenabled: true,\n\t\t},\n\t},\n};\n\nexport const alluvialMultipleCategoryOptions = {\n\ttitle: 'Alluvial (multiple categories)',\n\talluvial: {\n\t\tnodes: [\n\t\t\t{ name: '1st', category: 'Class' },\n\t\t\t{ name: '2nd', category: 'Class' },\n\t\t\t{ name: 'Crew', category: 'Class' },\n\t\t\t{ name: 'Male', category: 'Sex' },\n\t\t\t{ name: 'Female', category: 'Sex' },\n\t\t\t{ name: 'Child', category: 'Age' },\n\t\t\t{ name: 'Adult', category: 'Age' },\n\t\t\t{ name: 'Yes', category: 'Survived' },\n\t\t\t{ name: 'No', category: 'Survived' },\n\t\t],\n\t},\n};\n\nexport const alluvialMultipleCategoryData = [\n\t{\n\t\tsource: '1st',\n\t\ttarget: 'Female',\n\t\tvalue: 25,\n\t},\n\t{\n\t\tsource: '1st',\n\t\ttarget: 'Male',\n\t\tvalue: 35,\n\t},\n\t{\n\t\tsource: '2nd',\n\t\ttarget: 'Female',\n\t\tvalue: 35,\n\t},\n\t{\n\t\tsource: '2nd',\n\t\ttarget: 'Male',\n\t\tvalue: 50,\n\t},\n\t{\n\t\tsource: 'Crew',\n\t\ttarget: 'Male',\n\t\tvalue: 43,\n\t},\n\t{\n\t\tsource: 'Crew',\n\t\ttarget: 'Female',\n\t\tvalue: 18,\n\t},\n\t{\n\t\tsource: 'Male',\n\t\ttarget: 'Child',\n\t\tvalue: 38,\n\t},\n\t{\n\t\tsource: 'Male',\n\t\ttarget: 'Adult',\n\t\tvalue: 90,\n\t},\n\t{\n\t\tsource: 'Female',\n\t\ttarget: 'Adult',\n\t\tvalue: 52,\n\t},\n\t{\n\t\tsource: 'Female',\n\t\ttarget: 'Child',\n\t\tvalue: 26,\n\t},\n\t{\n\t\tsource: 'Child',\n\t\ttarget: 'Yes',\n\t\tvalue: 58,\n\t},\n\t{\n\t\tsource: 'Child',\n\t\ttarget: 'No',\n\t\tvalue: 6,\n\t},\n\t{\n\t\tsource: 'Adult',\n\t\ttarget: 'Yes',\n\t\tvalue: 22,\n\t},\n\t{\n\t\tsource: 'Adult',\n\t\ttarget: 'No',\n\t\tvalue: 120,\n\t},\n];\n\nexport const alluvialMonochromeData = [\n\t{ source: 'A', target: 'X', value: 3 },\n\t{ source: 'A', target: 'Y', value: 5 },\n\t{ source: 'A', target: 'Z', value: 8 },\n\t{ source: 'B', target: 'X', value: 6 },\n\t{ source: 'B', target: 'Y', value: 1 },\n\t{ source: 'B', target: 'Z', value: 7 },\n\t{ source: 'C', target: 'X', value: 5 },\n\t{ source: 'C', target: 'Y', value: 5 },\n\t{ source: 'C', target: 'Z', value: 1 },\n];\n\nexport const alluvialMonochromeOptions = {\n\ttitle: 'Alluvial (monochrome with custom node padding)',\n\talluvial: {\n\t\tnodes: [\n\t\t\t{ name: 'A', category: 'Start' },\n\t\t\t{ name: 'B', category: 'Start' },\n\t\t\t{ name: 'C', category: 'Start' },\n\t\t\t{ name: 'X', category: 'Finish' },\n\t\t\t{ name: 'Y', category: 'Finish' },\n\t\t\t{ name: 'Z', category: 'Finish' },\n\t\t],\n\t\tmonochrome: true,\n\t\tnodePadding: 33,\n\t},\n};\n"]}
|