@carbon/charts 0.54.8 → 0.54.12
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 +41 -0
- package/build/src/interfaces/charts.d.ts +1 -0
- package/build/src/interfaces/components.d.ts +1 -0
- package/bundle.js +1 -1
- package/charts/meter.js +40 -21
- package/charts/meter.js.map +1 -1
- package/components/graphs/bar-stacked.js +2 -1
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.js +3 -1
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/radar.js +6 -5
- package/components/graphs/radar.js.map +1 -1
- package/components/graphs/treemap.js +0 -4
- package/components/graphs/treemap.js.map +1 -1
- package/configuration.js +2 -0
- package/configuration.js.map +1 -1
- package/interfaces/charts.d.ts +1 -0
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +1 -0
- package/interfaces/components.js.map +1 -1
- package/model/treemap.js +10 -3
- package/model/treemap.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +13 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treemap.js","sourceRoot":"","sources":["treemap.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,aAAa;AACb,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,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A,KAAK,CAAC,MAAM,EAAE,UAAC,CAAM;gBACrB,OAAA,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;YAA3C,CAA2C,CAC3C,CAAC;YAEH,uBAAuB;YACvB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CACjC,MAAM,CAAC,OAAO,CAAC,aAAa,EAC5B;gBACC,KAAK,OAAA;gBACL,OAAO,EAAE,cAAc;gBACvB,KAAK,OAAA;aACL,CACD,CAAC;YAEF,eAAe;YACf,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE;gBACvD,cAAc,gBAAA;aACd,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IA+BF,cAAC;AAAD,CAAC,AArWD,CAA6B,SAAS,GAqWrC","sourcesContent":["// Internal Imports\nimport { Component } from '../component';\nimport { DOMUtils } from '../../services';\nimport { Events, ColorClassNameTypes, RenderTypes } from '../../interfaces';\nimport { Tools } from '../../tools';\n\n// D3 Imports\nimport { hierarchy as d3Hierarchy, treemap as d3Treemap } from 'd3-hierarchy';\nimport { sum } from 'd3-array';\nimport { hsl, color } from 'd3-color';\nimport { select } from 'd3-selection';\n\n// Carbon colors\nimport { colors } from '@carbon/colors';\n\nconst findColorShade = (hex) => {\n\tif (!hex) {\n\t\treturn null;\n\t}\n\n\tfor (let colorName of Object.keys(colors)) {\n\t\tconst colorShades = colors[colorName];\n\n\t\tfor (let colorShadeLevel of Object.keys(colorShades)) {\n\t\t\tconst colorShade = colorShades[colorShadeLevel];\n\n\t\t\tif (colorShade === hex) {\n\t\t\t\treturn colorShadeLevel;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n};\n\nconst textFillColor = function () {\n\tconst correspondingLeaf = select(this.parentNode).select(\n\t\t'rect.leaf'\n\t) as any;\n\tconst correspondingLeafFill = getComputedStyle(\n\t\tcorrespondingLeaf.node(),\n\t\tnull\n\t).getPropertyValue('fill');\n\tconst cl = color(correspondingLeafFill) as any;\n\n\tlet colorShade;\n\tif (cl) {\n\t\tcolorShade = findColorShade(cl ? cl.hex() : null);\n\t}\n\n\tif (colorShade === null || colorShade === undefined) {\n\t\tconst lightness = hsl(cl).l;\n\t\tcolorShade = Math.abs(lightness * 100 - 100);\n\t}\n\n\treturn colorShade > 50 ? 'white' : 'black';\n};\n\nlet uidCounter = 0;\nexport class Treemap extends Component {\n\ttype = 'treemap';\n\trenderType = RenderTypes.SVG;\n\n\tinit() {\n\t\tconst { events } = this.services;\n\t\t// Highlight correct circle on legend item hovers\n\t\tevents.addEventListener(\n\t\t\tEvents.Legend.ITEM_HOVER,\n\t\t\tthis.handleLegendOnHover\n\t\t);\n\t\t// Un-highlight circles on legend item mouseouts\n\t\tevents.addEventListener(\n\t\t\tEvents.Legend.ITEM_MOUSEOUT,\n\t\t\tthis.handleLegendMouseOut\n\t\t);\n\t}\n\n\trender(animate = true) {\n\t\tconst svg = this.getComponentContainer();\n\n\t\tconst allData = this.model.getData();\n\t\tconst displayData = this.model.getDisplayData();\n\t\tconst options = this.model.getOptions();\n\n\t\tconst windowLocation = Tools.getProperty(window, 'location');\n\n\t\tconst { width, height } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\tconst hierarchy = d3Hierarchy({\n\t\t\tname: options.title || 'Treemap',\n\t\t\tchildren: displayData,\n\t\t})\n\t\t\t.sum((d: any) => d.value)\n\t\t\t.sort((a, b) => b.value - a.value);\n\n\t\tconst total = sum(allData, (d: any) =>\n\t\t\tsum(d.children, (child: any) => child.value)\n\t\t);\n\n\t\tconst root = d3Treemap()\n\t\t\t.size([width, height])\n\t\t\t.paddingInner(1)\n\t\t\t.paddingOuter(0)\n\t\t\t.round(true)(hierarchy);\n\t\tconst { transitions } = this.services;\n\n\t\tconst leafGroups = svg\n\t\t\t.selectAll(\"g[data-name='leaf']\")\n\t\t\t.data(root.leaves(), (leaf) => leaf.data.name);\n\n\t\t// Remove leaf groups that need to be removed\n\t\tleafGroups.exit().attr('opacity', 0).remove();\n\n\t\t// Add the leaf groups that need to be introduced\n\t\tconst enteringLeafGroups = leafGroups\n\t\t\t.enter()\n\t\t\t.append('g')\n\t\t\t.attr('data-name', 'leaf')\n\t\t\t.attr('data-uid', () => uidCounter++);\n\n\t\tconst allLeafGroups = enteringLeafGroups.merge(leafGroups);\n\n\t\tallLeafGroups\n\t\t\t.attr('data-name', 'leaf')\n\t\t\t.transition()\n\t\t\t.call((t) =>\n\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\ttransition: t,\n\t\t\t\t\tname: 'treemap-group-update',\n\t\t\t\t\tanimate,\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attr('transform', (d) => `translate(${d.x0},${d.y0})`);\n\n\t\tconst rects = allLeafGroups.selectAll('rect.leaf').data((d) => [d]);\n\n\t\trects.exit().attr('width', 0).attr('height', 0).remove();\n\n\t\tconst enteringRects = rects\n\t\t\t.enter()\n\t\t\t.append('rect')\n\t\t\t.classed('leaf', true);\n\n\t\tenteringRects\n\t\t\t.merge(rects)\n\t\t\t.attr('width', 0)\n\t\t\t.attr('height', 0)\n\t\t\t.attr('id', function () {\n\t\t\t\tconst uid = select(this.parentNode).attr('data-uid');\n\t\t\t\treturn `${options.style.prefix}-leaf-${uid}`;\n\t\t\t})\n\t\t\t.attr('class', (d) => {\n\t\t\t\twhile (d.depth > 1) d = d.parent;\n\n\t\t\t\treturn this.model.getColorClassName({\n\t\t\t\t\tclassNameTypes: [ColorClassNameTypes.FILL],\n\t\t\t\t\tdataGroupName: d.data.name,\n\t\t\t\t\toriginalClassName: 'leaf',\n\t\t\t\t});\n\t\t\t})\n\t\t\t.transition()\n\t\t\t.call((t) =>\n\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\ttransition: t,\n\t\t\t\t\tname: 'treemap-leaf-update-enter',\n\t\t\t\t\tanimate,\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attr('width', (d) => d.x1 - d.x0)\n\t\t\t.attr('height', (d) => d.y1 - d.y0)\n\t\t\t.style('fill', (d) => {\n\t\t\t\twhile (d.depth > 1) d = d.parent;\n\t\t\t\treturn this.model.getFillColor(d.data.name);\n\t\t\t});\n\n\t\t// Update all clip paths\n\t\tallLeafGroups\n\t\t\t.selectAll('clipPath')\n\t\t\t.data(\n\t\t\t\t(d) => {\n\t\t\t\t\tif (d.data.showLabel !== true) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn [1];\n\t\t\t\t},\n\t\t\t\t(d) => d\n\t\t\t)\n\t\t\t.join(\n\t\t\t\t(enter) => {\n\t\t\t\t\tenter\n\t\t\t\t\t\t.append('clipPath')\n\t\t\t\t\t\t.attr('id', function () {\n\t\t\t\t\t\t\tconst uid = select(this.parentNode).attr(\n\t\t\t\t\t\t\t\t'data-uid'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn `${options.style.prefix}-clip-${uid}`;\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.append('use')\n\t\t\t\t\t\t.attr('xlink:href', function () {\n\t\t\t\t\t\t\tconst uid = select(this.parentNode.parentNode).attr(\n\t\t\t\t\t\t\t\t'data-uid'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst leafID = `${options.style.prefix}-leaf-${uid}`;\n\n\t\t\t\t\t\t\treturn new URL(`#${leafID}`, windowLocation) + '';\n\t\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t(update) => null,\n\t\t\t\t(exit) => exit.remove()\n\t\t\t);\n\n\t\t// Update all titles\n\t\tallLeafGroups\n\t\t\t.selectAll('text')\n\t\t\t.data(\n\t\t\t\t(d) => {\n\t\t\t\t\tif (d.data.showLabel !== true) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\tlet parent = d;\n\t\t\t\t\twhile (parent.depth > 1) parent = parent.parent;\n\t\t\t\t\tconst color = hsl(\n\t\t\t\t\t\tthis.model.getFillColor(parent.data.name)\n\t\t\t\t\t);\n\t\t\t\t\treturn [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: d.data.name,\n\t\t\t\t\t\t\tcolor: color.l < 0.5 ? 'white' : 'black',\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t},\n\t\t\t\t(d) => d\n\t\t\t)\n\t\t\t.join(\n\t\t\t\t(enter) => {\n\t\t\t\t\tconst addedText = enter\n\t\t\t\t\t\t.append('text')\n\t\t\t\t\t\t.text((d) => d.text)\n\t\t\t\t\t\t.style('fill', textFillColor)\n\t\t\t\t\t\t.attr('x', 7)\n\t\t\t\t\t\t.attr('y', 18);\n\n\t\t\t\t\tif (windowLocation) {\n\t\t\t\t\t\taddedText.attr('clip-path', function () {\n\t\t\t\t\t\t\tconst uid = select(this.parentNode).attr(\n\t\t\t\t\t\t\t\t'data-uid'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst clipPathID = `${options.style.prefix}-clip-${uid}`;\n\n\t\t\t\t\t\t\treturn `url(${\n\t\t\t\t\t\t\t\tnew URL(`#${clipPathID}`, windowLocation) + ''\n\t\t\t\t\t\t\t})`;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t(update) =>\n\t\t\t\t\tupdate.text((d) => d.text).style('fill', textFillColor),\n\t\t\t\t(exit) => exit.remove()\n\t\t\t);\n\n\t\t// Add event listeners to elements drawn\n\t\tthis.addEventListeners();\n\t}\n\n\taddEventListeners() {\n\t\tconst self = this;\n\t\tthis.parent\n\t\t\t.selectAll('rect.leaf')\n\t\t\t.on('mouseover', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\t\t\t\tlet fillColor = getComputedStyle(this, null).getPropertyValue(\n\t\t\t\t\t'fill'\n\t\t\t\t);\n\n\t\t\t\tlet parent = datum;\n\t\t\t\twhile (parent.depth > 1) parent = parent.parent;\n\n\t\t\t\thoveredElement\n\t\t\t\t\t.transition('graph_element_mouseover_fill_update')\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: 'graph_element_mouseover_fill_update',\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.style('fill', (d: any) => {\n\t\t\t\t\t\tconst customColor = self.model.getFillColor(\n\t\t\t\t\t\t\td.parent.data.name\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (customColor) {\n\t\t\t\t\t\t\tfillColor = customColor;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn color(fillColor).darker(0.7).toString();\n\t\t\t\t\t});\n\n\t\t\t\t// Show tooltip\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\tcolor: fillColor,\n\t\t\t\t\t\t\tlabel: parent.data.name,\n\t\t\t\t\t\t\tbold: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: datum.data.name,\n\t\t\t\t\t\t\tvalue: datum.data.value,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t});\n\n\t\t\t\t// Dispatch mouse event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Treemap.LEAF_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\t\t\t})\n\t\t\t.on('mousemove', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\n\t\t\t\t// Dispatch mouse event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Treemap.LEAF_MOUSEMOVE,\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\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 event\n\t\t\t\tself.services.events.dispatchEvent(Events.Treemap.LEAF_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\thoveredElement.classed('hovered', false);\n\n\t\t\t\tlet parent = datum;\n\t\t\t\twhile (parent.depth > 1) parent = parent.parent;\n\n\t\t\t\thoveredElement\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: 'graph_element_mouseout_fill_update',\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.style('fill', (d: any) =>\n\t\t\t\t\t\tself.model.getFillColor(d.parent.data.name)\n\t\t\t\t\t);\n\n\t\t\t\t// Dispatch mouse event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Treemap.LEAF_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// Hide tooltip\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\thandleLegendOnHover = (event: CustomEvent) => {\n\t\tconst { hoveredElement } = event.detail;\n\n\t\tthis.parent\n\t\t\t.selectAll(\"g[data-name='leaf']\")\n\t\t\t.transition('legend-hover-treemap')\n\t\t\t.call((t) =>\n\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\ttransition: t,\n\t\t\t\t\tname: 'legend-hover-treemap',\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attr('opacity', (d) =>\n\t\t\t\td.parent.data.name === hoveredElement.datum()['name'] ? 1 : 0.3\n\t\t\t);\n\t};\n\n\thandleLegendMouseOut = (event: CustomEvent) => {\n\t\tthis.parent\n\t\t\t.selectAll(\"g[data-name='leaf']\")\n\t\t\t.transition('legend-mouseout-treemap')\n\t\t\t.call((t) =>\n\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\ttransition: t,\n\t\t\t\t\tname: 'legend-mouseout-treemap',\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attr('opacity', 1);\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"treemap.js","sourceRoot":"","sources":["treemap.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,aAAa;AACb,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,IAAM,cAAc,GAAG,UAAC,GAAG;IAC1B,IAAI,CAAC,GAAG,EAAE;QACT,OAAO,IAAI,CA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AAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE;gBACvD,cAAc,gBAAA;aACd,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IA+BF,cAAC;AAAD,CAAC,AAjWD,CAA6B,SAAS,GAiWrC","sourcesContent":["// Internal Imports\nimport { Component } from '../component';\nimport { DOMUtils } from '../../services';\nimport { Events, ColorClassNameTypes, RenderTypes } from '../../interfaces';\nimport { Tools } from '../../tools';\n\n// D3 Imports\nimport { hierarchy as d3Hierarchy, treemap as d3Treemap } from 'd3-hierarchy';\nimport { sum } from 'd3-array';\nimport { hsl, color } from 'd3-color';\nimport { select } from 'd3-selection';\n\n// Carbon colors\nimport { colors } from '@carbon/colors';\n\nconst findColorShade = (hex) => {\n\tif (!hex) {\n\t\treturn null;\n\t}\n\n\tfor (let colorName of Object.keys(colors)) {\n\t\tconst colorShades = colors[colorName];\n\n\t\tfor (let colorShadeLevel of Object.keys(colorShades)) {\n\t\t\tconst colorShade = colorShades[colorShadeLevel];\n\n\t\t\tif (colorShade === hex) {\n\t\t\t\treturn colorShadeLevel;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n};\n\nconst textFillColor = function () {\n\tconst correspondingLeaf = select(this.parentNode).select(\n\t\t'rect.leaf'\n\t) as any;\n\tconst correspondingLeafFill = getComputedStyle(\n\t\tcorrespondingLeaf.node(),\n\t\tnull\n\t).getPropertyValue('fill');\n\tconst cl = color(correspondingLeafFill) as any;\n\n\tlet colorShade;\n\tif (cl) {\n\t\tcolorShade = findColorShade(cl ? cl.hex() : null);\n\t}\n\n\tif (colorShade === null || colorShade === undefined) {\n\t\tconst lightness = hsl(cl).l;\n\t\tcolorShade = Math.abs(lightness * 100 - 100);\n\t}\n\n\treturn colorShade > 50 ? 'white' : 'black';\n};\n\nlet uidCounter = 0;\nexport class Treemap extends Component {\n\ttype = 'treemap';\n\trenderType = RenderTypes.SVG;\n\n\tinit() {\n\t\tconst { events } = this.services;\n\t\t// Highlight correct circle on legend item hovers\n\t\tevents.addEventListener(\n\t\t\tEvents.Legend.ITEM_HOVER,\n\t\t\tthis.handleLegendOnHover\n\t\t);\n\t\t// Un-highlight circles on legend item mouseouts\n\t\tevents.addEventListener(\n\t\t\tEvents.Legend.ITEM_MOUSEOUT,\n\t\t\tthis.handleLegendMouseOut\n\t\t);\n\t}\n\n\trender(animate = true) {\n\t\tconst svg = this.getComponentContainer();\n\n\t\tconst allData = this.model.getData();\n\t\tconst displayData = this.model.getDisplayData();\n\t\tconst options = this.model.getOptions();\n\n\t\tconst windowLocation = Tools.getProperty(window, 'location');\n\n\t\tconst { width, height } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\tconst hierarchy = d3Hierarchy({\n\t\t\tname: options.title || 'Treemap',\n\t\t\tchildren: displayData,\n\t\t})\n\t\t\t.sum((d: any) => d.value)\n\t\t\t.sort((a, b) => b.value - a.value);\n\n\t\tconst root = d3Treemap()\n\t\t\t.size([width, height])\n\t\t\t.paddingInner(1)\n\t\t\t.paddingOuter(0)\n\t\t\t.round(true)(hierarchy);\n\t\tconst { transitions } = this.services;\n\n\t\tconst leafGroups = svg\n\t\t\t.selectAll(\"g[data-name='leaf']\")\n\t\t\t.data(root.leaves(), (leaf) => leaf.data.name);\n\n\t\t// Remove leaf groups that need to be removed\n\t\tleafGroups.exit().attr('opacity', 0).remove();\n\n\t\t// Add the leaf groups that need to be introduced\n\t\tconst enteringLeafGroups = leafGroups\n\t\t\t.enter()\n\t\t\t.append('g')\n\t\t\t.attr('data-name', 'leaf')\n\t\t\t.attr('data-uid', () => uidCounter++);\n\n\t\tconst allLeafGroups = enteringLeafGroups.merge(leafGroups);\n\n\t\tallLeafGroups\n\t\t\t.attr('data-name', 'leaf')\n\t\t\t.transition()\n\t\t\t.call((t) =>\n\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\ttransition: t,\n\t\t\t\t\tname: 'treemap-group-update',\n\t\t\t\t\tanimate,\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attr('transform', (d) => `translate(${d.x0},${d.y0})`);\n\n\t\tconst rects = allLeafGroups.selectAll('rect.leaf').data((d) => [d]);\n\n\t\trects.exit().attr('width', 0).attr('height', 0).remove();\n\n\t\tconst enteringRects = rects\n\t\t\t.enter()\n\t\t\t.append('rect')\n\t\t\t.classed('leaf', true);\n\n\t\tenteringRects\n\t\t\t.merge(rects)\n\t\t\t.attr('width', 0)\n\t\t\t.attr('height', 0)\n\t\t\t.attr('id', function () {\n\t\t\t\tconst uid = select(this.parentNode).attr('data-uid');\n\t\t\t\treturn `${options.style.prefix}-leaf-${uid}`;\n\t\t\t})\n\t\t\t.attr('class', (d) => {\n\t\t\t\twhile (d.depth > 1) d = d.parent;\n\n\t\t\t\treturn this.model.getColorClassName({\n\t\t\t\t\tclassNameTypes: [ColorClassNameTypes.FILL],\n\t\t\t\t\tdataGroupName: d.data.name,\n\t\t\t\t\toriginalClassName: 'leaf',\n\t\t\t\t});\n\t\t\t})\n\t\t\t.transition()\n\t\t\t.call((t) =>\n\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\ttransition: t,\n\t\t\t\t\tname: 'treemap-leaf-update-enter',\n\t\t\t\t\tanimate,\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attr('width', (d) => d.x1 - d.x0)\n\t\t\t.attr('height', (d) => d.y1 - d.y0)\n\t\t\t.style('fill', (d) => {\n\t\t\t\twhile (d.depth > 1) d = d.parent;\n\t\t\t\treturn this.model.getFillColor(d.data.name);\n\t\t\t});\n\n\t\t// Update all clip paths\n\t\tallLeafGroups\n\t\t\t.selectAll('clipPath')\n\t\t\t.data(\n\t\t\t\t(d) => {\n\t\t\t\t\tif (d.data.showLabel !== true) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn [1];\n\t\t\t\t},\n\t\t\t\t(d) => d\n\t\t\t)\n\t\t\t.join(\n\t\t\t\t(enter) => {\n\t\t\t\t\tenter\n\t\t\t\t\t\t.append('clipPath')\n\t\t\t\t\t\t.attr('id', function () {\n\t\t\t\t\t\t\tconst uid = select(this.parentNode).attr(\n\t\t\t\t\t\t\t\t'data-uid'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn `${options.style.prefix}-clip-${uid}`;\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.append('use')\n\t\t\t\t\t\t.attr('xlink:href', function () {\n\t\t\t\t\t\t\tconst uid = select(this.parentNode.parentNode).attr(\n\t\t\t\t\t\t\t\t'data-uid'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst leafID = `${options.style.prefix}-leaf-${uid}`;\n\n\t\t\t\t\t\t\treturn new URL(`#${leafID}`, windowLocation) + '';\n\t\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t(update) => null,\n\t\t\t\t(exit) => exit.remove()\n\t\t\t);\n\n\t\t// Update all titles\n\t\tallLeafGroups\n\t\t\t.selectAll('text')\n\t\t\t.data(\n\t\t\t\t(d) => {\n\t\t\t\t\tif (d.data.showLabel !== true) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\tlet parent = d;\n\t\t\t\t\twhile (parent.depth > 1) parent = parent.parent;\n\t\t\t\t\tconst color = hsl(\n\t\t\t\t\t\tthis.model.getFillColor(parent.data.name)\n\t\t\t\t\t);\n\t\t\t\t\treturn [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: d.data.name,\n\t\t\t\t\t\t\tcolor: color.l < 0.5 ? 'white' : 'black',\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t},\n\t\t\t\t(d) => d\n\t\t\t)\n\t\t\t.join(\n\t\t\t\t(enter) => {\n\t\t\t\t\tconst addedText = enter\n\t\t\t\t\t\t.append('text')\n\t\t\t\t\t\t.text((d) => d.text)\n\t\t\t\t\t\t.style('fill', textFillColor)\n\t\t\t\t\t\t.attr('x', 7)\n\t\t\t\t\t\t.attr('y', 18);\n\n\t\t\t\t\tif (windowLocation) {\n\t\t\t\t\t\taddedText.attr('clip-path', function () {\n\t\t\t\t\t\t\tconst uid = select(this.parentNode).attr(\n\t\t\t\t\t\t\t\t'data-uid'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst clipPathID = `${options.style.prefix}-clip-${uid}`;\n\n\t\t\t\t\t\t\treturn `url(${\n\t\t\t\t\t\t\t\tnew URL(`#${clipPathID}`, windowLocation) + ''\n\t\t\t\t\t\t\t})`;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t(update) =>\n\t\t\t\t\tupdate.text((d) => d.text).style('fill', textFillColor),\n\t\t\t\t(exit) => exit.remove()\n\t\t\t);\n\n\t\t// Add event listeners to elements drawn\n\t\tthis.addEventListeners();\n\t}\n\n\taddEventListeners() {\n\t\tconst self = this;\n\t\tthis.parent\n\t\t\t.selectAll('rect.leaf')\n\t\t\t.on('mouseover', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\t\t\t\tlet fillColor = getComputedStyle(this, null).getPropertyValue(\n\t\t\t\t\t'fill'\n\t\t\t\t);\n\n\t\t\t\tlet parent = datum;\n\t\t\t\twhile (parent.depth > 1) parent = parent.parent;\n\n\t\t\t\thoveredElement\n\t\t\t\t\t.transition('graph_element_mouseover_fill_update')\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: 'graph_element_mouseover_fill_update',\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.style('fill', (d: any) => {\n\t\t\t\t\t\tconst customColor = self.model.getFillColor(\n\t\t\t\t\t\t\td.parent.data.name\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (customColor) {\n\t\t\t\t\t\t\tfillColor = customColor;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn color(fillColor).darker(0.7).toString();\n\t\t\t\t\t});\n\n\t\t\t\t// Show tooltip\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\tcolor: fillColor,\n\t\t\t\t\t\t\tlabel: parent.data.name,\n\t\t\t\t\t\t\tbold: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: datum.data.name,\n\t\t\t\t\t\t\tvalue: datum.data.value,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t});\n\n\t\t\t\t// Dispatch mouse event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Treemap.LEAF_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\t\t\t})\n\t\t\t.on('mousemove', function (event, datum) {\n\t\t\t\tconst hoveredElement = select(this);\n\n\t\t\t\t// Dispatch mouse event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Treemap.LEAF_MOUSEMOVE,\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\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 event\n\t\t\t\tself.services.events.dispatchEvent(Events.Treemap.LEAF_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\thoveredElement.classed('hovered', false);\n\n\t\t\t\tlet parent = datum;\n\t\t\t\twhile (parent.depth > 1) parent = parent.parent;\n\n\t\t\t\thoveredElement\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: 'graph_element_mouseout_fill_update',\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.style('fill', (d: any) =>\n\t\t\t\t\t\tself.model.getFillColor(d.parent.data.name)\n\t\t\t\t\t);\n\n\t\t\t\t// Dispatch mouse event\n\t\t\t\tself.services.events.dispatchEvent(\n\t\t\t\t\tEvents.Treemap.LEAF_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// Hide tooltip\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\thandleLegendOnHover = (event: CustomEvent) => {\n\t\tconst { hoveredElement } = event.detail;\n\n\t\tthis.parent\n\t\t\t.selectAll(\"g[data-name='leaf']\")\n\t\t\t.transition('legend-hover-treemap')\n\t\t\t.call((t) =>\n\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\ttransition: t,\n\t\t\t\t\tname: 'legend-hover-treemap',\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attr('opacity', (d) =>\n\t\t\t\td.parent.data.name === hoveredElement.datum()['name'] ? 1 : 0.3\n\t\t\t);\n\t};\n\n\thandleLegendMouseOut = (event: CustomEvent) => {\n\t\tthis.parent\n\t\t\t.selectAll(\"g[data-name='leaf']\")\n\t\t\t.transition('legend-mouseout-treemap')\n\t\t\t.call((t) =>\n\t\t\t\tthis.services.transitions.setupTransition({\n\t\t\t\t\ttransition: t,\n\t\t\t\t\tname: 'legend-mouseout-treemap',\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attr('opacity', 1);\n\t};\n}\n"]}
|
package/configuration.js
CHANGED
|
@@ -191,6 +191,7 @@ var axisChart = Tools.merge({}, chart, {
|
|
|
191
191
|
var baseBarChart = Tools.merge({}, axisChart, {
|
|
192
192
|
bars: {
|
|
193
193
|
maxWidth: 16,
|
|
194
|
+
spacingFactor: 0.25
|
|
194
195
|
},
|
|
195
196
|
timeScale: Tools.merge(timeScale, {
|
|
196
197
|
addSpaceOnEdges: 1,
|
|
@@ -414,6 +415,7 @@ var meterChart = Tools.merge({}, chart, {
|
|
|
414
415
|
clickable: false,
|
|
415
416
|
},
|
|
416
417
|
meter: {
|
|
418
|
+
showLabels: true,
|
|
417
419
|
proportional: null,
|
|
418
420
|
statusBar: {
|
|
419
421
|
percentageIndicator: {
|
package/configuration.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["configuration.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO;AAqCN,QAAQ;AACR,UAAU,EACV,UAAU,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,SAAS,EAET,aAAa,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D;;;;GAIG;AAEH;;GAEG;AACH,IAAM,yBAAyB,GAAG;IACjC,IAAI,EAAE,eAAe,CAAC,QAAQ;IAC9B,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,EAAE;CAChB,CAAC;AAEF;;GAEG;AACH,IAAM,MAAM,GAAkB;IAC7B,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,eAAe,CAAC,MAAM;IAChC,SAAS,EAAE,IAAI;IACf,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Ae,iBAAA;IACf,YAAY,cAAA;IACZ,WAAW,aAAA;IACX,WAAW,aAAA;IACX,cAAc,gBAAA;IACd,SAAS,WAAA;IACT,SAAS,WAAA;IACT,gBAAgB,kBAAA;IAChB,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,QAAQ,UAAA;IACR,UAAU,YAAA;IACV,UAAU,YAAA;IACV,sBAAsB,wBAAA;IACtB,UAAU,YAAA;IACV,UAAU,YAAA;IACV,UAAU,YAAA;IACV,SAAS,WAAA;IACT,YAAY,cAAA;IACZ,eAAe,iBAAA;IACf,cAAc,gBAAA;IACd,aAAa,eAAA;IACb,YAAY,cAAA;CACZ,CAAC;AAEF,cAAc,kCAAkC,CAAC","sourcesContent":["import { Tools } from './tools';\nimport {\n\tBaseChartOptions,\n\tAxisChartOptions,\n\tScatterChartOptions,\n\tLollipopChartOptions,\n\tLineChartOptions,\n\tBarChartOptions,\n\tStackedBarChartOptions,\n\tBoxplotChartOptions,\n\tAreaChartOptions,\n\tPieChartOptions,\n\tGaugeChartOptions,\n\tDonutChartOptions,\n\tBubbleChartOptions,\n\tBulletChartOptions,\n\tHistogramChartOptions,\n\tRadarChartOptions,\n\tComboChartOptions,\n\tTreeChartOptions,\n\tTreemapChartOptions,\n\tCirclePackChartOptions,\n\tWorldCloudChartOptions,\n\tAlluvialChartOptions,\n\t// Components\n\tAxisOptions,\n\tGridOptions,\n\tRulerOptions,\n\tAxesOptions,\n\tTimeScaleOptions,\n\tTooltipOptions,\n\tWordCloudChartTooltipOptions,\n\tLegendOptions,\n\tStackedBarOptions,\n\tMeterChartOptions,\n\tProportionalMeterChartOptions,\n\tToolbarOptions,\n\tZoomBarsOptions,\n\t// ENUMS\n\tAlignments,\n\tGaugeTypes,\n\tLegendPositions,\n\tTruncationTypes,\n\tToolbarControlTypes,\n\tZoomBarTypes,\n\tLegendItemType,\n\tTreeTypes,\n\tHeatmapChartOptions,\n\tDividerStatus,\n} from './interfaces';\nimport enUSLocaleObject from 'date-fns/locale/en-US/index';\nimport { circlePack } from './configuration-non-customizable';\n\n/*\n *****************************\n * User configurable options *\n *****************************\n */\n\n/**\n * Default truncation configuration\n */\nconst standardTruncationOptions = {\n\ttype: TruncationTypes.END_LINE,\n\tthreshold: 16,\n\tnumCharacter: 14,\n};\n\n/**\n * Legend options\n */\nconst legend: LegendOptions = {\n\tenabled: true,\n\tposition: LegendPositions.BOTTOM,\n\tclickable: true,\n\ttruncation: standardTruncationOptions,\n\talignment: Alignments.LEFT,\n\torder: null,\n\tadditionalItems: [],\n};\n\n/**\n * Grid options\n */\nexport const grid: GridOptions = {\n\tx: {\n\t\t// set enable to false will not draw grid and stroke of grid backdrop\n\t\tenabled: true,\n\t\tnumberOfTicks: 15,\n\t\talignWithAxisTicks: false,\n\t},\n\ty: {\n\t\t// set enable to false will not draw grid and stroke of grid backdrop\n\t\tenabled: true,\n\t\tnumberOfTicks: 5,\n\t\talignWithAxisTicks: false,\n\t},\n};\n\n/**\n * Ruler options\n */\nexport const ruler: RulerOptions = {\n\t// enable or disable ruler\n\tenabled: true,\n};\n\n/**\n * Tooltip options\n */\nexport const baseTooltip: TooltipOptions = {\n\tenabled: true,\n\tshowTotal: true,\n\ttruncation: standardTruncationOptions,\n\tgroupLabel: 'Group',\n};\n\n// These options will be managed by Tools.mergeDefaultChartOptions\n// by removing the ones the user is not providing,\n// and by TwoDimensionalAxes.\nconst axes: AxesOptions<AxisOptions> = {\n\ttop: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tbottom: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tleft: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tright: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n};\n\nexport const timeScale: TimeScaleOptions = {\n\taddSpaceOnEdges: 1,\n\tshowDayName: false,\n\tlocaleObject: enUSLocaleObject,\n\ttimeIntervalFormats: {\n\t\t'15seconds': { primary: 'MMM d, pp', secondary: 'pp' },\n\t\tminute: { primary: 'MMM d, p', secondary: 'p' },\n\t\t'30minutes': { primary: 'MMM d, p', secondary: 'p' },\n\t\thourly: { primary: 'MMM d, hh a', secondary: 'hh a' },\n\t\tdaily: { primary: 'MMM d', secondary: 'd' },\n\t\tweekly: { primary: 'eee, MMM d', secondary: 'eee' },\n\t\tmonthly: { primary: 'MMM yyyy', secondary: 'MMM' },\n\t\tquarterly: { primary: \"QQQ ''yy\", secondary: 'QQQ' },\n\t\tyearly: { primary: 'yyyy', secondary: 'yyyy' },\n\t},\n};\n\nconst isFullScreenEnabled =\n\ttypeof document !== 'undefined' &&\n\t(document['fullscreenEnabled'] ||\n\t\tdocument['webkitFullscreenEnabled'] ||\n\t\tdocument['mozFullScreenEnabled'] ||\n\t\tdocument['msFullscreenEnabled']);\n\n/**\n * Base chart options common to any chart\n */\nconst chart: BaseChartOptions = {\n\twidth: null,\n\theight: null,\n\tresizable: true,\n\ttooltip: baseTooltip,\n\tlegend,\n\tstyle: {\n\t\tprefix: 'cc',\n\t},\n\tdata: {\n\t\tgroupMapsTo: 'group',\n\t\tloading: false,\n\t\tselectedGroups: [],\n\t},\n\tcolor: {\n\t\tscale: null,\n\t\tpairing: {\n\t\t\tnumberOfVariants: null,\n\t\t\toption: 1,\n\t\t},\n\t\tgradient: {\n\t\t\tenabled: false,\n\t\t},\n\t},\n\ttoolbar: {\n\t\tenabled: true,\n\t\tnumberOfIcons: 3,\n\t\tcontrols: [\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.SHOW_AS_DATATABLE,\n\t\t\t},\n\t\t\t...(isFullScreenEnabled\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: ToolbarControlTypes.MAKE_FULLSCREEN,\n\t\t\t\t\t\t},\n\t\t\t\t ]\n\t\t\t\t: []),\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_CSV,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_PNG,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_JPG,\n\t\t\t},\n\t\t],\n\t} as ToolbarOptions,\n};\n\n/**\n * Options common to any chart with an axis\n */\nconst axisChart: AxisChartOptions = Tools.merge({}, chart, {\n\taxes,\n\ttimeScale,\n\tgrid,\n\truler,\n\tzoomBar: {\n\t\tzoomRatio: 0.4,\n\t\tminZoomRatio: 0.01,\n\t\ttop: {\n\t\t\tenabled: false,\n\t\t\ttype: ZoomBarTypes.GRAPH_VIEW,\n\t\t},\n\t} as ZoomBarsOptions,\n} as AxisChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst baseBarChart: BarChartOptions = Tools.merge({}, axisChart, {\n\tbars: {\n\t\tmaxWidth: 16,\n\t},\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 1,\n\t} as TimeScaleOptions),\n} as BarChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst simpleBarChart: BarChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to simple bar charts\n */\nconst groupedBarChart: BarChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to stacked bar charts\n */\nconst stackedBarChart: StackedBarChartOptions = Tools.merge({}, baseBarChart, {\n\tbars: Tools.merge({}, baseBarChart.bars, {\n\t\tdividerSize: 1.5,\n\t} as StackedBarOptions),\n} as BarChartOptions);\n\n/**\n * options specific to boxplot charts\n */\nconst boxplotChart: BoxplotChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to scatter charts\n */\nconst scatterChart: ScatterChartOptions = Tools.merge({}, axisChart, {\n\tpoints: {\n\t\t// default point radius to 4\n\t\tradius: 4,\n\t\tfillOpacity: 0.3,\n\t\tfilled: true,\n\t\tenabled: true,\n\t},\n} as ScatterChartOptions);\n\n/**\n * options specific to lollipop charts\n */\nconst lollipopChart: LollipopChartOptions = scatterChart as LollipopChartOptions;\n\n/**\n * options specific to line charts\n */\nconst lineChart: LineChartOptions = Tools.merge({}, scatterChart, {\n\tpoints: {\n\t\t// default point radius to 3\n\t\tradius: 3,\n\t\tfilled: false,\n\t\tenabled: true,\n\t},\n} as LineChartOptions);\n\n/**\n * options specific to area charts\n */\nconst areaChart: AreaChartOptions = Tools.merge({}, lineChart, {\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 0,\n\t} as TimeScaleOptions),\n} as LineChartOptions);\n\n/**\n * options specific to stacked area charts\n */\nconst stackedAreaChart = areaChart;\n\n/**\n * options specific to bubble charts\n */\nconst bubbleChart: BubbleChartOptions = Tools.merge({}, axisChart, {\n\tbubble: {\n\t\tradiusMapsTo: 'radius',\n\t\tradiusLabel: 'Radius',\n\t\tradiusRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(\n\t\t\t\tchartSize.width,\n\t\t\t\tchartSize.height\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t(smallerChartDimension * 3) / 400,\n\t\t\t\t(smallerChartDimension * 25) / 400,\n\t\t\t];\n\t\t},\n\t\tfillOpacity: 0.2,\n\t\tenabled: true,\n\t},\n\tpoints: {\n\t\tfilled: true,\n\t},\n\tlegend: {\n\t\tadditionalItems: [\n\t\t\t{\n\t\t\t\ttype: LegendItemType.RADIUS,\n\t\t\t\tname: 'Radius',\n\t\t\t},\n\t\t],\n\t},\n} as BubbleChartOptions);\n\n/**\n * options specific to bullet charts\n */\nconst bulletChart: BulletChartOptions = Tools.merge({}, axisChart, {\n\tbullet: {\n\t\tperformanceAreaTitles: ['Poor', 'Satisfactory', 'Great'],\n\t},\n\tgrid: {\n\t\tx: {\n\t\t\tenabled: false,\n\t\t},\n\t\ty: {\n\t\t\tenabled: false,\n\t\t},\n\t},\n\tlegend: {\n\t\tadditionalItems: [\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Poor area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Satisfactory area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Great area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.QUARTILE,\n\t\t\t\tname: 'Quartiles',\n\t\t\t},\n\t\t],\n\t},\n} as BulletChartOptions);\n\n/**\n * options specific to stacked bar charts\n */\nconst histogramChart: HistogramChartOptions = Tools.merge({}, baseBarChart, {\n\tbars: {\n\t\tdividerSize: 1.5,\n\t} as StackedBarOptions,\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 0,\n\t} as TimeScaleOptions),\n} as BarChartOptions);\n\n/*\n * options specific to word cloud charts\n */\nconst wordCloudChart: WorldCloudChartOptions = Tools.merge({}, chart, {\n\ttooltip: Tools.merge({}, baseTooltip, {\n\t\twordLabel: 'Word',\n\t\tvalueLabel: 'Value',\n\t}) as WordCloudChartTooltipOptions,\n\twordCloud: {\n\t\tfontSizeMapsTo: 'value',\n\t\tfontSizeRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(\n\t\t\t\tchartSize.width,\n\t\t\t\tchartSize.height\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t(smallerChartDimension * 20) / 400,\n\t\t\t\t(smallerChartDimension * 75) / 400,\n\t\t\t];\n\t\t},\n\t\twordMapsTo: 'word',\n\t},\n} as WorldCloudChartOptions);\n\n/**\n * options specific to pie charts\n */\nconst pieChart: PieChartOptions = Tools.merge({}, chart, {\n\tpie: {\n\t\tlabels: {\n\t\t\tformatter: null,\n\t\t\tenabled: true,\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t\tsortFunction: null,\n\t\tvalueMapsTo: 'value',\n\t},\n} as PieChartOptions);\n\n/**\n * options specific to gauge charts\n */\nconst gaugeChart: GaugeChartOptions = Tools.merge({}, chart, {\n\tlegend: {\n\t\tenabled: false,\n\t},\n\tgauge: {\n\t\ttype: GaugeTypes.SEMI,\n\t\tarcWidth: 16,\n\t\tdeltaArrow: {\n\t\t\tsize: (radius) => radius / 8,\n\t\t\tenabled: true,\n\t\t},\n\t\tshowPercentageSymbol: true,\n\t\tstatus: null,\n\t\tnumberSpacing: 10,\n\t\tdeltaFontSize: (radius) => radius / 8,\n\t\tvalueFontSize: (radius) => radius / 2.5,\n\t\tnumberFormatter: (number) =>\n\t\t\tnumber.toFixed(2) % 1 !== 0\n\t\t\t\t? number.toFixed(2).toLocaleString()\n\t\t\t\t: number.toFixed().toLocaleString(),\n\t\talignment: Alignments.LEFT,\n\t},\n} as GaugeChartOptions);\n\n/**\n * options specific to donut charts\n */\nconst donutChart: DonutChartOptions = Tools.merge({}, pieChart, {\n\tdonut: {\n\t\tcenter: {\n\t\t\tnumberFontSize: (radius) =>\n\t\t\t\tMath.min((radius / 100) * 24, 24) + 'px',\n\t\t\ttitleFontSize: (radius) => Math.min((radius / 100) * 15, 15) + 'px',\n\t\t\ttitleYPosition: (radius) => Math.min((radius / 80) * 20, 20),\n\t\t\tnumberFormatter: (number) => Math.floor(number).toLocaleString(),\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t},\n} as DonutChartOptions);\n\nconst meterChart: MeterChartOptions = Tools.merge({}, chart, {\n\tlegend: {\n\t\tenabled: false,\n\t\tclickable: false,\n\t},\n\tmeter: {\n\t\tproportional: null,\n\t\tstatusBar: {\n\t\t\tpercentageIndicator: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t},\n\t},\n} as MeterChartOptions);\n\nconst proportionalMeterChart: ProportionalMeterChartOptions = Tools.merge(\n\t{},\n\tmeterChart,\n\t{\n\t\tlegend: {\n\t\t\tenabled: true,\n\t\t},\n\t} as MeterChartOptions\n);\n\n/**\n * options specific to radar charts\n */\nconst radarChart: RadarChartOptions = Tools.merge({}, chart, {\n\tradar: {\n\t\taxes: {\n\t\t\tangle: 'key',\n\t\t\tvalue: 'value',\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t},\n\ttooltip: {\n\t\tgridline: {\n\t\t\tenabled: true,\n\t\t},\n\t\tvalueFormatter: (value) =>\n\t\t\tvalue !== null && value !== undefined ? value : 'N/A',\n\t},\n} as RadarChartOptions);\n\n/**\n * options specific to combo charts\n */\nconst comboChart: ComboChartOptions = Tools.merge({}, baseBarChart, {\n\tcomboChartTypes: [],\n} as ComboChartOptions);\n\n/*\n * options specific to tree charts\n */\nconst treeChart: TreeChartOptions = Tools.merge(\n\t{\n\t\ttree: {\n\t\t\ttype: TreeTypes.TREE,\n\t\t},\n\t},\n\tchart,\n\t{} as TreeChartOptions\n);\n\n/*\n * options specific to treemap charts\n */\nconst treemapChart: TreemapChartOptions = Tools.merge({}, chart, {\n\tdata: Tools.merge(chart.data, {\n\t\tgroupMapsTo: 'name',\n\t}),\n} as TreemapChartOptions);\n\n/*\n * options specific to circle pack charts\n */\nconst circlePackChart: CirclePackChartOptions = Tools.merge(\n\t{},\n\tchart,\n\tcirclePack,\n\t{\n\t\tdata: Tools.merge(chart.data, {\n\t\t\tgroupMapsTo: 'name',\n\t\t}),\n\t} as CirclePackChartOptions\n);\n\nconst alluvialChart: AlluvialChartOptions = Tools.merge({}, chart, {\n\talluvial: {\n\t\tdata: Tools.merge(chart.data, {\n\t\t\tgroupMapsTo: 'source',\n\t\t}),\n\t\tnodePadding: 24,\n\t\tmonochrome: false,\n\t\tnodes: [],\n\t},\n} as AlluvialChartOptions);\n\nconst heatmapChart: HeatmapChartOptions = Tools.merge({}, chart, {\n\taxes,\n\theatmap: {\n\t\tdivider: {\n\t\t\tstate: DividerStatus.AUTO,\n\t\t},\n\t\tcolorLegend: {\n\t\t\ttype: 'linear',\n\t\t},\n\t},\n} as HeatmapChartOptions);\n\nexport const options = {\n\tchart,\n\taxisChart,\n\tsimpleBarChart,\n\tgroupedBarChart,\n\tstackedBarChart,\n\tboxplotChart,\n\tbubbleChart,\n\tbulletChart,\n\thistogramChart,\n\tlineChart,\n\tareaChart,\n\tstackedAreaChart,\n\tscatterChart,\n\tlollipopChart,\n\tpieChart,\n\tdonutChart,\n\tmeterChart,\n\tproportionalMeterChart,\n\tradarChart,\n\tgaugeChart,\n\tcomboChart,\n\ttreeChart,\n\ttreemapChart,\n\tcirclePackChart,\n\twordCloudChart,\n\talluvialChart,\n\theatmapChart,\n};\n\nexport * from './configuration-non-customizable';\n"]}
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["configuration.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO;AAqCN,QAAQ;AACR,UAAU,EACV,UAAU,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,SAAS,EAET,aAAa,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D;;;;GAIG;AAEH;;GAEG;AACH,IAAM,yBAAyB,GAAG;IACjC,IAAI,EAAE,eAAe,CAAC,QAAQ;IAC9B,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,EAAE;CAChB,CAAC;AAEF;;GAEG;AACH,IAAM,MAAM,GAAkB;IAC7B,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,eAAe,CAAC,MAAM;IAChC,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,yBAAyB;IACrC,SAAS,EAAE,UAAU,CAAC,IAAI;IAC1B,KAAK,EAAE,IAAI;IACX,eAAe,EAAE,EAAE;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,IAAI,GAAgB;IAChC,CAAC,EAAE;QACF,qEAAqE;QACrE,OAAO,EAAE,IAAI;Q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,QAAQ,UAAA;IACR,UAAU,YAAA;IACV,UAAU,YAAA;IACV,sBAAsB,wBAAA;IACtB,UAAU,YAAA;IACV,UAAU,YAAA;IACV,UAAU,YAAA;IACV,SAAS,WAAA;IACT,YAAY,cAAA;IACZ,eAAe,iBAAA;IACf,cAAc,gBAAA;IACd,aAAa,eAAA;IACb,YAAY,cAAA;CACZ,CAAC;AAEF,cAAc,kCAAkC,CAAC","sourcesContent":["import { Tools } from './tools';\nimport {\n\tBaseChartOptions,\n\tAxisChartOptions,\n\tScatterChartOptions,\n\tLollipopChartOptions,\n\tLineChartOptions,\n\tBarChartOptions,\n\tStackedBarChartOptions,\n\tBoxplotChartOptions,\n\tAreaChartOptions,\n\tPieChartOptions,\n\tGaugeChartOptions,\n\tDonutChartOptions,\n\tBubbleChartOptions,\n\tBulletChartOptions,\n\tHistogramChartOptions,\n\tRadarChartOptions,\n\tComboChartOptions,\n\tTreeChartOptions,\n\tTreemapChartOptions,\n\tCirclePackChartOptions,\n\tWorldCloudChartOptions,\n\tAlluvialChartOptions,\n\t// Components\n\tAxisOptions,\n\tGridOptions,\n\tRulerOptions,\n\tAxesOptions,\n\tTimeScaleOptions,\n\tTooltipOptions,\n\tWordCloudChartTooltipOptions,\n\tLegendOptions,\n\tStackedBarOptions,\n\tMeterChartOptions,\n\tProportionalMeterChartOptions,\n\tToolbarOptions,\n\tZoomBarsOptions,\n\t// ENUMS\n\tAlignments,\n\tGaugeTypes,\n\tLegendPositions,\n\tTruncationTypes,\n\tToolbarControlTypes,\n\tZoomBarTypes,\n\tLegendItemType,\n\tTreeTypes,\n\tHeatmapChartOptions,\n\tDividerStatus,\n} from './interfaces';\nimport enUSLocaleObject from 'date-fns/locale/en-US/index';\nimport { circlePack } from './configuration-non-customizable';\n\n/*\n *****************************\n * User configurable options *\n *****************************\n */\n\n/**\n * Default truncation configuration\n */\nconst standardTruncationOptions = {\n\ttype: TruncationTypes.END_LINE,\n\tthreshold: 16,\n\tnumCharacter: 14,\n};\n\n/**\n * Legend options\n */\nconst legend: LegendOptions = {\n\tenabled: true,\n\tposition: LegendPositions.BOTTOM,\n\tclickable: true,\n\ttruncation: standardTruncationOptions,\n\talignment: Alignments.LEFT,\n\torder: null,\n\tadditionalItems: [],\n};\n\n/**\n * Grid options\n */\nexport const grid: GridOptions = {\n\tx: {\n\t\t// set enable to false will not draw grid and stroke of grid backdrop\n\t\tenabled: true,\n\t\tnumberOfTicks: 15,\n\t\talignWithAxisTicks: false,\n\t},\n\ty: {\n\t\t// set enable to false will not draw grid and stroke of grid backdrop\n\t\tenabled: true,\n\t\tnumberOfTicks: 5,\n\t\talignWithAxisTicks: false,\n\t},\n};\n\n/**\n * Ruler options\n */\nexport const ruler: RulerOptions = {\n\t// enable or disable ruler\n\tenabled: true,\n};\n\n/**\n * Tooltip options\n */\nexport const baseTooltip: TooltipOptions = {\n\tenabled: true,\n\tshowTotal: true,\n\ttruncation: standardTruncationOptions,\n\tgroupLabel: 'Group',\n};\n\n// These options will be managed by Tools.mergeDefaultChartOptions\n// by removing the ones the user is not providing,\n// and by TwoDimensionalAxes.\nconst axes: AxesOptions<AxisOptions> = {\n\ttop: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tbottom: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tleft: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tright: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n};\n\nexport const timeScale: TimeScaleOptions = {\n\taddSpaceOnEdges: 1,\n\tshowDayName: false,\n\tlocaleObject: enUSLocaleObject,\n\ttimeIntervalFormats: {\n\t\t'15seconds': { primary: 'MMM d, pp', secondary: 'pp' },\n\t\tminute: { primary: 'MMM d, p', secondary: 'p' },\n\t\t'30minutes': { primary: 'MMM d, p', secondary: 'p' },\n\t\thourly: { primary: 'MMM d, hh a', secondary: 'hh a' },\n\t\tdaily: { primary: 'MMM d', secondary: 'd' },\n\t\tweekly: { primary: 'eee, MMM d', secondary: 'eee' },\n\t\tmonthly: { primary: 'MMM yyyy', secondary: 'MMM' },\n\t\tquarterly: { primary: \"QQQ ''yy\", secondary: 'QQQ' },\n\t\tyearly: { primary: 'yyyy', secondary: 'yyyy' },\n\t},\n};\n\nconst isFullScreenEnabled =\n\ttypeof document !== 'undefined' &&\n\t(document['fullscreenEnabled'] ||\n\t\tdocument['webkitFullscreenEnabled'] ||\n\t\tdocument['mozFullScreenEnabled'] ||\n\t\tdocument['msFullscreenEnabled']);\n\n/**\n * Base chart options common to any chart\n */\nconst chart: BaseChartOptions = {\n\twidth: null,\n\theight: null,\n\tresizable: true,\n\ttooltip: baseTooltip,\n\tlegend,\n\tstyle: {\n\t\tprefix: 'cc',\n\t},\n\tdata: {\n\t\tgroupMapsTo: 'group',\n\t\tloading: false,\n\t\tselectedGroups: [],\n\t},\n\tcolor: {\n\t\tscale: null,\n\t\tpairing: {\n\t\t\tnumberOfVariants: null,\n\t\t\toption: 1,\n\t\t},\n\t\tgradient: {\n\t\t\tenabled: false,\n\t\t},\n\t},\n\ttoolbar: {\n\t\tenabled: true,\n\t\tnumberOfIcons: 3,\n\t\tcontrols: [\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.SHOW_AS_DATATABLE,\n\t\t\t},\n\t\t\t...(isFullScreenEnabled\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: ToolbarControlTypes.MAKE_FULLSCREEN,\n\t\t\t\t\t\t},\n\t\t\t\t ]\n\t\t\t\t: []),\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_CSV,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_PNG,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_JPG,\n\t\t\t},\n\t\t],\n\t} as ToolbarOptions,\n};\n\n/**\n * Options common to any chart with an axis\n */\nconst axisChart: AxisChartOptions = Tools.merge({}, chart, {\n\taxes,\n\ttimeScale,\n\tgrid,\n\truler,\n\tzoomBar: {\n\t\tzoomRatio: 0.4,\n\t\tminZoomRatio: 0.01,\n\t\ttop: {\n\t\t\tenabled: false,\n\t\t\ttype: ZoomBarTypes.GRAPH_VIEW,\n\t\t},\n\t} as ZoomBarsOptions,\n} as AxisChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst baseBarChart: BarChartOptions = Tools.merge({}, axisChart, {\n\tbars: {\n\t\tmaxWidth: 16,\n\t\tspacingFactor: 0.25\n\t},\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 1,\n\t} as TimeScaleOptions),\n} as BarChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst simpleBarChart: BarChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to simple bar charts\n */\nconst groupedBarChart: BarChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to stacked bar charts\n */\nconst stackedBarChart: StackedBarChartOptions = Tools.merge({}, baseBarChart, {\n\tbars: Tools.merge({}, baseBarChart.bars, {\n\t\tdividerSize: 1.5,\n\t} as StackedBarOptions),\n} as BarChartOptions);\n\n/**\n * options specific to boxplot charts\n */\nconst boxplotChart: BoxplotChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to scatter charts\n */\nconst scatterChart: ScatterChartOptions = Tools.merge({}, axisChart, {\n\tpoints: {\n\t\t// default point radius to 4\n\t\tradius: 4,\n\t\tfillOpacity: 0.3,\n\t\tfilled: true,\n\t\tenabled: true,\n\t},\n} as ScatterChartOptions);\n\n/**\n * options specific to lollipop charts\n */\nconst lollipopChart: LollipopChartOptions = scatterChart as LollipopChartOptions;\n\n/**\n * options specific to line charts\n */\nconst lineChart: LineChartOptions = Tools.merge({}, scatterChart, {\n\tpoints: {\n\t\t// default point radius to 3\n\t\tradius: 3,\n\t\tfilled: false,\n\t\tenabled: true,\n\t},\n} as LineChartOptions);\n\n/**\n * options specific to area charts\n */\nconst areaChart: AreaChartOptions = Tools.merge({}, lineChart, {\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 0,\n\t} as TimeScaleOptions),\n} as LineChartOptions);\n\n/**\n * options specific to stacked area charts\n */\nconst stackedAreaChart = areaChart;\n\n/**\n * options specific to bubble charts\n */\nconst bubbleChart: BubbleChartOptions = Tools.merge({}, axisChart, {\n\tbubble: {\n\t\tradiusMapsTo: 'radius',\n\t\tradiusLabel: 'Radius',\n\t\tradiusRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(\n\t\t\t\tchartSize.width,\n\t\t\t\tchartSize.height\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t(smallerChartDimension * 3) / 400,\n\t\t\t\t(smallerChartDimension * 25) / 400,\n\t\t\t];\n\t\t},\n\t\tfillOpacity: 0.2,\n\t\tenabled: true,\n\t},\n\tpoints: {\n\t\tfilled: true,\n\t},\n\tlegend: {\n\t\tadditionalItems: [\n\t\t\t{\n\t\t\t\ttype: LegendItemType.RADIUS,\n\t\t\t\tname: 'Radius',\n\t\t\t},\n\t\t],\n\t},\n} as BubbleChartOptions);\n\n/**\n * options specific to bullet charts\n */\nconst bulletChart: BulletChartOptions = Tools.merge({}, axisChart, {\n\tbullet: {\n\t\tperformanceAreaTitles: ['Poor', 'Satisfactory', 'Great'],\n\t},\n\tgrid: {\n\t\tx: {\n\t\t\tenabled: false,\n\t\t},\n\t\ty: {\n\t\t\tenabled: false,\n\t\t},\n\t},\n\tlegend: {\n\t\tadditionalItems: [\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Poor area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Satisfactory area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Great area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.QUARTILE,\n\t\t\t\tname: 'Quartiles',\n\t\t\t},\n\t\t],\n\t},\n} as BulletChartOptions);\n\n/**\n * options specific to stacked bar charts\n */\nconst histogramChart: HistogramChartOptions = Tools.merge({}, baseBarChart, {\n\tbars: {\n\t\tdividerSize: 1.5,\n\t} as StackedBarOptions,\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 0,\n\t} as TimeScaleOptions),\n} as BarChartOptions);\n\n/*\n * options specific to word cloud charts\n */\nconst wordCloudChart: WorldCloudChartOptions = Tools.merge({}, chart, {\n\ttooltip: Tools.merge({}, baseTooltip, {\n\t\twordLabel: 'Word',\n\t\tvalueLabel: 'Value',\n\t}) as WordCloudChartTooltipOptions,\n\twordCloud: {\n\t\tfontSizeMapsTo: 'value',\n\t\tfontSizeRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(\n\t\t\t\tchartSize.width,\n\t\t\t\tchartSize.height\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t(smallerChartDimension * 20) / 400,\n\t\t\t\t(smallerChartDimension * 75) / 400,\n\t\t\t];\n\t\t},\n\t\twordMapsTo: 'word',\n\t},\n} as WorldCloudChartOptions);\n\n/**\n * options specific to pie charts\n */\nconst pieChart: PieChartOptions = Tools.merge({}, chart, {\n\tpie: {\n\t\tlabels: {\n\t\t\tformatter: null,\n\t\t\tenabled: true,\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t\tsortFunction: null,\n\t\tvalueMapsTo: 'value',\n\t},\n} as PieChartOptions);\n\n/**\n * options specific to gauge charts\n */\nconst gaugeChart: GaugeChartOptions = Tools.merge({}, chart, {\n\tlegend: {\n\t\tenabled: false,\n\t},\n\tgauge: {\n\t\ttype: GaugeTypes.SEMI,\n\t\tarcWidth: 16,\n\t\tdeltaArrow: {\n\t\t\tsize: (radius) => radius / 8,\n\t\t\tenabled: true,\n\t\t},\n\t\tshowPercentageSymbol: true,\n\t\tstatus: null,\n\t\tnumberSpacing: 10,\n\t\tdeltaFontSize: (radius) => radius / 8,\n\t\tvalueFontSize: (radius) => radius / 2.5,\n\t\tnumberFormatter: (number) =>\n\t\t\tnumber.toFixed(2) % 1 !== 0\n\t\t\t\t? number.toFixed(2).toLocaleString()\n\t\t\t\t: number.toFixed().toLocaleString(),\n\t\talignment: Alignments.LEFT,\n\t},\n} as GaugeChartOptions);\n\n/**\n * options specific to donut charts\n */\nconst donutChart: DonutChartOptions = Tools.merge({}, pieChart, {\n\tdonut: {\n\t\tcenter: {\n\t\t\tnumberFontSize: (radius) =>\n\t\t\t\tMath.min((radius / 100) * 24, 24) + 'px',\n\t\t\ttitleFontSize: (radius) => Math.min((radius / 100) * 15, 15) + 'px',\n\t\t\ttitleYPosition: (radius) => Math.min((radius / 80) * 20, 20),\n\t\t\tnumberFormatter: (number) => Math.floor(number).toLocaleString(),\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t},\n} as DonutChartOptions);\n\nconst meterChart: MeterChartOptions = Tools.merge({}, chart, {\n\tlegend: {\n\t\tenabled: false,\n\t\tclickable: false,\n\t},\n\tmeter: {\n\t\tshowLabels: true,\n\t\tproportional: null,\n\t\tstatusBar: {\n\t\t\tpercentageIndicator: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t},\n\t},\n} as MeterChartOptions);\n\nconst proportionalMeterChart: ProportionalMeterChartOptions = Tools.merge(\n\t{},\n\tmeterChart,\n\t{\n\t\tlegend: {\n\t\t\tenabled: true,\n\t\t},\n\t} as MeterChartOptions\n);\n\n/**\n * options specific to radar charts\n */\nconst radarChart: RadarChartOptions = Tools.merge({}, chart, {\n\tradar: {\n\t\taxes: {\n\t\t\tangle: 'key',\n\t\t\tvalue: 'value',\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t},\n\ttooltip: {\n\t\tgridline: {\n\t\t\tenabled: true,\n\t\t},\n\t\tvalueFormatter: (value) =>\n\t\t\tvalue !== null && value !== undefined ? value : 'N/A',\n\t},\n} as RadarChartOptions);\n\n/**\n * options specific to combo charts\n */\nconst comboChart: ComboChartOptions = Tools.merge({}, baseBarChart, {\n\tcomboChartTypes: [],\n} as ComboChartOptions);\n\n/*\n * options specific to tree charts\n */\nconst treeChart: TreeChartOptions = Tools.merge(\n\t{\n\t\ttree: {\n\t\t\ttype: TreeTypes.TREE,\n\t\t},\n\t},\n\tchart,\n\t{} as TreeChartOptions\n);\n\n/*\n * options specific to treemap charts\n */\nconst treemapChart: TreemapChartOptions = Tools.merge({}, chart, {\n\tdata: Tools.merge(chart.data, {\n\t\tgroupMapsTo: 'name',\n\t}),\n} as TreemapChartOptions);\n\n/*\n * options specific to circle pack charts\n */\nconst circlePackChart: CirclePackChartOptions = Tools.merge(\n\t{},\n\tchart,\n\tcirclePack,\n\t{\n\t\tdata: Tools.merge(chart.data, {\n\t\t\tgroupMapsTo: 'name',\n\t\t}),\n\t} as CirclePackChartOptions\n);\n\nconst alluvialChart: AlluvialChartOptions = Tools.merge({}, chart, {\n\talluvial: {\n\t\tdata: Tools.merge(chart.data, {\n\t\t\tgroupMapsTo: 'source',\n\t\t}),\n\t\tnodePadding: 24,\n\t\tmonochrome: false,\n\t\tnodes: [],\n\t},\n} as AlluvialChartOptions);\n\nconst heatmapChart: HeatmapChartOptions = Tools.merge({}, chart, {\n\taxes,\n\theatmap: {\n\t\tdivider: {\n\t\t\tstate: DividerStatus.AUTO,\n\t\t},\n\t\tcolorLegend: {\n\t\t\ttype: 'linear',\n\t\t},\n\t},\n} as HeatmapChartOptions);\n\nexport const options = {\n\tchart,\n\taxisChart,\n\tsimpleBarChart,\n\tgroupedBarChart,\n\tstackedBarChart,\n\tboxplotChart,\n\tbubbleChart,\n\tbulletChart,\n\thistogramChart,\n\tlineChart,\n\tareaChart,\n\tstackedAreaChart,\n\tscatterChart,\n\tlollipopChart,\n\tpieChart,\n\tdonutChart,\n\tmeterChart,\n\tproportionalMeterChart,\n\tradarChart,\n\tgaugeChart,\n\tcomboChart,\n\ttreeChart,\n\ttreemapChart,\n\tcirclePackChart,\n\twordCloudChart,\n\talluvialChart,\n\theatmapChart,\n};\n\nexport * from './configuration-non-customizable';\n"]}
|
package/interfaces/charts.d.ts
CHANGED
package/interfaces/charts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tGaugeTypes,\n\tStatuses,\n\tArrowDirections,\n\tAlignments,\n\tChartTypes,\n\tTreeTypes,\n\tDividerStatus,\n\tColorLegendType,\n} from './enums';\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions,\n\tZoomBarsOptions,\n} from './index';\nimport { BarOptions, StackedBarOptions, ToolbarOptions } from './components';\nimport {\n\tAxisOptions,\n\tBinnedAxisOptions,\n\tTimeScaleOptions,\n} from './axis-scales';\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Optionally specify a title for the chart\n\t */\n\ttitle?: string;\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tresizable?: boolean;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: string;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: string;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: TooltipOptions;\n\t/**\n\t * legend configuration\n\t */\n\tlegend?: LegendOptions;\n\t/**\n\t * toolbar configurations\n\t */\n\ttoolbar?: ToolbarOptions;\n\t/**\n\t * Optional function to determine whether is filled based on datasetLabel, label, and/or data\n\t */\n\tgetIsFilled?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultFilled?: boolean\n\t) => boolean;\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or data\n\t */\n\tgetFillColor?: (\n\t\tgroup: string,\n\t\tlabel?: string,\n\t\tdata?: any,\n\t\tdefaultFillColor?: string\n\t) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or data\n\t * (note) - not all chart types support the stroke color (e.g. wordcloud)\n\t */\n\tgetStrokeColor?: (\n\t\tgroup: string,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultStrokeColor?: string\n\t) => string;\n\t/**\n\t * stylesheet options\n\t */\n\tstyle?: {\n\t\t/**\n\t\t * optional prefixing string for css classes (defaults to 'cc')\n\t\t */\n\t\tprefix?: string;\n\t};\n\t/**\n\t * options related to charting data\n\t */\n\tdata?: {\n\t\t/**\n\t\t * identifier for data groups\n\t\t */\n\t\tgroupMapsTo?: string;\n\t\t/**\n\t\t * used to simulate data loading in skeleton way\n\t\t */\n\t\tloading?: boolean;\n\t\t/**\n\t\t * options related to pre-selected data groups\n\t\t * Remains empty if every legend item is active or dataset doesn't have the data groups.\n\t\t */\n\t\tselectedGroups?: string[];\n\t};\n\t/**\n\t * options related to color scales\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * e.g. { 'Dataset 1': 'blue' }\n\t\t */\n\t\tscale?: object;\n\t\t/**\n\t\t * use a carbon dataviz preset color palette\n\t\t * put the index (selection of which variant)\n\t\t */\n\t\tpairing?: {\n\t\t\t/**\n\t\t\t * the number of color variants in the palette (defaults to using the number of data groups in the given data)\n\t\t\t */\n\t\t\tnumberOfVariants?: number;\n\t\t\t/**\n\t\t\t * the option number of the color paring\n\t\t\t */\n\t\t\toption?: number;\n\t\t};\n\t\t/*\n\t\t * options related to gradient\n\t\t * e.g. { enabled: true }\n\t\t */\n\t\tgradient?: {\n\t\t\tenabled?: boolean;\n\t\t\t/**\n\t\t\t * hex color array\n\t\t\t * e.g. ['#fff', '#000', ...]\n\t\t\t */\n\t\t\tcolors?: Array<String>;\n\t\t};\n\t};\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\taxes?: AxesOptions<AxisOptions>;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * Options common to binned charts with an axis\n */\nexport interface BinnedAxisChartOptions extends AxisChartOptions {\n\taxes?: AxesOptions<BinnedAxisOptions>;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * options specific to boxplot charts\n */\nexport interface BoxplotChartOptions extends AxisChartOptions {}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\n}\n\n/**\n * options specific to stacked bar charts\n */\nexport interface StackedBarChartOptions extends BarChartOptions {\n\tbars?: StackedBarOptions;\n}\n\n/**\n * options specific to scatter charts\n */\nexport interface ScatterChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the points\n\t */\n\tpoints?: {\n\t\t/**\n\t\t * sets the radius of the point\n\t\t */\n\t\tradius: number;\n\t\tfillOpacity?: number;\n\t\tfilled?: boolean;\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to lollipop charts\n */\nexport interface LollipopChartOptions extends ScatterChartOptions {}\n\n/**\n * options specific to bubble charts\n */\nexport interface BubbleChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bubbles\n\t */\n\tbubble?: {\n\t\t/**\n\t\t * the key to lookup in charting data for the bubble radius value\n\t\t */\n\t\tradiusMapsTo?: string;\n\t\t/**\n\t\t * options for what the bubble radius value maps to\n\t\t */\n\t\tradiusLabel?: string;\n\t\t/**\n\t\t * A function that would determine the range of the bubble radius to use\n\t\t * Returns an array with the 1st value being the min and the 2nd value being the max radius\n\t\t */\n\t\tradiusRange?: Function;\n\t\t/**\n\t\t * Opacity of the fills used within each circle\n\t\t */\n\t\tfillOpacity?: number;\n\t\t/**\n\t\t * enabled scatter dot or not\n\t\t */\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to bullet charts\n */\nexport interface BulletChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bullets\n\t */\n\tbullet?: {\n\t\tperformanceAreaTitles?: string[];\n\t};\n}\n\n/**\n * options specific to histogram charts\n */\nexport interface HistogramChartOptions extends AxisChartOptions {\n\t/**\n\t * options related to bins\n\t */\n\tbins?: {\n\t\trangeLabel?: string;\n\t};\n}\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to area charts\n */\nexport interface AreaChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n\t/**\n\t * options to bound the area of the chart\n\t */\n\tbounds?: {\n\t\tupperBoundMapsTo?: string;\n\t\tlowerBoundMapsTo?: string;\n\t};\n}\n\n/**\n * options specific to area charts\n */\nexport interface StackedAreaChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to world cloud charts\n */\nexport interface WordCloudChartTooltipOptions extends TooltipOptions {\n\t/** the label that shows up by the highlighted word in the tooltip */\n\twordLabel?: string;\n\t/** the label that shows up by the value of the highlighted word in the tooltip */\n\tvalueLabel?: string;\n}\n\nexport interface WorldCloudChartOptions extends BaseChartOptions {\n\twordCloud?: {\n\t\t/** what key in your charting data will the font sizes map to? */\n\t\tfontSizeMapsTo?: string;\n\t\t/** a function (chartSize, data) => {} that'll decide the range of font sizes, e.g. [10, 80] */\n\t\tfontSizeRange?: Function;\n\t\t/** what key in your charting data will the words map to? */\n\t\twordMapsTo?: string;\n\t};\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: WordCloudChartTooltipOptions;\n}\n\n/**\n * options specific to pie charts\n */\nexport interface PieChartOptions extends BaseChartOptions {\n\tpie?: {\n\t\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t\tenabled?: Boolean;\n\t\t};\n\t\talignment?: Alignments;\n\t\t/**\n\t\t * identifier for value key in your charting data\n\t\t * defaults to value\n\t\t */\n\t\tvalueMapsTo?: string;\n\t\tsortFunction?: (a: any, b: any) => number;\n\t};\n}\n\n/**\n * options specific to gauge charts\n */\nexport interface GaugeChartOptions extends BaseChartOptions {\n\tgauge?: {\n\t\tarcWidth?: number;\n\t\tdeltaArrow?: {\n\t\t\tdirection?: ArrowDirections;\n\t\t\tsize?: Function;\n\t\t\tenabled: Boolean;\n\t\t};\n\t\tshowPercentageSymbol?: Boolean;\n\t\tstatus?: Statuses;\n\t\tdeltaFontSize?: Function;\n\t\tnumberSpacing?: number;\n\t\tnumberFormatter?: Function;\n\t\tvalueFontSize?: Function;\n\t\ttype?: GaugeTypes;\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tdonut?: {\n\t\tcenter?: {\n\t\t\tlabel?: string;\n\t\t\tnumber?: number;\n\t\t\tnumberFontSize?: Function;\n\t\t\ttitleFontSize?: Function;\n\t\t\ttitleYPosition?: Function;\n\t\t\tnumberFormatter?: Function;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\nexport interface MeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\tproportional?: {\n\t\t\ttotal?: number;\n\t\t\tunit?: string;\n\t\t};\n\t\tpeak?: number;\n\t\tstatus?: {\n\t\t\tranges: Array<{\n\t\t\t\trange: [number, number];\n\t\t\t\tstatus: Statuses;\n\t\t\t}>;\n\t\t};\n\t\theight?: number;\n\t\ttitle?: {\n\t\t\tpercentageIndicator?: {\n\t\t\t\t/**\n\t\t\t\t * rendering of the percentage value relative to the dataset within title\n\t\t\t\t */\n\t\t\t\tenabled?: boolean;\n\t\t\t};\n\t\t};\n\t};\n}\n\nexport interface ProportionalMeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\tproportional?: {\n\t\t\ttotal?: number;\n\t\t\tunit?: string;\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\taxes: {\n\t\t\tangle: string;\n\t\t\tvalue: string;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to combo charts\n */\nexport interface ComboChartOptions extends AxisChartOptions {\n\tcomboChartTypes: Array<{\n\t\ttype: ChartTypes | any;\n\t\toptions?: object;\n\t\tcorrespondingDatasets: Array<string>;\n\t}>;\n}\n\n/*\n * options specific to treemap charts\n */\nexport interface TreemapChartOptions extends BaseChartOptions {}\n\n/*\n * options specific to tree charts\n */\nexport interface TreeChartOptions extends BaseChartOptions {\n\ttree?: {\n\t\ttype?: TreeTypes;\n\t\trootTitle?: string;\n\t};\n}\n\n/*\n * options specific to circle pack charts\n */\nexport interface CirclePackChartOptions extends BaseChartOptions {\n\tcirclePack?: {\n\t\tcircles: {\n\t\t\tfillOpacity: number;\n\t\t};\n\t\t// depth of nodes to display\n\t\thierachyLevel: number;\n\t\tpadding?: {\n\t\t\touter?: number;\n\t\t\tinner?: number;\n\t\t};\n\t};\n}\n\n/**\n * options specific to Alluvial charts\n */\nexport interface AlluvialChartOptions extends BaseChartOptions {\n\talluvial: {\n\t\tunits?: string;\n\t\t/**\n\t\t * List of nodes to draw\n\t\t */\n\t\tnodes: Array<{\n\t\t\tname: string;\n\t\t\tcategory?: string;\n\t\t}>;\n\t\t/**\n\t\t * Set the node padding\n\t\t */\n\t\tnodePadding?: number;\n\t\t/**\n\t\t * Enable single color usage for lines\n\t\t */\n\t\tmonochrome?: boolean;\n\t};\n}\n\n/**\n * options specific to Heatmap charts\n */\nexport interface HeatmapChartOptions extends BaseChartOptions {\n\theatmap: {\n\t\t/**\n\t\t * Divider width state - will default to auto\n\t\t * No cell divider for cell dimensions less than 16\n\t\t */\n\t\tdivider?: {\n\t\t\tstate?: DividerStatus;\n\t\t};\n\t\t/**\n\t\t * customize color legend\n\t\t * enabled by default on select charts\n\t\t */\n\t\tcolorLegend?: {\n\t\t\t/**\n\t\t\t * Text to display beside or on top of the legend\n\t\t\t * Position is determined by text length\n\t\t\t */\n\t\t\ttitle?: string;\n\t\t\ttype: ColorLegendType;\n\t\t};\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tGaugeTypes,\n\tStatuses,\n\tArrowDirections,\n\tAlignments,\n\tChartTypes,\n\tTreeTypes,\n\tDividerStatus,\n\tColorLegendType,\n} from './enums';\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions,\n\tZoomBarsOptions,\n} from './index';\nimport { BarOptions, StackedBarOptions, ToolbarOptions } from './components';\nimport {\n\tAxisOptions,\n\tBinnedAxisOptions,\n\tTimeScaleOptions,\n} from './axis-scales';\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Optionally specify a title for the chart\n\t */\n\ttitle?: string;\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tresizable?: boolean;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: string;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: string;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: TooltipOptions;\n\t/**\n\t * legend configuration\n\t */\n\tlegend?: LegendOptions;\n\t/**\n\t * toolbar configurations\n\t */\n\ttoolbar?: ToolbarOptions;\n\t/**\n\t * Optional function to determine whether is filled based on datasetLabel, label, and/or data\n\t */\n\tgetIsFilled?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultFilled?: boolean\n\t) => boolean;\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or data\n\t */\n\tgetFillColor?: (\n\t\tgroup: string,\n\t\tlabel?: string,\n\t\tdata?: any,\n\t\tdefaultFillColor?: string\n\t) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or data\n\t * (note) - not all chart types support the stroke color (e.g. wordcloud)\n\t */\n\tgetStrokeColor?: (\n\t\tgroup: string,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultStrokeColor?: string\n\t) => string;\n\t/**\n\t * stylesheet options\n\t */\n\tstyle?: {\n\t\t/**\n\t\t * optional prefixing string for css classes (defaults to 'cc')\n\t\t */\n\t\tprefix?: string;\n\t};\n\t/**\n\t * options related to charting data\n\t */\n\tdata?: {\n\t\t/**\n\t\t * identifier for data groups\n\t\t */\n\t\tgroupMapsTo?: string;\n\t\t/**\n\t\t * used to simulate data loading in skeleton way\n\t\t */\n\t\tloading?: boolean;\n\t\t/**\n\t\t * options related to pre-selected data groups\n\t\t * Remains empty if every legend item is active or dataset doesn't have the data groups.\n\t\t */\n\t\tselectedGroups?: string[];\n\t};\n\t/**\n\t * options related to color scales\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * e.g. { 'Dataset 1': 'blue' }\n\t\t */\n\t\tscale?: object;\n\t\t/**\n\t\t * use a carbon dataviz preset color palette\n\t\t * put the index (selection of which variant)\n\t\t */\n\t\tpairing?: {\n\t\t\t/**\n\t\t\t * the number of color variants in the palette (defaults to using the number of data groups in the given data)\n\t\t\t */\n\t\t\tnumberOfVariants?: number;\n\t\t\t/**\n\t\t\t * the option number of the color paring\n\t\t\t */\n\t\t\toption?: number;\n\t\t};\n\t\t/*\n\t\t * options related to gradient\n\t\t * e.g. { enabled: true }\n\t\t */\n\t\tgradient?: {\n\t\t\tenabled?: boolean;\n\t\t\t/**\n\t\t\t * hex color array\n\t\t\t * e.g. ['#fff', '#000', ...]\n\t\t\t */\n\t\t\tcolors?: Array<String>;\n\t\t};\n\t};\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\taxes?: AxesOptions<AxisOptions>;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * Options common to binned charts with an axis\n */\nexport interface BinnedAxisChartOptions extends AxisChartOptions {\n\taxes?: AxesOptions<BinnedAxisOptions>;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * options specific to boxplot charts\n */\nexport interface BoxplotChartOptions extends AxisChartOptions {}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\n}\n\n/**\n * options specific to stacked bar charts\n */\nexport interface StackedBarChartOptions extends BarChartOptions {\n\tbars?: StackedBarOptions;\n}\n\n/**\n * options specific to scatter charts\n */\nexport interface ScatterChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the points\n\t */\n\tpoints?: {\n\t\t/**\n\t\t * sets the radius of the point\n\t\t */\n\t\tradius: number;\n\t\tfillOpacity?: number;\n\t\tfilled?: boolean;\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to lollipop charts\n */\nexport interface LollipopChartOptions extends ScatterChartOptions {}\n\n/**\n * options specific to bubble charts\n */\nexport interface BubbleChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bubbles\n\t */\n\tbubble?: {\n\t\t/**\n\t\t * the key to lookup in charting data for the bubble radius value\n\t\t */\n\t\tradiusMapsTo?: string;\n\t\t/**\n\t\t * options for what the bubble radius value maps to\n\t\t */\n\t\tradiusLabel?: string;\n\t\t/**\n\t\t * A function that would determine the range of the bubble radius to use\n\t\t * Returns an array with the 1st value being the min and the 2nd value being the max radius\n\t\t */\n\t\tradiusRange?: Function;\n\t\t/**\n\t\t * Opacity of the fills used within each circle\n\t\t */\n\t\tfillOpacity?: number;\n\t\t/**\n\t\t * enabled scatter dot or not\n\t\t */\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to bullet charts\n */\nexport interface BulletChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bullets\n\t */\n\tbullet?: {\n\t\tperformanceAreaTitles?: string[];\n\t};\n}\n\n/**\n * options specific to histogram charts\n */\nexport interface HistogramChartOptions extends AxisChartOptions {\n\t/**\n\t * options related to bins\n\t */\n\tbins?: {\n\t\trangeLabel?: string;\n\t};\n}\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to area charts\n */\nexport interface AreaChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n\t/**\n\t * options to bound the area of the chart\n\t */\n\tbounds?: {\n\t\tupperBoundMapsTo?: string;\n\t\tlowerBoundMapsTo?: string;\n\t};\n}\n\n/**\n * options specific to area charts\n */\nexport interface StackedAreaChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to world cloud charts\n */\nexport interface WordCloudChartTooltipOptions extends TooltipOptions {\n\t/** the label that shows up by the highlighted word in the tooltip */\n\twordLabel?: string;\n\t/** the label that shows up by the value of the highlighted word in the tooltip */\n\tvalueLabel?: string;\n}\n\nexport interface WorldCloudChartOptions extends BaseChartOptions {\n\twordCloud?: {\n\t\t/** what key in your charting data will the font sizes map to? */\n\t\tfontSizeMapsTo?: string;\n\t\t/** a function (chartSize, data) => {} that'll decide the range of font sizes, e.g. [10, 80] */\n\t\tfontSizeRange?: Function;\n\t\t/** what key in your charting data will the words map to? */\n\t\twordMapsTo?: string;\n\t};\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: WordCloudChartTooltipOptions;\n}\n\n/**\n * options specific to pie charts\n */\nexport interface PieChartOptions extends BaseChartOptions {\n\tpie?: {\n\t\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t\tenabled?: Boolean;\n\t\t};\n\t\talignment?: Alignments;\n\t\t/**\n\t\t * identifier for value key in your charting data\n\t\t * defaults to value\n\t\t */\n\t\tvalueMapsTo?: string;\n\t\tsortFunction?: (a: any, b: any) => number;\n\t};\n}\n\n/**\n * options specific to gauge charts\n */\nexport interface GaugeChartOptions extends BaseChartOptions {\n\tgauge?: {\n\t\tarcWidth?: number;\n\t\tdeltaArrow?: {\n\t\t\tdirection?: ArrowDirections;\n\t\t\tsize?: Function;\n\t\t\tenabled: Boolean;\n\t\t};\n\t\tshowPercentageSymbol?: Boolean;\n\t\tstatus?: Statuses;\n\t\tdeltaFontSize?: Function;\n\t\tnumberSpacing?: number;\n\t\tnumberFormatter?: Function;\n\t\tvalueFontSize?: Function;\n\t\ttype?: GaugeTypes;\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tdonut?: {\n\t\tcenter?: {\n\t\t\tlabel?: string;\n\t\t\tnumber?: number;\n\t\t\tnumberFontSize?: Function;\n\t\t\ttitleFontSize?: Function;\n\t\t\ttitleYPosition?: Function;\n\t\t\tnumberFormatter?: Function;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\nexport interface MeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\tshowLabels?: boolean;\n\t\tproportional?: {\n\t\t\ttotal?: number;\n\t\t\tunit?: string;\n\t\t};\n\t\tpeak?: number;\n\t\tstatus?: {\n\t\t\tranges: Array<{\n\t\t\t\trange: [number, number];\n\t\t\t\tstatus: Statuses;\n\t\t\t}>;\n\t\t};\n\t\theight?: number;\n\t\ttitle?: {\n\t\t\tpercentageIndicator?: {\n\t\t\t\t/**\n\t\t\t\t * rendering of the percentage value relative to the dataset within title\n\t\t\t\t */\n\t\t\t\tenabled?: boolean;\n\t\t\t};\n\t\t};\n\t};\n}\n\nexport interface ProportionalMeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\tproportional?: {\n\t\t\ttotal?: number;\n\t\t\tunit?: string;\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\taxes: {\n\t\t\tangle: string;\n\t\t\tvalue: string;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to combo charts\n */\nexport interface ComboChartOptions extends AxisChartOptions {\n\tcomboChartTypes: Array<{\n\t\ttype: ChartTypes | any;\n\t\toptions?: object;\n\t\tcorrespondingDatasets: Array<string>;\n\t}>;\n}\n\n/*\n * options specific to treemap charts\n */\nexport interface TreemapChartOptions extends BaseChartOptions {}\n\n/*\n * options specific to tree charts\n */\nexport interface TreeChartOptions extends BaseChartOptions {\n\ttree?: {\n\t\ttype?: TreeTypes;\n\t\trootTitle?: string;\n\t};\n}\n\n/*\n * options specific to circle pack charts\n */\nexport interface CirclePackChartOptions extends BaseChartOptions {\n\tcirclePack?: {\n\t\tcircles: {\n\t\t\tfillOpacity: number;\n\t\t};\n\t\t// depth of nodes to display\n\t\thierachyLevel: number;\n\t\tpadding?: {\n\t\t\touter?: number;\n\t\t\tinner?: number;\n\t\t};\n\t};\n}\n\n/**\n * options specific to Alluvial charts\n */\nexport interface AlluvialChartOptions extends BaseChartOptions {\n\talluvial: {\n\t\tunits?: string;\n\t\t/**\n\t\t * List of nodes to draw\n\t\t */\n\t\tnodes: Array<{\n\t\t\tname: string;\n\t\t\tcategory?: string;\n\t\t}>;\n\t\t/**\n\t\t * Set the node padding\n\t\t */\n\t\tnodePadding?: number;\n\t\t/**\n\t\t * Enable single color usage for lines\n\t\t */\n\t\tmonochrome?: boolean;\n\t};\n}\n\n/**\n * options specific to Heatmap charts\n */\nexport interface HeatmapChartOptions extends BaseChartOptions {\n\theatmap: {\n\t\t/**\n\t\t * Divider width state - will default to auto\n\t\t * No cell divider for cell dimensions less than 16\n\t\t */\n\t\tdivider?: {\n\t\t\tstate?: DividerStatus;\n\t\t};\n\t\t/**\n\t\t * customize color legend\n\t\t * enabled by default on select charts\n\t\t */\n\t\tcolorLegend?: {\n\t\t\t/**\n\t\t\t * Text to display beside or on top of the legend\n\t\t\t * Position is determined by text length\n\t\t\t */\n\t\t\ttitle?: string;\n\t\t\ttype: ColorLegendType;\n\t\t};\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tLayoutGrowth,\n\tLegendPositions,\n\tAlignments,\n\tToolbarControlTypes,\n\tZoomBarTypes,\n\tColorLegendType,\n} from './enums';\nimport { Component } from '../components/component';\nimport { TruncationOptions } from './truncation';\n\n/**\n * customize the overlay contents\n */\nexport interface LayoutComponentChild {\n\tid: string;\n\t/**\n\t * the component that'll be rendered inside layout child\n\t */\n\tcomponents: Component[];\n\t/**\n\t * size of the layout child\n\t */\n\tsize?: number;\n\t/**\n\t * how the layout child will grow or shrink\n\t */\n\tgrowth: LayoutGrowth;\n}\n\n/**\n * customize the legend component\n */\nexport interface LegendOptions {\n\tenabled?: boolean;\n\tposition?: LegendPositions;\n\t/**\n\t * the clickability of legend items\n\t */\n\tclickable?: boolean;\n\ttruncation?: TruncationOptions;\n\talignment?: Alignments;\n\torder?: string[];\n\t/**\n\t * customized legend items\n\t */\n\tadditionalItems?: LegendItem[];\n}\n\n/**\n * customize the legend item\n */\nexport interface LegendItem {\n\ttype: string;\n\tname: string;\n\tfill?: string;\n\tstroke?: string;\n}\n\nexport interface TooltipOptions {\n\t/**\n\t * enable or disable tooltip\n\t */\n\tenabled?: boolean;\n\t/**\n\t * a function to format the tooltip values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * custom function for returning tooltip HTML\n\t * passed an array or object with the data, and then the default tooltip markup\n\t */\n\tcustomHTML?: Function;\n\t/**\n\t * customizes the `Group` label shown inside tooltips\n\t */\n\tgroupLabel?: string;\n\t/**\n\t * show total of items\n\t */\n\tshowTotal?: boolean;\n\t/**\n\t * customizes the `Total` label shown inside tooltips\n\t */\n\ttotalLabel?: string;\n\ttruncation?: TruncationOptions;\n}\n\n/**\n * Threshold options\n */\nexport interface ThresholdOptions {\n\t/**\n\t * threshold value\n\t */\n\tvalue: number | Date;\n\t/**\n\t * a function to format the threshold values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * hex threshold line color\n\t */\n\tfillColor: string;\n\t/**\n\t * threshold label\n\t */\n\tlabel: string;\n}\n\nexport interface GridOptions {\n\ty?: {\n\t\tenabled?: boolean;\n\t\tnumberOfTicks?: number;\n\t\talignWithAxisTicks?: boolean;\n\t};\n\tx?: {\n\t\tenabled?: boolean;\n\t\tnumberOfTicks?: number;\n\t\talignWithAxisTicks?: boolean;\n\t};\n}\n\n/**\n * Ruler options\n */\nexport interface RulerOptions {\n\tenabled?: boolean;\n}\n\nexport interface BarOptions {\n\twidth?: number;\n\tmaxWidth?: number;\n}\n\nexport interface StackedBarOptions extends BarOptions {\n\tdividerSize?: number;\n}\n\n/**\n * customize the Toolbar component\n */\nexport interface ToolbarOptions {\n\t/**\n\t * is the toolbar visible or not\n\t */\n\tenabled?: boolean;\n\t/**\n\t * the maximum toolbar controls to be displayed as icons\n\t * controls more than this number will appear in the overflow menu\n\t * minimum is 1. (all toolbar controls are in overflow menu)\n\t */\n\tnumberOfIcons?: number;\n\t/**\n\t * toolbar controls which will be displayed following the array order\n\t */\n\tcontrols?: ToolbarControl[];\n}\n\n/**\n * options for each toolbar control\n */\nexport interface ToolbarControl {\n\t/**\n\t * the toolbar control type\n\t */\n\ttype: ToolbarControlTypes;\n\t/**\n\t * the text to display (if this control is displayed in overflow menu)\n\t * type value will be displayed if text is not available\n\t */\n\ttext?: string;\n\t/**\n\t * custom id for button\n\t */\n\tid?: String;\n\t/**\n\t * SVG HTML element\n\t */\n\ticonSVG?: {\n\t\tcontent?: string;\n\t\theight?: string;\n\t\twidth?: string;\n\t};\n\tshouldBeDisabled?: Function;\n\t/**\n\t * function to execute on button click\n\t * alternatively, users can choose to not pass in a function and can\n\t * listen for events to execute asynchronously\n\t */\n\tclickFunction?: Function;\n}\n\n/**\n * customize the ZoomBars in a chart\n */\nexport interface ZoomBarsOptions {\n\t/**\n\t * a variable to handle default zoom in ratio (0 ~ 1.0)\n\t * ex: shift click zoom in ratio\n\t */\n\tzoomRatio?: number;\n\t/**\n\t * a variable to define the minimum zoom ratio (0 ~ 1.0)\n\t * If ( zoom domain / max domain ) < minZoomRatio, zoom-in functions will be disabled\n\t */\n\tminZoomRatio?: number;\n\t/**\n\t * currently only the top position is supported\n\t */\n\ttop?: ZoomBarOptions;\n\t/**\n\t * whether keep updating range axis in real time while zoom domain is changing\n\t */\n\tupdateRangeAxis?: boolean;\n}\n\n/**\n * customize the ZoomBar component\n */\nexport interface ZoomBarOptions {\n\t/**\n\t * is the zoom-bar visible or not\n\t */\n\tenabled?: boolean;\n\t/**\n\t * is the zoom-bar in loading state\n\t */\n\tloading?: boolean;\n\t/**\n\t * is the zoom-bar in locked state\n\t */\n\tlocked?: boolean;\n\t/**\n\t * whether the zoom bar is showing a slider view or a graph view etc.\n\t */\n\ttype?: ZoomBarTypes;\n\t/**\n\t * an two element array which represents the initial zoom domain\n\t */\n\tinitialZoomDomain?: Object[];\n\t/**\n\t * options related to zoom bar data\n\t */\n\tdata?: Object[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tLayoutGrowth,\n\tLegendPositions,\n\tAlignments,\n\tToolbarControlTypes,\n\tZoomBarTypes,\n\tColorLegendType,\n} from './enums';\nimport { Component } from '../components/component';\nimport { TruncationOptions } from './truncation';\n\n/**\n * customize the overlay contents\n */\nexport interface LayoutComponentChild {\n\tid: string;\n\t/**\n\t * the component that'll be rendered inside layout child\n\t */\n\tcomponents: Component[];\n\t/**\n\t * size of the layout child\n\t */\n\tsize?: number;\n\t/**\n\t * how the layout child will grow or shrink\n\t */\n\tgrowth: LayoutGrowth;\n}\n\n/**\n * customize the legend component\n */\nexport interface LegendOptions {\n\tenabled?: boolean;\n\tposition?: LegendPositions;\n\t/**\n\t * the clickability of legend items\n\t */\n\tclickable?: boolean;\n\ttruncation?: TruncationOptions;\n\talignment?: Alignments;\n\torder?: string[];\n\t/**\n\t * customized legend items\n\t */\n\tadditionalItems?: LegendItem[];\n}\n\n/**\n * customize the legend item\n */\nexport interface LegendItem {\n\ttype: string;\n\tname: string;\n\tfill?: string;\n\tstroke?: string;\n}\n\nexport interface TooltipOptions {\n\t/**\n\t * enable or disable tooltip\n\t */\n\tenabled?: boolean;\n\t/**\n\t * a function to format the tooltip values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * custom function for returning tooltip HTML\n\t * passed an array or object with the data, and then the default tooltip markup\n\t */\n\tcustomHTML?: Function;\n\t/**\n\t * customizes the `Group` label shown inside tooltips\n\t */\n\tgroupLabel?: string;\n\t/**\n\t * show total of items\n\t */\n\tshowTotal?: boolean;\n\t/**\n\t * customizes the `Total` label shown inside tooltips\n\t */\n\ttotalLabel?: string;\n\ttruncation?: TruncationOptions;\n}\n\n/**\n * Threshold options\n */\nexport interface ThresholdOptions {\n\t/**\n\t * threshold value\n\t */\n\tvalue: number | Date;\n\t/**\n\t * a function to format the threshold values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * hex threshold line color\n\t */\n\tfillColor: string;\n\t/**\n\t * threshold label\n\t */\n\tlabel: string;\n}\n\nexport interface GridOptions {\n\ty?: {\n\t\tenabled?: boolean;\n\t\tnumberOfTicks?: number;\n\t\talignWithAxisTicks?: boolean;\n\t};\n\tx?: {\n\t\tenabled?: boolean;\n\t\tnumberOfTicks?: number;\n\t\talignWithAxisTicks?: boolean;\n\t};\n}\n\n/**\n * Ruler options\n */\nexport interface RulerOptions {\n\tenabled?: boolean;\n}\n\nexport interface BarOptions {\n\twidth?: number;\n\tmaxWidth?: number;\n\t/*\n\t * can be used to manually modify spacing between bars\n\t * @default 0.25\n\t */\n\tspacingFactor?: number;\n}\n\nexport interface StackedBarOptions extends BarOptions {\n\tdividerSize?: number;\n}\n\n/**\n * customize the Toolbar component\n */\nexport interface ToolbarOptions {\n\t/**\n\t * is the toolbar visible or not\n\t */\n\tenabled?: boolean;\n\t/**\n\t * the maximum toolbar controls to be displayed as icons\n\t * controls more than this number will appear in the overflow menu\n\t * minimum is 1. (all toolbar controls are in overflow menu)\n\t */\n\tnumberOfIcons?: number;\n\t/**\n\t * toolbar controls which will be displayed following the array order\n\t */\n\tcontrols?: ToolbarControl[];\n}\n\n/**\n * options for each toolbar control\n */\nexport interface ToolbarControl {\n\t/**\n\t * the toolbar control type\n\t */\n\ttype: ToolbarControlTypes;\n\t/**\n\t * the text to display (if this control is displayed in overflow menu)\n\t * type value will be displayed if text is not available\n\t */\n\ttext?: string;\n\t/**\n\t * custom id for button\n\t */\n\tid?: String;\n\t/**\n\t * SVG HTML element\n\t */\n\ticonSVG?: {\n\t\tcontent?: string;\n\t\theight?: string;\n\t\twidth?: string;\n\t};\n\tshouldBeDisabled?: Function;\n\t/**\n\t * function to execute on button click\n\t * alternatively, users can choose to not pass in a function and can\n\t * listen for events to execute asynchronously\n\t */\n\tclickFunction?: Function;\n}\n\n/**\n * customize the ZoomBars in a chart\n */\nexport interface ZoomBarsOptions {\n\t/**\n\t * a variable to handle default zoom in ratio (0 ~ 1.0)\n\t * ex: shift click zoom in ratio\n\t */\n\tzoomRatio?: number;\n\t/**\n\t * a variable to define the minimum zoom ratio (0 ~ 1.0)\n\t * If ( zoom domain / max domain ) < minZoomRatio, zoom-in functions will be disabled\n\t */\n\tminZoomRatio?: number;\n\t/**\n\t * currently only the top position is supported\n\t */\n\ttop?: ZoomBarOptions;\n\t/**\n\t * whether keep updating range axis in real time while zoom domain is changing\n\t */\n\tupdateRangeAxis?: boolean;\n}\n\n/**\n * customize the ZoomBar component\n */\nexport interface ZoomBarOptions {\n\t/**\n\t * is the zoom-bar visible or not\n\t */\n\tenabled?: boolean;\n\t/**\n\t * is the zoom-bar in loading state\n\t */\n\tloading?: boolean;\n\t/**\n\t * is the zoom-bar in locked state\n\t */\n\tlocked?: boolean;\n\t/**\n\t * whether the zoom bar is showing a slider view or a graph view etc.\n\t */\n\ttype?: ZoomBarTypes;\n\t/**\n\t * an two element array which represents the initial zoom domain\n\t */\n\tinitialZoomDomain?: Object[];\n\t/**\n\t * options related to zoom bar data\n\t */\n\tdata?: Object[];\n}\n"]}
|
package/model/treemap.js
CHANGED
|
@@ -13,6 +13,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
})();
|
|
14
14
|
// Internal Imports
|
|
15
15
|
import { ChartModel } from './model';
|
|
16
|
+
import { Tools } from '../tools';
|
|
16
17
|
/**
|
|
17
18
|
* The treemap chart model layer
|
|
18
19
|
*/
|
|
@@ -25,9 +26,15 @@ var TreemapChartModel = /** @class */ (function (_super) {
|
|
|
25
26
|
var displayData = this.getDisplayData();
|
|
26
27
|
var result = [['Child', 'Group', 'Value']];
|
|
27
28
|
displayData.forEach(function (datum) {
|
|
28
|
-
datum.children
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
if (Array.isArray(datum.children)) {
|
|
30
|
+
datum.children.forEach(function (child) {
|
|
31
|
+
result.push([child.name, datum.name, child.value]);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
else if (Tools.getProperty(datum.name) !== null &&
|
|
35
|
+
Tools.getProperty(datum.value)) {
|
|
36
|
+
result.push(["–", datum.name, datum.value]);
|
|
37
|
+
}
|
|
31
38
|
});
|
|
32
39
|
return result;
|
|
33
40
|
};
|
package/model/treemap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treemap.js","sourceRoot":"","sources":["treemap.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"treemap.js","sourceRoot":"","sources":["treemap.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC;;GAEG;AACH;IAAuC,qCAAU;IAC/C,2BAAY,QAAa;eACvB,kBAAM,QAAQ,CAAC;IACjB,CAAC;IAED,+CAAmB,GAAnB;QACE,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAE1C,IAAM,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QAE7C,WAAW,CAAC,OAAO,CAAC,UAAC,KAAK;YACxB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBACjC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;oBAC3B,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;gBACrD,CAAC,CAAC,CAAC;aACJ;iBAAM,IACL,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI;gBACtC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,EAC9B;gBACA,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;aAC7C;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,wBAAC;AAAD,CAAC,AAzBD,CAAuC,UAAU,GAyBhD","sourcesContent":["// Internal Imports\nimport { ChartModel } from './model';\nimport { Tools } from '../tools';\n\n/**\n * The treemap chart model layer\n */\nexport class TreemapChartModel extends ChartModel {\n constructor(services: any) {\n super(services);\n }\n\n getTabularDataArray() {\n const displayData = this.getDisplayData();\n\n const result = [['Child', 'Group', 'Value']];\n\n displayData.forEach((datum) => {\n if (Array.isArray(datum.children)) {\n datum.children.forEach((child) => {\n result.push([child.name, datum.name, child.value]);\n });\n } else if (\n Tools.getProperty(datum.name) !== null &&\n Tools.getProperty(datum.value)\n ) {\n result.push([\"–\", datum.name, datum.value]);\n }\n });\n\n return result;\n }\n}\n"]}
|
package/package.json
CHANGED
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"signature": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88"
|
|
155
155
|
},
|
|
156
156
|
"../src/configuration.ts": {
|
|
157
|
-
"version": "
|
|
157
|
+
"version": "0e14ed682c0c42ed3a12c2dbb0f22bd2a7b6515f69c95d9742fae67154485546",
|
|
158
158
|
"signature": "bf067832dce54806fcbae20b3c812f4f4c87f362d322ede6f3bc416a92d9dbcd"
|
|
159
159
|
},
|
|
160
160
|
"../../../node_modules/@types/d3-time/index.d.ts": {
|
|
@@ -242,8 +242,8 @@
|
|
|
242
242
|
"signature": "e13ca1760c1d894f0cbb054be895f12207ff8a8708be12a18944832c02dd7ab2"
|
|
243
243
|
},
|
|
244
244
|
"../src/interfaces/components.ts": {
|
|
245
|
-
"version": "
|
|
246
|
-
"signature": "
|
|
245
|
+
"version": "b4112fc9b7a3097ddcf53dccbf035a241d750725da80b6f08cd6a8234ac98910",
|
|
246
|
+
"signature": "841228db24352df234b121168742ee73b9657d195d84f99b336322a692f61905"
|
|
247
247
|
},
|
|
248
248
|
"../../../node_modules/@types/d3-axis/index.d.ts": {
|
|
249
249
|
"version": "b3393902df89f63a8da74a8003ee951164b2556608d256c248d6d79510becbb2",
|
|
@@ -254,8 +254,8 @@
|
|
|
254
254
|
"signature": "c9e5b626cb6cc90b535dcaa930e64a4e033bfcb132abfd16a07edc4deeb1d99c"
|
|
255
255
|
},
|
|
256
256
|
"../src/interfaces/charts.ts": {
|
|
257
|
-
"version": "
|
|
258
|
-
"signature": "
|
|
257
|
+
"version": "ee9b0d121d33b4b98ff426b913abf9381ec121c647cfa93413d9abca6478d1be",
|
|
258
|
+
"signature": "0a1a321f59ac9dbe13703d28c6438c73ab34410fd6eae306c3fa9fb669923cc9"
|
|
259
259
|
},
|
|
260
260
|
"../src/interfaces/layout.ts": {
|
|
261
261
|
"version": "684de2d7c612bd74a9d8e866b0b94cc53bd824422be4b3d216dc6682614e5fe8",
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
"signature": "b50b9e4e54f85f3404cce1663d2b2328d3655247abfb90de37af3a26c4f2b4da"
|
|
339
339
|
},
|
|
340
340
|
"../src/components/graphs/bar.ts": {
|
|
341
|
-
"version": "
|
|
341
|
+
"version": "372d739a396b12b17e894424210f2b2293f2f3ed22ce6efa7d5003939d92d9a1",
|
|
342
342
|
"signature": "84bb153c86d8d45c6787f09d7c1b1a8088511049341e51fae3fc78b53dfa792a"
|
|
343
343
|
},
|
|
344
344
|
"../src/components/graphs/bar-simple.ts": {
|
|
@@ -350,7 +350,7 @@
|
|
|
350
350
|
"signature": "e9df64cff365d44924363c2399208593f62c626f724cb960469ccc79358dac1d"
|
|
351
351
|
},
|
|
352
352
|
"../src/components/graphs/bar-stacked.ts": {
|
|
353
|
-
"version": "
|
|
353
|
+
"version": "41a21e328bcc0db865a83ebc3a8fbfd4fb3e62bec91f74bdd78bac9b72da8369",
|
|
354
354
|
"signature": "4b1d138dbfffdc47adf6486a28996e85599bec8dfaa8c833fb277003848d97af"
|
|
355
355
|
},
|
|
356
356
|
"../src/components/graphs/boxplot.ts": {
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
"signature": "7d859d70e1bbacb22d526f82e3370b5d6d1d748a934fc2b21121cb3eeb3a4d30"
|
|
415
415
|
},
|
|
416
416
|
"../src/components/graphs/treemap.ts": {
|
|
417
|
-
"version": "
|
|
417
|
+
"version": "b554642680a8f637a94a5da73357a4e0d66dbb3956f0fcd6474d94e5d1994993",
|
|
418
418
|
"signature": "a9b0d32f1fa317d79f856036abed65ce6367b88d367ef743886ac6bd76f7adc7"
|
|
419
419
|
},
|
|
420
420
|
"../src/services/angle-utils.ts": {
|
|
@@ -422,7 +422,7 @@
|
|
|
422
422
|
"signature": "4798872bc73b632e7cbb5dcb7211c2d991234c273068d0dbc0c87f0e776d0ce4"
|
|
423
423
|
},
|
|
424
424
|
"../src/components/graphs/radar.ts": {
|
|
425
|
-
"version": "
|
|
425
|
+
"version": "28535dfe2b5adb891f66acc7d58ac4effc62cf2f14a0f1ce0b4e7bf3965585c2",
|
|
426
426
|
"signature": "9da37caa7dbc85f04fb3b8471e8a7e732298bd5bc664c399fecc6c0003850e6c"
|
|
427
427
|
},
|
|
428
428
|
"../src/components/graphs/circle-pack.ts": {
|
|
@@ -598,7 +598,7 @@
|
|
|
598
598
|
"signature": "3a1fe784c2963d2d901699458743db24c1a67b21272773f70df4d78dbef63914"
|
|
599
599
|
},
|
|
600
600
|
"../src/charts/meter.ts": {
|
|
601
|
-
"version": "
|
|
601
|
+
"version": "d3096fc30b085556b345c9324b4360d6e315a11c7e1d8420da31ef03893c9fd4",
|
|
602
602
|
"signature": "f6d5c0867ab7123af740241442019544fa419e988af53618bd548a765e754be5"
|
|
603
603
|
},
|
|
604
604
|
"../src/model/radar.ts": {
|
|
@@ -630,7 +630,7 @@
|
|
|
630
630
|
"signature": "d4d8680637e717cadcd75d616929c3e90d1d5c6c37794df11d787b4a0d22c99a"
|
|
631
631
|
},
|
|
632
632
|
"../src/model/treemap.ts": {
|
|
633
|
-
"version": "
|
|
633
|
+
"version": "5f5374892d8a026e412b8b82986d95b413d28c5c08442a5d659bf672ab26cf51",
|
|
634
634
|
"signature": "fabc2a1487abea447bde3930e1d4b1bd6d7295b3e26f4e5a36572044ad4f9224"
|
|
635
635
|
},
|
|
636
636
|
"../src/charts/treemap.ts": {
|
|
@@ -1658,6 +1658,7 @@
|
|
|
1658
1658
|
"../src/components/graphs/bar.ts": [
|
|
1659
1659
|
"../src/components/component.ts",
|
|
1660
1660
|
"../src/services/index.ts",
|
|
1661
|
+
"../src/tools.ts",
|
|
1661
1662
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1662
1663
|
"../node_modules/@types/node/fs.d.ts",
|
|
1663
1664
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -2580,6 +2581,7 @@
|
|
|
2580
2581
|
],
|
|
2581
2582
|
"../src/model/treemap.ts": [
|
|
2582
2583
|
"../src/model/model.ts",
|
|
2584
|
+
"../src/tools.ts",
|
|
2583
2585
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
2584
2586
|
"../node_modules/@types/node/fs.d.ts",
|
|
2585
2587
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|