@fluentui/react-charting 5.23.12 → 5.23.13
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.json +22 -1
- package/CHANGELOG.md +12 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/AreaChart/AreaChart.base.js +8 -13
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +1 -2
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +9 -10
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +3 -3
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +3 -3
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -3
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/Legends/Legends.base.js +1 -2
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +14 -23
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +2 -8
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.js +2 -1
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.js +4 -4
- package/lib/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib/components/PieChart/PieChart.base.js +4 -4
- package/lib/components/PieChart/PieChart.base.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js +9 -14
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +4 -5
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +3 -3
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.js +1 -2
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +30 -44
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +10 -17
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js +4 -5
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js +8 -13
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -2
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js +9 -10
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +3 -3
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js +3 -3
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.types.js +2 -2
- package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -3
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.js +1 -2
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +14 -23
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js +2 -8
- package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.js +2 -1
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/PieChart/Pie/Pie.js +4 -4
- package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/PieChart/PieChart.base.js +4 -4
- package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js +9 -14
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +4 -5
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +3 -3
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.base.js +1 -2
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.types.js +2 -2
- package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +30 -44
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +10 -17
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/utilities/SVGTooltipText.js +4 -5
- package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
- package/lib-amd/utilities/utilities.js +5 -5
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +8 -13
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +9 -10
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +3 -3
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +3 -3
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +2 -2
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -3
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +1 -2
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +14 -23
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +2 -8
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js +2 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.js +4 -4
- package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js +4 -4
- package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +9 -14
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +4 -5
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +3 -3
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.js +1 -2
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.types.js +2 -2
- package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +30 -44
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +10 -17
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +4 -5
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +5 -5
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeChart.base.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,SAA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OAAO,EAAP,CAAO,CAAC,CAAK;oBACvE,2BAAG,SAAS,EAAC,SAAS,IAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAA,OAAO,IAAI,OAAA,OAAO,EAAP,CAAO,CAAC,CAAK,CACnE,CACF,CACI,CACb,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAnGD,CAAmC,KAAK,CAAC,SAAS,GAmGjD","sourcesContent":["import * as React from 'react';\nimport { hierarchy, tree } from 'd3-hierarchy';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { select, selectAll } from 'd3-selection';\nimport { FocusZone } from '@fluentui/react-focus';\nimport { max as d3Max, min as d3Min } from 'd3-array';\n\nimport {\n ITreeProps,\n ITreeState,\n ITreeDataStructure,\n ITreeChartDataPoint,\n ITreeStyleProps,\n ITreeStyles,\n} from '../../index';\nimport { IMargins } from '../../utilities/utilities';\n\nconst getClassNames = classNamesFunction<ITreeStyleProps, ITreeStyles>();\n\n// Create a parent class for common tree components\nclass StandardTree {\n public treeData: ITreeChartDataPoint;\n public styleClassNames: IProcessedStyleSet<ITreeStyles>;\n\n private _nodeElements: JSX.Element[] = [];\n private _linkElements: JSX.Element[] = [];\n\n constructor(\n treeData: ITreeChartDataPoint,\n styleClassNames: IProcessedStyleSet<ITreeStyles>,\n _nodeElements: JSX.Element[] = [],\n _linkElements: JSX.Element[] = [],\n ) {\n this.treeData = treeData;\n this.styleClassNames = styleClassNames;\n this._nodeElements = _nodeElements;\n this._linkElements = _linkElements;\n }\n\n public truncateText(text: string, rectangleWidth: number, padding: number, styleClass: string | undefined) {\n let truncatedText = '';\n const words = text.split(/\\s+/).reverse();\n let word: string = '';\n const tspan = select('.svgTree').append('text').attr('class', 'tempText').append('tspan').text(null);\n\n if (styleClass) {\n tspan.attr('class', styleClass);\n }\n\n const line: string[] = [];\n while ((word = words.pop()!)) {\n line.push(word);\n tspan.text(line.join(' ') + ' ');\n if (tspan.node() !== null) {\n const w = tspan.node()!.getComputedTextLength();\n if (w > rectangleWidth - padding) {\n line.pop();\n line.push('...');\n break;\n }\n }\n }\n\n truncatedText = line.join(' ') + ' ';\n tspan.text(null);\n selectAll('.tempText').remove();\n return truncatedText;\n }\n\n // Append node elements\n // nodeId to create unique key\n public addNodeShapetoSVG(\n name: string,\n subname: string | undefined,\n bodytext: string | undefined,\n metricName: string | undefined,\n xCenterCoordinate: number,\n yCoordinate: number,\n fillColor: string,\n rectangleWidth: number,\n rectangleHeight: number,\n nodeId: number,\n parentInfo: string,\n ) {\n const ariaLabel = `nodeId: ${nodeId} \\nnodeMainText: ${name}\\nsubText ${subname} ${parentInfo}`;\n const xCoordinate = xCenterCoordinate - rectangleWidth / 2;\n if (metricName || nodeId !== 0 || !bodytext) {\n this._nodeElements.push(\n <rect\n width={rectangleWidth}\n height={rectangleHeight}\n x={xCoordinate}\n y={yCoordinate}\n tabIndex={0}\n role={'text'}\n data-is-focusable={true}\n aria-label={ariaLabel}\n className={this.styleClassNames.rectNode}\n stroke={fillColor}\n key={`${nodeId}${this.styleClassNames.rectNode}`}\n />,\n );\n }\n\n if (subname) {\n subname = this.truncateText(subname, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectSubText);\n }\n if (bodytext) {\n bodytext = this.truncateText(bodytext, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectBodyText);\n }\n if (metricName) {\n metricName = this.truncateText(\n metricName,\n rectangleWidth,\n rectangleWidth / 4,\n this.styleClassNames.rectMetricText,\n );\n }\n name = this.truncateText(name, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectText);\n\n // Text position y = y + rectHeight/2, 2 is ratio for depth\n // Text position x = x + rectWidth/2, 2 is ratio for length\n // Sub-text position x = x + rectWidth/2, 2 is ratio for length\n\n const subValue = metricName ? (\n <tspan className={this.styleClassNames.rectMetricText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {metricName}\n </tspan>\n ) : bodytext ? (\n <>\n <tspan className={this.styleClassNames.rectSubText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {subname}\n </tspan>\n <tspan className={this.styleClassNames.rectBodyText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {bodytext}\n </tspan>\n </>\n ) : (\n <tspan className={this.styleClassNames.rectSubText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {subname}\n </tspan>\n );\n\n if (!subname && !metricName && !bodytext) {\n this._nodeElements.push(\n <text\n textAnchor=\"middle\"\n className={this.styleClassNames.rectMetricText}\n dy={yCoordinate + rectangleHeight / 1.6}\n x={xCoordinate + rectangleWidth / 2}\n key={`${nodeId}${this.styleClassNames.rectText}`}\n data-is-focusable={nodeId === 0}\n >\n {name}\n </text>,\n );\n } else {\n this._nodeElements.push(\n <text\n textAnchor=\"middle\"\n className={metricName ? this.styleClassNames.rectSubText : this.styleClassNames.rectText}\n dy={metricName ? yCoordinate + rectangleHeight / 2.5 : yCoordinate + rectangleHeight / 2}\n x={xCoordinate + rectangleWidth / 2}\n key={`${nodeId}${this.styleClassNames.rectText}`}\n data-is-focusable={nodeId === 0}\n >\n {name}\n {subValue}\n </text>,\n );\n }\n }\n // Create a rectangular path from parent to the child nodes\n public createPathLink(\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n childXMax: number,\n ): string {\n // gap adds ratio for parent.y to child.y\n\n /*Below code is used to draw lines(___|) to show the parent child relation i.e a vertical line\n emerging from the parent and\n then a horzontal line encompassing all the its children which are\n shown below it .so it gives a visual representation of tree branches.\n\n So for making this path firstly we are moving to the childX which is the mid point of the node and then\n we are subtracting the half of rectwidth to move the complete width of the rectangle and\n we are subtracting gap from y cordinate as we are making this line at a little gap from node.\n Then we are building that line horizonatlly till childXmax, again adding half rectwidth to complete\n the line till end as childXmax will be midpoint.\n Then last part is for making line vertical for that we move to the parentx position and\n then draw the vertical till parenty + rectHeight + gap/2\n We have seperate path for leaf node as we are using different composition like compact, long etc.*/\n\n const path = `M${childX - rectWidth / 2},${childY - gap} H${childXMax + rectWidth / 2} M${parentX},${childY - gap}\n V${parentY + rectHeight + gap / 2}`;\n\n const leafpath = `M${parentX},${parentY + rectHeight + gap / 2} V${parentY + gap * 5}\n H${parentX - rectWidth / 2} H${parentX + rectWidth / 2}`;\n\n // based on the type of node return leafpath or path element\n return leaf ? leafpath : path;\n }\n\n // Append path link element\n public addLinktoSVG(\n nodeId: number,\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n childXMax: number = 0,\n ) {\n this._linkElements.push(\n <path\n className={this.styleClassNames.link}\n d={this.createPathLink(parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap, childXMax)}\n key={`${nodeId}${this.styleClassNames.link}`}\n />,\n );\n }\n}\n\n// Create child class to Add Tree component based on treeHeight\nclass LayeredTree extends StandardTree {\n public composition: number | undefined;\n private _treeTraversal: number | undefined;\n constructor(\n treeData: ITreeChartDataPoint,\n composition: number | undefined,\n styleClassNames: IProcessedStyleSet<ITreeStyles>,\n _nodeElements: JSX.Element[] = [],\n _linkElements: JSX.Element[] = [],\n _treeTraversal: number | undefined,\n ) {\n super(treeData, styleClassNames, _nodeElements, _linkElements);\n this.composition = composition;\n this._treeTraversal = _treeTraversal;\n }\n public createTree(givenLayoutWidth: number | undefined, screenWidth: number) {\n givenLayoutWidth = givenLayoutWidth! < 65 ? 65 : givenLayoutWidth! > 90 ? 90 : givenLayoutWidth;\n const layoutWidth = givenLayoutWidth || 75;\n const root = hierarchy(this.treeData, d => {\n return d.children;\n });\n\n // Find tree Height\n const treeHeight = root?.height + 1;\n\n // Create tree layout, width: layoutWidth, height: layoutWidth/1.5 and add node separation\n const treeChart = tree()\n .nodeSize([layoutWidth, layoutWidth / 1.5])\n .separation((a, b) => {\n return a.parent === root && b.parent === root ? 3.5 : 1;\n });\n\n // Assigns the x and y position for the nodes\n const treeData = treeChart(root);\n\n // Compute the new tree layout.\n const nodes = treeData.descendants();\n\n // Normalize for fixed-depth and width\n // Normalise y coordinate by depth of each node by a factor of 130\n // Normalise x coordinate by start coordinate 0 with screenSize/3\n nodes.forEach(d => {\n d.y = d.depth === 0 ? 10 : d.depth * 130;\n d.x += screenWidth / 2;\n });\n\n // <------------------ Traversal section ------------------>\n\n // Create tree data structure\n const treeDataStructure: Array<ITreeDataStructure> = [];\n let TreeID: number = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const createTreeDataStructure = (d: any) => {\n d.id = TreeID;\n treeDataStructure.push({\n id: TreeID,\n children: d.children,\n dataName: d.data.name,\n subName: d.data.subname,\n bodyText: d.data.bodytext,\n metricName: d.data?.metric,\n fill: d.data.fill,\n x: d.x,\n y: d.y,\n parentID: d.parent?.id,\n });\n TreeID++;\n };\n\n this._treeTraversal === 0\n ? root.each(d => {\n createTreeDataStructure(d);\n })\n : root.eachBefore(d => {\n createTreeDataStructure(d);\n });\n\n const rectWidth = layoutWidth * 3;\n const rectHeight = rectWidth / 3.45;\n const gap: number = 20;\n const parentSet = new Set();\n\n for (const d of treeDataStructure) {\n const parentInfo =\n d.id === 0\n ? 'Root Node'\n : `Parent info parentId: ${d.parentID}\n ${treeDataStructure[d.parentID].dataName}\n ${treeDataStructure[d.parentID].subName}`;\n\n // check for leaf nodes\n if (!d.children && !parentSet.has(d.parentID) && treeHeight === 3) {\n const compactNodeWidth = (rectWidth - gap) / 2;\n const compactNodeHeight = rectHeight;\n parentSet.add(d.parentID);\n\n // <------------------ Links section ------------------>\n this.addLinktoSVG(\n d.id,\n treeDataStructure[d.parentID].x,\n treeDataStructure[d.parentID].y,\n treeDataStructure[d.id].x,\n treeDataStructure[d.id].y,\n true,\n rectWidth,\n rectHeight,\n gap,\n );\n\n // <------------------ Nodes section ------------------>\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children: any = treeDataStructure[d.parentID]?.children;\n\n const compactNodeCenterX1: number = treeDataStructure[d.parentID]?.x - compactNodeWidth / 2 - gap / 2;\n const compactNodeCenterX2: number = treeDataStructure[d.parentID]?.x + compactNodeWidth / 2 + gap / 2;\n const longNodeCenterX: number = treeDataStructure[d.parentID]?.x;\n let dy: number = children[0]?.y;\n\n for (let itr = 0; itr < children.length; ++itr) {\n const child = children[itr];\n\n // Given Composition\n if (this.composition !== undefined) {\n // For compact compostion\n if (this.composition === 0) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n // If the leaf node count is 1 ,\n //irrespective of provided composition we should always use long composition\n itr % 2 === 0 ? (children.length === 1 ? longNodeCenterX : compactNodeCenterX1) : compactNodeCenterX2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : compactNodeWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += compactNodeHeight + gap;\n }\n }\n // For long compostion\n else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n longNodeCenterX,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += compactNodeHeight + gap;\n }\n }\n\n // Automatic Node Composition\n else {\n if (children.length > 2) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n itr % 2 === 0 ? compactNodeCenterX1 : compactNodeCenterX2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : compactNodeWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += compactNodeHeight + gap;\n }\n } else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n longNodeCenterX,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += compactNodeHeight + gap;\n }\n }\n }\n }\n\n if (d.children || treeHeight <= 2) {\n // <------------------ Nodes section ------------------>\n // Since the height <=2 we will be using long compositon.\n this.addNodeShapetoSVG(\n d.dataName,\n d.subName,\n d.bodyText,\n d.metricName,\n d.x,\n d.y,\n d.fill,\n rectWidth,\n rectHeight,\n d.id,\n parentInfo,\n );\n\n // <------------------ Links section ------------------>\n if (d.id === 0 && d.children) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children: any = treeDataStructure[d.id]?.children;\n const childXMin = d3Min(children, (child: ITreeDataStructure) => child.x as number)!;\n const childXMax = d3Max(children, (child: ITreeDataStructure) => child.x as number)!;\n this.addLinktoSVG(d.id, d.x, d.y, childXMin, d.children[0].y, false, rectWidth, rectHeight, gap, childXMax);\n }\n }\n }\n }\n}\n\nexport class TreeChartBase extends React.Component<ITreeProps, ITreeState> {\n private _treeData: ITreeChartDataPoint;\n private _width: number;\n private _height: number;\n private _composition: number | undefined;\n private _classNames: IProcessedStyleSet<ITreeStyles>;\n private _margin: IMargins;\n private _nodeElements: JSX.Element[] = [];\n private _linkElements: JSX.Element[] = [];\n private _treeTraversal: number | undefined;\n\n constructor(props: ITreeProps) {\n super(props);\n this._margin = {\n top: this.props.margins?.top || 30,\n bottom: this.props.margins?.bottom || 30,\n left: this.props.margins?.left || 50,\n right: this.props.margins?.right || 20,\n };\n this._width = this.props.width || 1500;\n this._height = this.props.height || 700;\n this._treeData = this.props.treeData;\n this._composition = this.props?.composition;\n this._treeTraversal = this.props.treeTraversal;\n\n this.state = {\n _width: this._width,\n _height: this._height,\n };\n }\n\n public componentDidMount() {\n const { theme, className, styles } = this.props;\n\n // Get classNames to create component styling\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n // Call createTreeChart function in componentDidMount\n this.createTreeChart();\n\n this.setState({\n _width: this.props.width || 1500,\n _height: this.props.height || 700,\n });\n }\n\n public componentDidUpdate(prevProps: ITreeProps): void {\n if (prevProps.layoutWidth !== this.props.layoutWidth) {\n const svgText = selectAll('text');\n const svgRect = selectAll('rect');\n const svgLink = selectAll('path');\n\n if (this._nodeElements.length === 0 && this._linkElements.length === 0) {\n svgText.remove();\n svgRect.remove();\n svgLink.remove();\n }\n\n this.createTreeChart();\n }\n }\n public createTreeChart() {\n const nodeElements: JSX.Element[] = [];\n const linkElements: JSX.Element[] = [];\n\n // Instantiate inherited class and call createTree function for the object\n const treeObject = new LayeredTree(\n this._treeData,\n this._composition,\n this._classNames,\n nodeElements,\n linkElements,\n this._treeTraversal,\n );\n const width = this.state._width - this._margin.left! - this._margin.right!;\n treeObject.createTree(this.props.layoutWidth, width);\n this._nodeElements = nodeElements;\n this._linkElements = linkElements;\n }\n\n public render(): JSX.Element {\n return (\n <FocusZone>\n <div className={this._classNames?.root}>\n <svg\n className=\"svgTree\"\n width={this.state._width - this._margin.left! - this._margin.right!}\n height={this.state._height - this._margin.top! - this._margin.bottom!}\n >\n <g className=\"svgNode\">{this._nodeElements.map(element => element)}</g>\n <g className=\"svgLink\">{this._linkElements.map(element => element)}</g>\n </svg>\n </div>\n </FocusZone>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TreeChart.base.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC;AAYtD,IAAM,aAAa,GAAG,kBAAkB,EAAgC,CAAC;AAEzE,mDAAmD;AACnD;IAOE,sBACE,QAA6B,EAC7B,eAAgD,EAChD,aAAiC,EACjC,aAAiC;QADj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tree } from 'd3-hierarchy';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { select, selectAll } from 'd3-selection';\nimport { FocusZone } from '@fluentui/react-focus';\nimport { max as d3Max, min as d3Min } from 'd3-array';\n\nimport {\n ITreeProps,\n ITreeState,\n ITreeDataStructure,\n ITreeChartDataPoint,\n ITreeStyleProps,\n ITreeStyles,\n} from '../../index';\nimport { IMargins } from '../../utilities/utilities';\n\nconst getClassNames = classNamesFunction<ITreeStyleProps, ITreeStyles>();\n\n// Create a parent class for common tree components\nclass StandardTree {\n public treeData: ITreeChartDataPoint;\n public styleClassNames: IProcessedStyleSet<ITreeStyles>;\n\n private _nodeElements: JSX.Element[] = [];\n private _linkElements: JSX.Element[] = [];\n\n constructor(\n treeData: ITreeChartDataPoint,\n styleClassNames: IProcessedStyleSet<ITreeStyles>,\n _nodeElements: JSX.Element[] = [],\n _linkElements: JSX.Element[] = [],\n ) {\n this.treeData = treeData;\n this.styleClassNames = styleClassNames;\n this._nodeElements = _nodeElements;\n this._linkElements = _linkElements;\n }\n\n public truncateText(text: string, rectangleWidth: number, padding: number, styleClass: string | undefined) {\n let truncatedText = '';\n const words = text.split(/\\s+/).reverse();\n let word: string = '';\n const tspan = select('.svgTree').append('text').attr('class', 'tempText').append('tspan').text(null);\n\n if (styleClass) {\n tspan.attr('class', styleClass);\n }\n\n const line: string[] = [];\n while ((word = words.pop()!)) {\n line.push(word);\n tspan.text(line.join(' ') + ' ');\n if (tspan.node() !== null) {\n const w = tspan.node()!.getComputedTextLength();\n if (w > rectangleWidth - padding) {\n line.pop();\n line.push('...');\n break;\n }\n }\n }\n\n truncatedText = line.join(' ') + ' ';\n tspan.text(null);\n selectAll('.tempText').remove();\n return truncatedText;\n }\n\n // Append node elements\n // nodeId to create unique key\n public addNodeShapetoSVG(\n name: string,\n subname: string | undefined,\n bodytext: string | undefined,\n metricName: string | undefined,\n xCenterCoordinate: number,\n yCoordinate: number,\n fillColor: string,\n rectangleWidth: number,\n rectangleHeight: number,\n nodeId: number,\n parentInfo: string,\n ) {\n const ariaLabel = `nodeId: ${nodeId} \\nnodeMainText: ${name}\\nsubText ${subname} ${parentInfo}`;\n const xCoordinate = xCenterCoordinate - rectangleWidth / 2;\n if (metricName || nodeId !== 0 || !bodytext) {\n this._nodeElements.push(\n <rect\n width={rectangleWidth}\n height={rectangleHeight}\n x={xCoordinate}\n y={yCoordinate}\n tabIndex={0}\n role={'text'}\n data-is-focusable={true}\n aria-label={ariaLabel}\n className={this.styleClassNames.rectNode}\n stroke={fillColor}\n key={`${nodeId}${this.styleClassNames.rectNode}`}\n />,\n );\n }\n\n if (subname) {\n subname = this.truncateText(subname, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectSubText);\n }\n if (bodytext) {\n bodytext = this.truncateText(bodytext, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectBodyText);\n }\n if (metricName) {\n metricName = this.truncateText(\n metricName,\n rectangleWidth,\n rectangleWidth / 4,\n this.styleClassNames.rectMetricText,\n );\n }\n name = this.truncateText(name, rectangleWidth, rectangleWidth / 4, this.styleClassNames.rectText);\n\n // Text position y = y + rectHeight/2, 2 is ratio for depth\n // Text position x = x + rectWidth/2, 2 is ratio for length\n // Sub-text position x = x + rectWidth/2, 2 is ratio for length\n\n const subValue = metricName ? (\n <tspan className={this.styleClassNames.rectMetricText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {metricName}\n </tspan>\n ) : bodytext ? (\n <>\n <tspan className={this.styleClassNames.rectSubText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {subname}\n </tspan>\n <tspan className={this.styleClassNames.rectBodyText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {bodytext}\n </tspan>\n </>\n ) : (\n <tspan className={this.styleClassNames.rectSubText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {subname}\n </tspan>\n );\n\n if (!subname && !metricName && !bodytext) {\n this._nodeElements.push(\n <text\n textAnchor=\"middle\"\n className={this.styleClassNames.rectMetricText}\n dy={yCoordinate + rectangleHeight / 1.6}\n x={xCoordinate + rectangleWidth / 2}\n key={`${nodeId}${this.styleClassNames.rectText}`}\n data-is-focusable={nodeId === 0}\n >\n {name}\n </text>,\n );\n } else {\n this._nodeElements.push(\n <text\n textAnchor=\"middle\"\n className={metricName ? this.styleClassNames.rectSubText : this.styleClassNames.rectText}\n dy={metricName ? yCoordinate + rectangleHeight / 2.5 : yCoordinate + rectangleHeight / 2}\n x={xCoordinate + rectangleWidth / 2}\n key={`${nodeId}${this.styleClassNames.rectText}`}\n data-is-focusable={nodeId === 0}\n >\n {name}\n {subValue}\n </text>,\n );\n }\n }\n // Create a rectangular path from parent to the child nodes\n public createPathLink(\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n childXMax: number,\n ): string {\n // gap adds ratio for parent.y to child.y\n\n /*Below code is used to draw lines(___|) to show the parent child relation i.e a vertical line\n emerging from the parent and\n then a horzontal line encompassing all the its children which are\n shown below it .so it gives a visual representation of tree branches.\n\n So for making this path firstly we are moving to the childX which is the mid point of the node and then\n we are subtracting the half of rectwidth to move the complete width of the rectangle and\n we are subtracting gap from y cordinate as we are making this line at a little gap from node.\n Then we are building that line horizonatlly till childXmax, again adding half rectwidth to complete\n the line till end as childXmax will be midpoint.\n Then last part is for making line vertical for that we move to the parentx position and\n then draw the vertical till parenty + rectHeight + gap/2\n We have seperate path for leaf node as we are using different composition like compact, long etc.*/\n\n const path = `M${childX - rectWidth / 2},${childY - gap} H${childXMax + rectWidth / 2} M${parentX},${childY - gap}\n V${parentY + rectHeight + gap / 2}`;\n\n const leafpath = `M${parentX},${parentY + rectHeight + gap / 2} V${parentY + gap * 5}\n H${parentX - rectWidth / 2} H${parentX + rectWidth / 2}`;\n\n // based on the type of node return leafpath or path element\n return leaf ? leafpath : path;\n }\n\n // Append path link element\n public addLinktoSVG(\n nodeId: number,\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n childXMax: number = 0,\n ) {\n this._linkElements.push(\n <path\n className={this.styleClassNames.link}\n d={this.createPathLink(parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap, childXMax)}\n key={`${nodeId}${this.styleClassNames.link}`}\n />,\n );\n }\n}\n\n// Create child class to Add Tree component based on treeHeight\nclass LayeredTree extends StandardTree {\n public composition: number | undefined;\n private _treeTraversal: number | undefined;\n constructor(\n treeData: ITreeChartDataPoint,\n composition: number | undefined,\n styleClassNames: IProcessedStyleSet<ITreeStyles>,\n _nodeElements: JSX.Element[] = [],\n _linkElements: JSX.Element[] = [],\n _treeTraversal: number | undefined,\n ) {\n super(treeData, styleClassNames, _nodeElements, _linkElements);\n this.composition = composition;\n this._treeTraversal = _treeTraversal;\n }\n public createTree(givenLayoutWidth: number | undefined, screenWidth: number) {\n givenLayoutWidth = givenLayoutWidth! < 65 ? 65 : givenLayoutWidth! > 90 ? 90 : givenLayoutWidth;\n const layoutWidth = givenLayoutWidth || 75;\n const root = hierarchy(this.treeData, d => {\n return d.children;\n });\n\n // Find tree Height\n const treeHeight = root?.height + 1;\n\n // Create tree layout, width: layoutWidth, height: layoutWidth/1.5 and add node separation\n const treeChart = tree()\n .nodeSize([layoutWidth, layoutWidth / 1.5])\n .separation((a, b) => {\n return a.parent === root && b.parent === root ? 3.5 : 1;\n });\n\n // Assigns the x and y position for the nodes\n const treeData = treeChart(root);\n\n // Compute the new tree layout.\n const nodes = treeData.descendants();\n\n // Normalize for fixed-depth and width\n // Normalise y coordinate by depth of each node by a factor of 130\n // Normalise x coordinate by start coordinate 0 with screenSize/3\n nodes.forEach(d => {\n d.y = d.depth === 0 ? 10 : d.depth * 130;\n d.x += screenWidth / 2;\n });\n\n // <------------------ Traversal section ------------------>\n\n // Create tree data structure\n const treeDataStructure: Array<ITreeDataStructure> = [];\n let TreeID: number = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const createTreeDataStructure = (d: any) => {\n d.id = TreeID;\n treeDataStructure.push({\n id: TreeID,\n children: d.children,\n dataName: d.data.name,\n subName: d.data.subname,\n bodyText: d.data.bodytext,\n metricName: d.data?.metric,\n fill: d.data.fill,\n x: d.x,\n y: d.y,\n parentID: d.parent?.id,\n });\n TreeID++;\n };\n\n this._treeTraversal === 0\n ? root.each(d => {\n createTreeDataStructure(d);\n })\n : root.eachBefore(d => {\n createTreeDataStructure(d);\n });\n\n const rectWidth = layoutWidth * 3;\n const rectHeight = rectWidth / 3.45;\n const gap: number = 20;\n const parentSet = new Set();\n\n for (const d of treeDataStructure) {\n const parentInfo =\n d.id === 0\n ? 'Root Node'\n : `Parent info parentId: ${d.parentID}\n ${treeDataStructure[d.parentID].dataName}\n ${treeDataStructure[d.parentID].subName}`;\n\n // check for leaf nodes\n if (!d.children && !parentSet.has(d.parentID) && treeHeight === 3) {\n const compactNodeWidth = (rectWidth - gap) / 2;\n const compactNodeHeight = rectHeight;\n parentSet.add(d.parentID);\n\n // <------------------ Links section ------------------>\n this.addLinktoSVG(\n d.id,\n treeDataStructure[d.parentID].x,\n treeDataStructure[d.parentID].y,\n treeDataStructure[d.id].x,\n treeDataStructure[d.id].y,\n true,\n rectWidth,\n rectHeight,\n gap,\n );\n\n // <------------------ Nodes section ------------------>\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children: any = treeDataStructure[d.parentID]?.children;\n\n const compactNodeCenterX1: number = treeDataStructure[d.parentID]?.x - compactNodeWidth / 2 - gap / 2;\n const compactNodeCenterX2: number = treeDataStructure[d.parentID]?.x + compactNodeWidth / 2 + gap / 2;\n const longNodeCenterX: number = treeDataStructure[d.parentID]?.x;\n let dy: number = children[0]?.y;\n\n for (let itr = 0; itr < children.length; ++itr) {\n const child = children[itr];\n\n // Given Composition\n if (this.composition !== undefined) {\n // For compact compostion\n if (this.composition === 0) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n // If the leaf node count is 1 ,\n //irrespective of provided composition we should always use long composition\n itr % 2 === 0 ? (children.length === 1 ? longNodeCenterX : compactNodeCenterX1) : compactNodeCenterX2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : compactNodeWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += compactNodeHeight + gap;\n }\n }\n // For long compostion\n else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n longNodeCenterX,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += compactNodeHeight + gap;\n }\n }\n\n // Automatic Node Composition\n else {\n if (children.length > 2) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n itr % 2 === 0 ? compactNodeCenterX1 : compactNodeCenterX2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : compactNodeWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += compactNodeHeight + gap;\n }\n } else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.bodytext,\n child.data.metricName,\n longNodeCenterX,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += compactNodeHeight + gap;\n }\n }\n }\n }\n\n if (d.children || treeHeight <= 2) {\n // <------------------ Nodes section ------------------>\n // Since the height <=2 we will be using long compositon.\n this.addNodeShapetoSVG(\n d.dataName,\n d.subName,\n d.bodyText,\n d.metricName,\n d.x,\n d.y,\n d.fill,\n rectWidth,\n rectHeight,\n d.id,\n parentInfo,\n );\n\n // <------------------ Links section ------------------>\n if (d.id === 0 && d.children) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children: any = treeDataStructure[d.id]?.children;\n const childXMin = d3Min(children, (child: ITreeDataStructure) => child.x as number)!;\n const childXMax = d3Max(children, (child: ITreeDataStructure) => child.x as number)!;\n this.addLinktoSVG(d.id, d.x, d.y, childXMin, d.children[0].y, false, rectWidth, rectHeight, gap, childXMax);\n }\n }\n }\n }\n}\n\nexport class TreeChartBase extends React.Component<ITreeProps, ITreeState> {\n private _treeData: ITreeChartDataPoint;\n private _width: number;\n private _height: number;\n private _composition: number | undefined;\n private _classNames: IProcessedStyleSet<ITreeStyles>;\n private _margin: IMargins;\n private _nodeElements: JSX.Element[] = [];\n private _linkElements: JSX.Element[] = [];\n private _treeTraversal: number | undefined;\n\n constructor(props: ITreeProps) {\n super(props);\n this._margin = {\n top: this.props.margins?.top || 30,\n bottom: this.props.margins?.bottom || 30,\n left: this.props.margins?.left || 50,\n right: this.props.margins?.right || 20,\n };\n this._width = this.props.width || 1500;\n this._height = this.props.height || 700;\n this._treeData = this.props.treeData;\n this._composition = this.props?.composition;\n this._treeTraversal = this.props.treeTraversal;\n\n this.state = {\n _width: this._width,\n _height: this._height,\n };\n }\n\n public componentDidMount() {\n const { theme, className, styles } = this.props;\n\n // Get classNames to create component styling\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n // Call createTreeChart function in componentDidMount\n this.createTreeChart();\n\n this.setState({\n _width: this.props.width || 1500,\n _height: this.props.height || 700,\n });\n }\n\n public componentDidUpdate(prevProps: ITreeProps): void {\n if (prevProps.layoutWidth !== this.props.layoutWidth) {\n const svgText = selectAll('text');\n const svgRect = selectAll('rect');\n const svgLink = selectAll('path');\n\n if (this._nodeElements.length === 0 && this._linkElements.length === 0) {\n svgText.remove();\n svgRect.remove();\n svgLink.remove();\n }\n\n this.createTreeChart();\n }\n }\n public createTreeChart() {\n const nodeElements: JSX.Element[] = [];\n const linkElements: JSX.Element[] = [];\n\n // Instantiate inherited class and call createTree function for the object\n const treeObject = new LayeredTree(\n this._treeData,\n this._composition,\n this._classNames,\n nodeElements,\n linkElements,\n this._treeTraversal,\n );\n const width = this.state._width - this._margin.left! - this._margin.right!;\n treeObject.createTree(this.props.layoutWidth, width);\n this._nodeElements = nodeElements;\n this._linkElements = linkElements;\n }\n\n public render(): JSX.Element {\n return (\n <FocusZone>\n <div className={this._classNames?.root}>\n <svg\n className=\"svgTree\"\n width={this.state._width - this._margin.left! - this._margin.right!}\n height={this.state._height - this._margin.top! - this._margin.bottom!}\n >\n <g className=\"svgNode\">{this._nodeElements.map(element => element)}</g>\n <g className=\"svgLink\">{this._linkElements.map(element => element)}</g>\n </svg>\n </div>\n </FocusZone>\n );\n }\n}\n"]}
|
|
@@ -16,7 +16,7 @@ var CircleVisbility;
|
|
|
16
16
|
})(CircleVisbility || (CircleVisbility = {}));
|
|
17
17
|
var getClassNames = classNamesFunction();
|
|
18
18
|
var MIN_DOMAIN_MARGIN = 8;
|
|
19
|
-
|
|
19
|
+
var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
20
20
|
__extends(VerticalBarChartBase, _super);
|
|
21
21
|
function VerticalBarChartBase(props) {
|
|
22
22
|
var _this = _super.call(this, props) || this;
|
|
@@ -41,15 +41,14 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
41
41
|
yScale, containerHeight, containerWidth,
|
|
42
42
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
43
|
yScaleSecondary) {
|
|
44
|
-
var _a
|
|
45
|
-
var _c;
|
|
44
|
+
var _a;
|
|
46
45
|
if (containerHeight === void 0) { containerHeight = 0; }
|
|
47
46
|
if (containerWidth === void 0) { containerWidth = 0; }
|
|
48
47
|
var isStringAxis = _this._xAxisType === XAxisTypes.StringAxis;
|
|
49
48
|
var xBarScale = _this._getScales(containerHeight, containerWidth).xBarScale;
|
|
50
49
|
var colorScale = _this._createColors();
|
|
51
50
|
var theme = _this.props.theme;
|
|
52
|
-
var
|
|
51
|
+
var _b = _this.props, data = _b.data, _c = _b.lineLegendColor, lineLegendColor = _c === void 0 ? theme.palette.yellow : _c, lineLegendText = _b.lineLegendText;
|
|
53
52
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
53
|
var lineData = [];
|
|
55
54
|
var line = [];
|
|
@@ -72,7 +71,7 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
72
71
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
72
|
.y(function (d) { return (d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScale(d.y)); });
|
|
74
73
|
var shouldHighlight = _this._legendHighlighted(lineLegendText) || _this._noLegendHighlighted() ? true : false;
|
|
75
|
-
var lineBorderWidth = ((
|
|
74
|
+
var lineBorderWidth = ((_a = _this.props.lineOptions) === null || _a === void 0 ? void 0 : _a.lineBorderWidth)
|
|
76
75
|
? Number.parseFloat(_this.props.lineOptions.lineBorderWidth.toString())
|
|
77
76
|
: 0;
|
|
78
77
|
if (lineBorderWidth > 0) {
|
|
@@ -92,8 +91,7 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
92
91
|
dots));
|
|
93
92
|
};
|
|
94
93
|
_this._getCircleVisibilityAndRadius = function (xAxisPoint, legend) {
|
|
95
|
-
var _a;
|
|
96
|
-
var selectedLegend = (_a = _this.state, _a.selectedLegend), activeXdataPoint = _a.activeXdataPoint;
|
|
94
|
+
var _a = _this.state, selectedLegend = _a.selectedLegend, activeXdataPoint = _a.activeXdataPoint;
|
|
97
95
|
if (selectedLegend !== '') {
|
|
98
96
|
if (xAxisPoint === activeXdataPoint && selectedLegend === legend) {
|
|
99
97
|
return { visibility: CircleVisbility.show, radius: 8 };
|
|
@@ -122,16 +120,14 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
122
120
|
_this.margins = margins;
|
|
123
121
|
};
|
|
124
122
|
_this._renderContentForBothLineAndBars = function (point) {
|
|
125
|
-
var _a;
|
|
126
|
-
var YValueHover = (_a = _this._getCalloutContentForLineAndBar(point), _a.YValueHover), hoverXValue = _a.hoverXValue;
|
|
123
|
+
var _a = _this._getCalloutContentForLineAndBar(point), YValueHover = _a.YValueHover, hoverXValue = _a.hoverXValue;
|
|
127
124
|
var content = YValueHover.map(function (item, index) {
|
|
128
125
|
return (React.createElement(ChartHoverCard, __assign({ key: index, Legend: item.legend }, (index === 0 && { XValue: "".concat(hoverXValue || item.data) }), { color: item.color, YValue: item.data || item.y, culture: _this.props.culture })));
|
|
129
126
|
});
|
|
130
127
|
return React.createElement(React.Fragment, null, content);
|
|
131
128
|
};
|
|
132
129
|
_this._renderContentForOnlyBars = function (props) {
|
|
133
|
-
var _a;
|
|
134
|
-
var useSingleColor = (_a = _this.props.useSingleColor, _a === void 0 ? false : _a);
|
|
130
|
+
var _a = _this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
|
|
135
131
|
return (React.createElement(React.Fragment, null,
|
|
136
132
|
React.createElement(ChartHoverCard, { XValue: props.xAxisCalloutData || props.x, Legend: props.legend, YValue: props.yAxisCalloutData || props.y, color: !useSingleColor && props.color ? props.color : _this._createColors()(props.y), culture: _this.props.culture })));
|
|
137
133
|
};
|
|
@@ -161,11 +157,10 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
161
157
|
_this._refArray.push({ index: legendTitle, refElement: element });
|
|
162
158
|
};
|
|
163
159
|
_this._getCalloutContentForLineAndBar = function (point) {
|
|
164
|
-
var _a, _b, _c, _d;
|
|
165
|
-
var _e, _f, _g, _h, _j;
|
|
160
|
+
var _a, _b, _c, _d, _e;
|
|
166
161
|
var YValueHover = [];
|
|
167
|
-
var
|
|
168
|
-
var
|
|
162
|
+
var _f = _this.props, theme = _f.theme, _g = _f.useSingleColor, useSingleColor = _g === void 0 ? false : _g, enableGradient = _f.enableGradient;
|
|
163
|
+
var _h = _this.props, data = _h.data, lineLegendText = _h.lineLegendText, _j = _h.lineLegendColor, lineLegendColor = _j === void 0 ? theme.palette.yellow : _j;
|
|
169
164
|
var selectedPoint = data.filter(function (xDataPoint) { return xDataPoint.x === point.x; });
|
|
170
165
|
var pointIndex = data.indexOf(selectedPoint[0]);
|
|
171
166
|
var calloutColor = !useSingleColor
|
|
@@ -174,14 +169,14 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
174
169
|
: _this._createColors()(selectedPoint[0].y)
|
|
175
170
|
: _this._createColors()(1);
|
|
176
171
|
// there might be no y value of the line for the hovered bar. so we need to check this condition
|
|
177
|
-
if (_this._isHavingLine && ((
|
|
172
|
+
if (_this._isHavingLine && ((_a = selectedPoint[0].lineData) === null || _a === void 0 ? void 0 : _a.y) !== undefined) {
|
|
178
173
|
// callout data for the line
|
|
179
174
|
YValueHover.push({
|
|
180
175
|
legend: lineLegendText,
|
|
181
176
|
color: lineLegendColor,
|
|
182
|
-
y: (
|
|
183
|
-
data: (
|
|
184
|
-
yAxisCalloutData: (
|
|
177
|
+
y: (_b = selectedPoint[0].lineData) === null || _b === void 0 ? void 0 : _b.y,
|
|
178
|
+
data: (_c = selectedPoint[0].lineData) === null || _c === void 0 ? void 0 : _c.yAxisCalloutData,
|
|
179
|
+
yAxisCalloutData: (_d = selectedPoint[0].lineData) === null || _d === void 0 ? void 0 : _d.yAxisCalloutData,
|
|
185
180
|
});
|
|
186
181
|
}
|
|
187
182
|
// callout data for the bar
|
|
@@ -191,7 +186,7 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
191
186
|
color: enableGradient
|
|
192
187
|
? useSingleColor
|
|
193
188
|
? getNextGradient(0, 0)[0]
|
|
194
|
-
: ((
|
|
189
|
+
: ((_e = selectedPoint[0].gradient) === null || _e === void 0 ? void 0 : _e[0]) || getNextGradient(pointIndex, 0)[0]
|
|
195
190
|
: calloutColor,
|
|
196
191
|
data: selectedPoint[0].yAxisCalloutData,
|
|
197
192
|
yAxisCalloutData: selectedPoint[0].yAxisCalloutData,
|
|
@@ -215,8 +210,7 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
215
210
|
});
|
|
216
211
|
};
|
|
217
212
|
_this._onBarFocus = function (point, refArrayIndexNumber, color) {
|
|
218
|
-
var _a;
|
|
219
|
-
var YValueHover = (_a = _this._getCalloutContentForLineAndBar(point), _a.YValueHover), hoverXValue = _a.hoverXValue;
|
|
213
|
+
var _a = _this._getCalloutContentForLineAndBar(point), YValueHover = _a.YValueHover, hoverXValue = _a.hoverXValue;
|
|
220
214
|
_this._refArray.forEach(function (obj, index) {
|
|
221
215
|
if (obj.index === point.legend && refArrayIndexNumber === index) {
|
|
222
216
|
_this.setState({
|
|
@@ -248,9 +242,8 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
248
242
|
}
|
|
249
243
|
};
|
|
250
244
|
_this._lineHoverFocus = function (point, refSelected) {
|
|
251
|
-
var _a, _b, _c;
|
|
252
245
|
var theme = _this.props.theme;
|
|
253
|
-
var
|
|
246
|
+
var _a = _this.props, _b = _a.lineLegendText, lineLegendText = _b === void 0 ? '' : _b, _c = _a.lineLegendColor, lineLegendColor = _c === void 0 ? theme.palette.yellow : _c;
|
|
254
247
|
_this.setState({
|
|
255
248
|
refSelected: refSelected,
|
|
256
249
|
isCalloutVisible: true,
|
|
@@ -306,9 +299,8 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
306
299
|
});
|
|
307
300
|
};
|
|
308
301
|
_this._getLegendData = function (data, palette) {
|
|
309
|
-
var _a,
|
|
310
|
-
var
|
|
311
|
-
var lineLegendText = (_b = _this.props, _b.lineLegendText), lineLegendColor = (_c = _b.lineLegendColor, _c === void 0 ? theme.palette.yellow : _c);
|
|
302
|
+
var _a = _this.props, theme = _a.theme, useSingleColor = _a.useSingleColor;
|
|
303
|
+
var _b = _this.props, lineLegendText = _b.lineLegendText, _c = _b.lineLegendColor, lineLegendColor = _c === void 0 ? theme.palette.yellow : _c;
|
|
312
304
|
var actions = [];
|
|
313
305
|
data.forEach(function (point, _index) {
|
|
314
306
|
var _a, _b, _c;
|
|
@@ -430,8 +422,7 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
430
422
|
return __assign(__assign({}, _this.margins), { left: _this.margins.left + _this._domainMargin, right: _this.margins.right + _this._domainMargin });
|
|
431
423
|
};
|
|
432
424
|
_this._getChartTitle = function () {
|
|
433
|
-
var _a;
|
|
434
|
-
var chartTitle = (_a = _this.props, _a.chartTitle), data = _a.data;
|
|
425
|
+
var _a = _this.props, chartTitle = _a.chartTitle, data = _a.data;
|
|
435
426
|
return ((chartTitle ? "".concat(chartTitle, ". ") : '') +
|
|
436
427
|
"Vertical bar chart with ".concat((data === null || data === void 0 ? void 0 : data.length) || 0, " bars") +
|
|
437
428
|
(_this._isHavingLine ? ' and 1 line' : '') +
|
|
@@ -502,14 +493,12 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
502
493
|
this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding, this.props.xAxisPadding, 0);
|
|
503
494
|
};
|
|
504
495
|
VerticalBarChartBase.prototype._createColors = function () {
|
|
505
|
-
var _a;
|
|
506
496
|
var _this = this;
|
|
507
497
|
var increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);
|
|
508
|
-
var
|
|
498
|
+
var _a = this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
|
|
509
499
|
if (useSingleColor) {
|
|
510
500
|
return function (_p) {
|
|
511
|
-
var _a;
|
|
512
|
-
var theme = (_a = _this.props, _a.theme), colors = _a.colors;
|
|
501
|
+
var _a = _this.props, theme = _a.theme, colors = _a.colors;
|
|
513
502
|
return colors && colors.length > 0 ? colors[0] : theme.palette.blueLight;
|
|
514
503
|
};
|
|
515
504
|
}
|
|
@@ -521,9 +510,8 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
521
510
|
return colorScale;
|
|
522
511
|
};
|
|
523
512
|
VerticalBarChartBase.prototype._onBarHover = function (point, color, mouseEvent) {
|
|
524
|
-
var _a;
|
|
525
513
|
mouseEvent.persist();
|
|
526
|
-
var
|
|
514
|
+
var _a = this._getCalloutContentForLineAndBar(point), YValueHover = _a.YValueHover, hoverXValue = _a.hoverXValue;
|
|
527
515
|
if (this._calloutAnchorPoint !== point) {
|
|
528
516
|
this._calloutAnchorPoint = point;
|
|
529
517
|
this.setState({
|
|
@@ -547,10 +535,9 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
547
535
|
}
|
|
548
536
|
};
|
|
549
537
|
VerticalBarChartBase.prototype._createNumericBars = function (containerHeight, containerWidth, xElement) {
|
|
550
|
-
var _a, _b;
|
|
551
538
|
var _this = this;
|
|
552
|
-
var
|
|
553
|
-
var
|
|
539
|
+
var _a = this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
|
|
540
|
+
var _b = this._getScales(containerHeight, containerWidth), xBarScale = _b.xBarScale, yBarScale = _b.yBarScale;
|
|
554
541
|
var colorScale = this._createColors();
|
|
555
542
|
var bars = this._points.map(function (point, index) {
|
|
556
543
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -621,10 +608,9 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
621
608
|
return bars;
|
|
622
609
|
};
|
|
623
610
|
VerticalBarChartBase.prototype._createStringBars = function (containerHeight, containerWidth, xElement) {
|
|
624
|
-
var _a, _b;
|
|
625
611
|
var _this = this;
|
|
626
|
-
var
|
|
627
|
-
var
|
|
612
|
+
var _a = this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
|
|
613
|
+
var _b = this._getScales(containerHeight, containerWidth), xBarScale = _b.xBarScale, yBarScale = _b.yBarScale;
|
|
628
614
|
var colorScale = this._createColors();
|
|
629
615
|
var bars = this._points.map(function (point, index) {
|
|
630
616
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -693,10 +679,9 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
693
679
|
return bars;
|
|
694
680
|
};
|
|
695
681
|
VerticalBarChartBase.prototype._createDateBars = function (containerHeight, containerWidth, xElement) {
|
|
696
|
-
var _a, _b;
|
|
697
682
|
var _this = this;
|
|
698
|
-
var
|
|
699
|
-
var
|
|
683
|
+
var _a = this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
|
|
684
|
+
var _b = this._getScales(containerHeight, containerWidth), xBarScale = _b.xBarScale, yBarScale = _b.yBarScale;
|
|
700
685
|
var colorScale = this._createColors();
|
|
701
686
|
var bars = this._points.map(function (point, index) {
|
|
702
687
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -806,4 +791,5 @@ export var VerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
806
791
|
};
|
|
807
792
|
return VerticalBarChartBase;
|
|
808
793
|
}(React.Component));
|
|
794
|
+
export { VerticalBarChartBase };
|
|
809
795
|
//# sourceMappingURL=VerticalBarChart.base.js.map
|