@fluentui/react-charting 5.19.8 → 5.19.9

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.
Files changed (93) hide show
  1. package/CHANGELOG.json +45 -1
  2. package/CHANGELOG.md +11 -2
  3. package/config/tests.js +3 -0
  4. package/dist/react-charting.d.ts +6 -5
  5. package/dist/react-charting.js +1 -1
  6. package/dist/react-charting.min.js +1 -1
  7. package/etc/react-charting.api.md +6 -5
  8. package/lib/components/CommonComponents/CartesianChart.types.d.ts +2 -2
  9. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  10. package/lib/components/DonutChart/Arc/Arc.js +2 -2
  11. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  12. package/lib/components/DonutChart/DonutChart.base.d.ts +2 -2
  13. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  14. package/lib/components/DonutChart/Pie/Pie.js +3 -5
  15. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  16. package/lib/components/GaugeChart/GaugeChart.base.js +2 -3
  17. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  18. package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -2
  19. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  20. package/lib/components/PieChart/Arc/Arc.js +3 -3
  21. package/lib/components/PieChart/Arc/Arc.js.map +1 -1
  22. package/lib/components/PieChart/Pie/Pie.js +4 -5
  23. package/lib/components/PieChart/Pie/Pie.js.map +1 -1
  24. package/lib/components/SankeyChart/SankeyChart.base.js +3 -4
  25. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  26. package/lib/types/IDataPoint.d.ts +3 -3
  27. package/lib/types/IDataPoint.js.map +1 -1
  28. package/lib/utilities/test-data.d.ts +4 -1
  29. package/lib/utilities/test-data.js +78 -0
  30. package/lib/utilities/test-data.js.map +1 -1
  31. package/lib/utilities/utilities.d.ts +2 -2
  32. package/lib/utilities/utilities.js +4 -4
  33. package/lib/utilities/utilities.js.map +1 -1
  34. package/lib/version.js +1 -1
  35. package/lib/version.js.map +1 -1
  36. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +2 -2
  37. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  38. package/lib-amd/components/DonutChart/Arc/Arc.js +2 -2
  39. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  40. package/lib-amd/components/DonutChart/DonutChart.base.d.ts +2 -2
  41. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  42. package/lib-amd/components/DonutChart/Pie/Pie.js +3 -5
  43. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  44. package/lib-amd/components/GaugeChart/GaugeChart.base.js +2 -3
  45. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  46. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +2 -2
  47. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  48. package/lib-amd/components/PieChart/Arc/Arc.js +3 -3
  49. package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
  50. package/lib-amd/components/PieChart/Pie/Pie.js +3 -4
  51. package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
  52. package/lib-amd/components/SankeyChart/SankeyChart.base.js +3 -4
  53. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  54. package/lib-amd/types/IDataPoint.d.ts +3 -3
  55. package/lib-amd/types/IDataPoint.js.map +1 -1
  56. package/lib-amd/utilities/test-data.d.ts +4 -1
  57. package/lib-amd/utilities/test-data.js +79 -1
  58. package/lib-amd/utilities/test-data.js.map +1 -1
  59. package/lib-amd/utilities/utilities.d.ts +2 -2
  60. package/lib-amd/utilities/utilities.js +4 -4
  61. package/lib-amd/utilities/utilities.js.map +1 -1
  62. package/lib-amd/version.js +1 -1
  63. package/lib-amd/version.js.map +1 -1
  64. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +2 -2
  65. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  66. package/lib-commonjs/components/DonutChart/Arc/Arc.js +2 -2
  67. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  68. package/lib-commonjs/components/DonutChart/DonutChart.base.d.ts +2 -2
  69. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  70. package/lib-commonjs/components/DonutChart/Pie/Pie.js +3 -5
  71. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  72. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +2 -3
  73. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  74. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +2 -2
  75. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  76. package/lib-commonjs/components/PieChart/Arc/Arc.js +3 -3
  77. package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
  78. package/lib-commonjs/components/PieChart/Pie/Pie.js +4 -5
  79. package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
  80. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +3 -4
  81. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  82. package/lib-commonjs/types/IDataPoint.d.ts +3 -3
  83. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  84. package/lib-commonjs/utilities/test-data.d.ts +4 -1
  85. package/lib-commonjs/utilities/test-data.js +79 -1
  86. package/lib-commonjs/utilities/test-data.js.map +1 -1
  87. package/lib-commonjs/utilities/utilities.d.ts +2 -2
  88. package/lib-commonjs/utilities/utilities.js +4 -4
  89. package/lib-commonjs/utilities/utilities.js.map +1 -1
  90. package/lib-commonjs/version.js +1 -1
  91. package/lib-commonjs/version.js.map +1 -1
  92. package/package.json +1 -1
  93. package/src/components/CommonComponents/CartesianChart.types.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"SankeyChart.base.js","sourceRoot":"../src/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IAED,8DAA8D;IACtD,sCAAY,GAApB,UAAqB,IAAY,EAAE,eAAwB,EAAE,GAAQ,EAAE,GAAQ;QAC7E,IAAI,eAAe,EAAE;YACnB,yEAAyE;YACzE,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;YAC1B,GAAG;iBACA,IAAI,CAAC,IAAI,CAAC;iBACV,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC;iBAC/B,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;SACxC;IACH,CAAC;IAED,8DAA8D;IACtD,sCAAY,GAApB,UAAqB,GAAQ;QAC3B,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC;IAEO,uCAAa,GAArB;QACE,OAAO,CAAC,CACN,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe;YAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CACjD,CAAC;IACJ,CAAC;IACH,sBAAC;AAAD,CAAC,AAxyBD,CAAqC,KAAK,CAAC,SAAS,GAwyBnD","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId, getRTL, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport { ISankeyChartData, ISankeyChartProps, ISankeyChartStyleProps, ISankeyChartStyles } from './SankeyChart.types';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport * as d3Sankey from 'd3-sankey';\nimport { area as d3Area, curveBumpX as d3CurveBasis } from 'd3-shape';\nimport { sum as d3Sum } from 'd3-array';\nimport { ChartHoverCard, IBasestate, IChartHoverCardProps, SLink, SNode } from '../../index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { select, selectAll } from 'd3-selection';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport { IMargins } from '../../utilities/utilities';\n\nconst getClassNames = classNamesFunction<ISankeyChartStyleProps, ISankeyChartStyles>();\nconst PADDING_PERCENTAGE = 0.3;\n\ntype NodesInColumns = { [key: number]: SNode[] };\ntype NodeColors = { fillColor: string; borderColor: string };\n\nexport interface ISankeyChartState extends IBasestate, IChartHoverCardProps {\n containerWidth: number;\n containerHeight: number;\n selectedState: boolean;\n selectedLinks: Set<Number>;\n selectedNodes: Set<Number>;\n selectedNode?: SNode;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n selectedLink?: SLink;\n shouldOverflow: boolean;\n}\n\nconst NON_SELECTED_NODE_AND_STREAM_COLOR: string = '#757575';\nconst DEFAULT_NODE_COLORS: NodeColors[] = [\n { fillColor: '#00758F', borderColor: '#002E39' },\n { fillColor: '#77004D', borderColor: '#43002C' },\n { fillColor: '#4F6BED', borderColor: '#3B52B4' },\n { fillColor: '#937600', borderColor: '#6D5700' },\n { fillColor: '#286EA8', borderColor: '#00457E' },\n { fillColor: '#A43FB1', borderColor: '#7C158A' },\n { fillColor: '#CC3595', borderColor: '#7F215D' },\n { fillColor: '#0E7878', borderColor: '#004E4E' },\n { fillColor: '#8764B8', borderColor: '#4B3867' },\n { fillColor: '#9C663F', borderColor: '#6D4123' },\n];\n\nconst MIN_HEIGHT_FOR_DOUBLINE_TYPE = 36;\nconst MIN_HEIGHT_FOR_TYPE = 24;\nconst REST_STREAM_OPACITY: number = 1;\nconst NON_SELECTED_OPACITY: number = 1;\nconst SELECTED_STREAM_OPACITY: number = 0.3;\nconst NON_SELECTED_STREAM_BORDER_OPACITY: number = 0.5;\nconst DEFAULT_TEXT_COLOR: string = '#323130';\nconst NON_SELECTED_TEXT_COLOR: string = '#FFFFFF';\n\nexport class SankeyChartBase extends React.Component<ISankeyChartProps, ISankeyChartState> {\n private _classNames: IProcessedStyleSet<ISankeyChartStyles>;\n private chartContainer: HTMLDivElement;\n private _reqID: number;\n private _calloutId: string;\n private _linkId: string;\n private _nodesInColumn: NodesInColumns;\n private _sankey: d3Sankey.SankeyLayout<d3Sankey.SankeyGraph<{}, {}>, {}, {}>;\n private _margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _normalizeData: (data: ISankeyChartData) => void;\n private _emptyChartId: string;\n\n constructor(props: ISankeyChartProps) {\n super(props);\n this.state = {\n containerHeight: 468,\n containerWidth: 912,\n selectedState: false,\n selectedLinks: new Set<number>(),\n selectedNodes: new Set<number>(),\n shouldOverflow: false,\n isCalloutVisible: false,\n };\n this._calloutId = getId('callout');\n this._linkId = getId('link');\n this._margins = { top: 36, right: 48, bottom: 32, left: 48 };\n this._preRenderLayout();\n this._normalizeData = memoizeFunction((data: ISankeyChartData) => this._normalizeSankeyData(data));\n this._emptyChartId = getId('_SankeyChart_empty');\n }\n public componentDidMount(): void {\n this._fitParentContainer();\n }\n\n public componentDidUpdate(prevProps: ISankeyChartProps): void {\n if (prevProps.shouldResize !== this.props.shouldResize) {\n this._fitParentContainer();\n }\n }\n public componentWillUnmount(): void {\n cancelAnimationFrame(this._reqID);\n }\n public render(): React.ReactNode {\n if (!this._isChartEmpty()) {\n const { theme, className, styles, pathColor } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n width: this.state.containerWidth,\n height: this.state.containerHeight,\n pathColor,\n className,\n });\n // We are using the this._margins.left and this._margins.top in sankey extent while constructing the layout\n const { height, width } = this._preRenderLayout();\n this._normalizeData(this.props.data.SankeyChartData!);\n let nodePadding = 8;\n nodePadding = this._adjustPadding(this._sankey, height - 6, this._nodesInColumn);\n\n this._sankey.nodePadding(nodePadding);\n this._sankey(this.props.data.SankeyChartData!);\n this._populateNodeActualValue(this.props.data.SankeyChartData!);\n this._assignNodeColors();\n const nodeData = this._createNodes(width);\n const linkData = this._createLinks();\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n color: this.state.color,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n descriptionMessage: this.state.descriptionMessage,\n isBeakVisible: false,\n gapSpace: 15,\n onDismiss: this._onCloseCallout,\n className: this._classNames.calloutContentRoot,\n preventDismissOnLostFocus: true,\n };\n return (\n <div\n className={this._classNames.root}\n role={'presentation'}\n ref={(rootElem: HTMLDivElement) => (this.chartContainer = rootElem)}\n onMouseLeave={this._onCloseCallout}\n >\n <FocusZone\n direction={FocusZoneDirection.bidirectional}\n isCircularNavigation={true}\n handleTabKey={FocusZoneTabbableElements.all}\n >\n <svg width={width} height={height} id={getId('sankeyChart')}>\n <g className={this._classNames.links} strokeOpacity={1}>\n {linkData}\n </g>\n <g className={this._classNames.nodes}>{nodeData}</g>\n {calloutProps.isCalloutVisible && (\n <Callout {...calloutProps}>\n <ChartHoverCard\n XValue={calloutProps.XValue}\n YValue={calloutProps.YValue}\n color={calloutProps.color}\n descriptionMessage={calloutProps.descriptionMessage ? calloutProps.descriptionMessage : ''}\n />\n </Callout>\n )}\n </svg>\n </FocusZone>\n </div>\n );\n }\n return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _preRenderLayout(): { height: number; width: number } {\n const width = this.state.containerWidth - this._margins.right!;\n const height =\n this.state.containerHeight - this._margins.bottom! > 0 ? this.state.containerHeight - this._margins.bottom! : 0;\n\n this._sankey = d3Sankey\n .sankey()\n .nodeWidth(124)\n .extent([\n [this._margins.left!, this._margins.top!],\n [width - 1, height - 6],\n ])\n .nodeAlign(this._isRtl ? d3Sankey.sankeyRight : d3Sankey.sankeyJustify);\n\n return { height, width };\n }\n\n /**\n * This is used for calculating the node non normalized value based on link non normalized value.\n *\n */\n private _populateNodeActualValue(data: ISankeyChartData) {\n data.links.forEach((link: SLink) => {\n if (!link.unnormalizedValue) {\n link.unnormalizedValue = link.value;\n }\n });\n data.nodes.forEach((node: SNode) => {\n node.actualValue = Math.max(\n d3Sum(node.sourceLinks!, (link: SLink) => link.unnormalizedValue),\n d3Sum(node.targetLinks!, (link: SLink) => link.unnormalizedValue),\n );\n });\n }\n\n private _normalizeSankeyData(data: ISankeyChartData): void {\n this._nodesInColumn = this._populateNodeInColumns(data, this._sankey);\n this._adjustOnePercentHeightNodes(this._nodesInColumn);\n }\n /**\n *\n * This is used to group nodes by column index.\n */\n private _populateNodeInColumns(\n graph: ISankeyChartData,\n sankey: d3Sankey.SankeyLayout<d3Sankey.SankeyGraph<{}, {}>, {}, {}>,\n ) {\n sankey(graph);\n const nodesInColumn: NodesInColumns = {};\n graph.nodes.forEach((node: SNode) => {\n const columnId = node.layer!;\n if (nodesInColumn[columnId]) {\n nodesInColumn[columnId].push(node);\n } else {\n nodesInColumn[columnId] = [node];\n }\n });\n return nodesInColumn;\n }\n\n /**\n * This is used to normalize the nodes value whose value is less than 1% of the total column value.\n *\n */\n private _adjustOnePercentHeightNodes(nodesInColumn: NodesInColumns) {\n const totalColumnValue = Object.values(nodesInColumn).map((column: SNode[]) => {\n return d3Sum(column, (node: SNode) => node.value);\n });\n totalColumnValue.forEach((columnValue: number, index: number) => {\n let totalPercentage = 0;\n nodesInColumn[index].forEach((node: SNode) => {\n const nodePercentage = (node.value! / columnValue) * 100;\n node.actualValue = node.value;\n //if the value is less than 1% then we are making it as 1% of total .\n if (nodePercentage < 1) {\n node.value = 0.01 * columnValue;\n totalPercentage = totalPercentage + 1;\n } else {\n totalPercentage = totalPercentage + nodePercentage;\n }\n });\n //since we have adjusted the value to be 1% but we need to keep the sum of the percentage value under 100.\n const scalingRatio = totalPercentage !== 0 ? totalPercentage / 100 : 1;\n if (scalingRatio > 1) {\n nodesInColumn[index].forEach((node: SNode) => {\n node.value = node.value! / scalingRatio;\n this._changeColumnValue(node, node.actualValue!, node.value);\n });\n }\n });\n }\n\n /**\n *\n * This is used for normalizing each links value for reflecting the normalized node value.\n */\n private _changeColumnValue(node: SNode, originalValue: number, normalizedValue: number) {\n node.sourceLinks!.forEach((link: SLink) => {\n link.unnormalizedValue = link.value;\n const linkRatio = link.value / originalValue;\n link.value = normalizedValue * linkRatio;\n });\n node.targetLinks!.forEach((link: SLink) => {\n link.unnormalizedValue = link.value;\n const linkRatio = link.value / originalValue;\n link.value = normalizedValue * linkRatio;\n });\n }\n\n /**\n *\n * This is used to introduce dynamic padding for cases where the number of nodes in a column is huge\n * so that we maintain a node to space ratio for such columns as if we fail to do so the\n * chart is devoid of nodes and only shows links.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _adjustPadding(sankey: any, height: number, nodesInColumn: NodesInColumns) {\n let padding = this._sankey.nodePadding();\n Object.values(nodesInColumn).forEach((column: SNode[]) => {\n const minPadding = PADDING_PERCENTAGE * height;\n const toatlPaddingInColumn = height - d3Sum(column, (node: SNode) => node.y1! - node.y0!);\n if (minPadding < toatlPaddingInColumn) {\n //Here we are calculating the min of default and calculated padding, we will not increase the padding\n //in any scenario.\n padding = Math.min(padding, minPadding / (column.length - 1));\n }\n });\n return padding;\n }\n\n private _createLinks(): React.ReactNode[] | undefined {\n const links: React.ReactNode[] = [];\n\n if (this.props.data.SankeyChartData) {\n this.props.data.SankeyChartData.links.forEach((singleLink: SLink, index: number) => {\n const onMouseOut = () => {\n this._onStreamLeave(singleLink);\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data = (d: any) => {\n return [\n { x: d.source.x1, y0: d.y0 + d.width / 2, y1: d.y0 - d.width / 2 },\n { x: d.target.x0, y0: d.y1 + d.width / 2, y1: d.y1 - d.width / 2 },\n ];\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const dataPoints: Array<any> = data(singleLink);\n const linkArea = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((p: any) => p.x)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((p: any) => p.y0)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((p: any) => p.y1)\n .curve(d3CurveBasis);\n const gradientUrl = `url(#gradient-${this._linkId}-${index})`;\n const link = (\n <g key={`${this._linkId}-${index}`}>\n <defs>\n <linearGradient id={`gradient-${this._linkId}-${index}`} x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0\" stopColor={(singleLink.source as SNode).color} />\n <stop offset=\"100%\" stopColor={(singleLink.target as SNode).color} />\n </linearGradient>\n </defs>\n <path\n d={linkArea(dataPoints)!}\n id={getId('link')}\n fill={this._fillStreamColors(singleLink, gradientUrl)}\n stroke={this._fillStreamBorder(singleLink, gradientUrl)}\n strokeWidth=\"2\"\n strokeOpacity={this._getOpacityStreamBorder(singleLink)}\n onMouseOver={this._onStreamHover.bind(this, singleLink)}\n onMouseOut={onMouseOut}\n onFocus={this._onFocusLink.bind(this, singleLink)}\n onBlur={this._onBlur}\n fillOpacity={this._getOpacityStream(singleLink)}\n data-is-focusable={true}\n aria-label={\n 'link from' +\n (singleLink.source as SNode).name +\n 'to' +\n (singleLink.target as SNode).name +\n 'with weight' +\n singleLink!.unnormalizedValue\n }\n role=\"img\"\n />\n </g>\n );\n links.push(link);\n });\n }\n return links;\n }\n\n private _createNodes(width: number): React.ReactNode[] | undefined {\n const nodes: React.ReactNode[] = [];\n\n if (this.props.data.SankeyChartData) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.props.data.SankeyChartData.nodes.forEach((singleNode: SNode, index: number) => {\n const onMouseOut = () => {\n this._onLeave(singleNode);\n };\n const height = singleNode.y1! - singleNode.y0! > 0 ? singleNode.y1! - singleNode.y0! : 0;\n let padding = 8;\n let textLengthForNodeWeight = 0;\n\n // If the nodeWeight is in the same line as node description an extra padding\n // of 6 px is required between node description and node weight.\n if (height < MIN_HEIGHT_FOR_DOUBLINE_TYPE) {\n padding = padding + 6;\n const tspan = select('.nodeName').append('text').attr('class', 'tempText').append('tspan').text(null);\n tspan.text(singleNode.actualValue!);\n if (tspan.node() !== null) {\n textLengthForNodeWeight = tspan.node()!.getComputedTextLength();\n padding = padding + textLengthForNodeWeight;\n }\n tspan.text(null);\n selectAll('.tempText').remove();\n }\n // Since the total width of the node is 124 and we are giving margin of 8px from the left .\n //So the actual value on which it will be truncated is 124-8=116.\n const truncatedname: string = this._truncateText(singleNode.name, 116, padding);\n const isTruncated: boolean = truncatedname.slice(-3) === '...';\n const id = getId('tooltip');\n const div = select('body')\n .append('div')\n .attr('id', id)\n .attr('class', this._classNames.toolTip!)\n .style('opacity', 0);\n const nodeId = getId('nodeBar');\n const node = (\n <g key={index} id={getId('nodeGElement')}>\n <rect\n x={singleNode.x0}\n y={singleNode.y0}\n height={height}\n width={singleNode.x1! - singleNode.x0!}\n fill={this._fillNodeColors(singleNode)}\n id={nodeId}\n onMouseOver={this._onHover.bind(this, singleNode)}\n onMouseOut={onMouseOut}\n onFocus={this._onCloseCallout.bind(this)}\n stroke={this._fillNodeBorder(singleNode)}\n strokeWidth=\"2\"\n opacity=\"1\"\n data-is-focusable={true}\n aria-label={'node' + `${singleNode.name}` + 'with weight' + `${singleNode.actualValue}`}\n role=\"img\"\n />\n {singleNode.y1! - singleNode.y0! > MIN_HEIGHT_FOR_TYPE && (\n <g className={this._classNames.nodeTextContainer}>\n <g className=\"nodeName\">\n <text\n id={`${nodeId}-name`}\n x={singleNode.x0}\n y={singleNode.y0}\n dy={'1.2em'}\n dx={'0.4em'}\n textAnchor={this._isRtl ? 'end' : 'start'}\n fontWeight=\"regular\"\n aria-hidden=\"true\"\n fill={\n !(\n !this.state.selectedState ||\n (this.state.selectedState &&\n this.state.selectedNodes.has(singleNode.index!) &&\n this.state.selectedNode) ||\n (this.state.selectedState && !this.state.selectedNode)\n )\n ? DEFAULT_TEXT_COLOR\n : NON_SELECTED_TEXT_COLOR\n }\n fontSize={10}\n onMouseOver={this._showTooltip.bind(this, singleNode.name, isTruncated, div)}\n onMouseOut={this._hideTooltip.bind(this, div)}\n >\n {truncatedname}\n </text>\n </g>\n\n <text\n x={\n height > MIN_HEIGHT_FOR_DOUBLINE_TYPE ? singleNode.x0 : singleNode.x1! - textLengthForNodeWeight - 8\n }\n y={singleNode.y0}\n dy={height > MIN_HEIGHT_FOR_DOUBLINE_TYPE ? '2em' : '1em'}\n dx={height > MIN_HEIGHT_FOR_DOUBLINE_TYPE ? '0.4em' : '0em'}\n textAnchor={this._isRtl ? 'end' : 'start'}\n fontWeight=\"bold\"\n aria-hidden=\"true\"\n fill={\n !(\n !this.state.selectedState ||\n (this.state.selectedState &&\n this.state.selectedNodes.has(singleNode.index!) &&\n this.state.selectedNode) ||\n (this.state.selectedState && !this.state.selectedNode)\n )\n ? DEFAULT_TEXT_COLOR\n : NON_SELECTED_TEXT_COLOR\n }\n fontSize={14}\n >\n {singleNode.actualValue}\n </text>\n </g>\n )}\n </g>\n );\n nodes.push(node);\n });\n return nodes;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onLeave(singleNode: SNode) {\n if (this.state.selectedState) {\n this.setState({\n selectedState: false,\n selectedNodes: new Set<number>(),\n selectedLinks: new Set<number>(),\n selectedNode: undefined,\n });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onHover(singleNode: SNode, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n this._onCloseCallout();\n if (!this.state.selectedState) {\n const selectedLinks = this._getSelectedLinks(singleNode);\n const selectedNodes = this._getSelectedNodes(selectedLinks);\n selectedNodes.push(singleNode);\n this.setState({\n selectedState: true,\n selectedNodes: new Set<number>(Array.from(selectedNodes).map(node => node.index)),\n selectedLinks: new Set<number>(Array.from(selectedLinks).map(link => link.index!)),\n selectedNode: singleNode,\n refSelected: mouseEvent, //this._refArray.get(index),\n isCalloutVisible: singleNode.y1! - singleNode.y0! < MIN_HEIGHT_FOR_TYPE,\n color: singleNode.color,\n xCalloutValue: singleNode.name,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yCalloutValue: singleNode.actualValue! as any as string,\n });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onStreamHover(singleLink: SLink, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n this._onCloseCallout();\n if (!this.state.selectedState) {\n const { selectedLinks, selectedNodes } = this._getSelectedLinksforStreamHover(singleLink);\n this.setState({\n selectedState: true,\n selectedNodes: new Set<number>(Array.from(selectedNodes).map(node => node.index!)),\n selectedLinks: new Set<number>(Array.from(selectedLinks).map(link => link.index!)),\n refSelected: mouseEvent,\n selectedLink: singleLink,\n isCalloutVisible: true,\n color: (singleLink.source as SNode).color,\n xCalloutValue: (singleLink.target as SNode).name,\n yCalloutValue: singleLink.unnormalizedValue!.toString(),\n descriptionMessage: 'from ' + (singleLink.source as SNode).name,\n });\n }\n }\n\n private _onStreamLeave(singleLink: SLink) {\n if (this.state.selectedState) {\n this.setState({\n selectedState: false,\n selectedNodes: new Set<number>(),\n selectedLinks: new Set<number>(),\n selectedLink: undefined,\n });\n }\n }\n\n private _onFocusLink(singleLink: SLink, element: React.FocusEvent<SVGElement>): void {\n element.persist();\n this._onCloseCallout();\n this.setState({\n refSelected: element.currentTarget,\n selectedLink: singleLink,\n isCalloutVisible: true,\n color: (singleLink.source as SNode).color,\n xCalloutValue: (singleLink.target as SNode).name,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yCalloutValue: (singleLink.source as SNode).actualValue! as any as string,\n descriptionMessage: 'from ' + (singleLink.source as SNode).name,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onCloseCallout = () => {\n this.setState({\n isCalloutVisible: false,\n refSelected: undefined,\n descriptionMessage: '',\n });\n };\n\n private _onBlur = (): void => {\n /**/\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fillNodeColors = (singleNode: SNode): string | undefined => {\n if (!this.state.selectedState) {\n return singleNode.color;\n } else if (this.state.selectedState && this.state.selectedNodes.has(singleNode.index!) && this.state.selectedNode) {\n return this.state.selectedNode.color;\n } else if (this.state.selectedState && !this.state.selectedNode) {\n return singleNode.color;\n }\n };\n\n /**\n * This is used to assign node fillcolors and borderColor cyclically when the user doesnt\n * provide color to individual node.\n */\n private _assignNodeColors() {\n let colors: string[];\n let borders: string[];\n if (this.props.colorsForNodes && this.props.borderColorsForNodes) {\n colors = this.props.colorsForNodes;\n borders = this.props.borderColorsForNodes;\n } else {\n colors = DEFAULT_NODE_COLORS.map(color => color.fillColor);\n borders = DEFAULT_NODE_COLORS.map(color => color.borderColor);\n }\n let currentIndex = 0;\n this.props.data.SankeyChartData!.nodes.forEach((node: SNode) => {\n if (!node.color && !node.borderColor) {\n node.color = colors[currentIndex];\n node.borderColor = borders[currentIndex];\n } else if (node.color && !node.borderColor) {\n node.borderColor = '#757575';\n } else if (node.borderColor && !node.color) {\n node.color = '#F5F5F5';\n }\n currentIndex = (currentIndex + 1) % colors.length;\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fillStreamColors(singleLink: SLink, gradientUrl: string): string | undefined {\n if (this.state.selectedState && this.state.selectedLinks.has(singleLink.index!) && this.state.selectedNode) {\n return this.state.selectedNode.color;\n } else if (this.state.selectedState && this.state.selectedLinks.has(singleLink.index!)) {\n return gradientUrl;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fillStreamBorder(singleLink: SLink, gradientUrl: string): string {\n if (!this.state.selectedState) {\n return NON_SELECTED_NODE_AND_STREAM_COLOR;\n } else if (this.state.selectedState && this.state.selectedLinks.has(singleLink.index!) && this.state.selectedNode) {\n return this.state.selectedNode.borderColor!;\n } else if (this.state.selectedState && this.state.selectedLinks.has(singleLink.index!)) {\n return gradientUrl;\n }\n return NON_SELECTED_NODE_AND_STREAM_COLOR;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fillNodeBorder = (singleNode: SNode): string => {\n if (!this.state.selectedState) {\n return singleNode.borderColor!;\n } else if (this.state.selectedState && this.state.selectedNodes.has(singleNode.index!) && this.state.selectedNode) {\n return this.state.selectedNode.borderColor!;\n } else if (this.state.selectedState && this.state.selectedNodes.has(singleNode.index!)) {\n return singleNode.borderColor!;\n }\n return singleNode.borderColor!;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getSelectedNodes(selectedLinks: Set<SLink>): any[] {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nodes: SNode[] = [];\n selectedLinks.forEach(link => {\n nodes.push(link.target as SNode);\n\n if (nodes.indexOf(link.source as SNode) === -1) {\n nodes.push(link.source as SNode);\n }\n });\n return nodes;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getSelectedLinks(singleNode: SNode): Set<SLink> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-array-constructor\n const q: any = new Array<any>();\n const finalLinks: Set<SLink> = new Set<SLink>();\n\n singleNode.sourceLinks!.forEach((link: SLink) => {\n q.push(link);\n finalLinks.add(link);\n });\n\n while (q.length > 0) {\n const poppedLink: SLink = q.shift();\n const node: SNode = poppedLink.target as SNode;\n if (node && node.sourceLinks) {\n node.sourceLinks.forEach((link: SLink) => {\n finalLinks.add(link);\n q.push(link);\n });\n }\n }\n\n if (singleNode.targetLinks) {\n singleNode.targetLinks.forEach((link: SLink) => {\n q.push(link);\n finalLinks.add(link);\n });\n }\n\n while (q.length > 0) {\n const poppedLink: SLink = q.shift();\n const node: SNode = poppedLink.source as SNode;\n if (node && node.targetLinks) {\n node.targetLinks.forEach((link: SLink) => {\n finalLinks.add(link);\n q.push(link);\n });\n }\n }\n\n return finalLinks;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getSelectedLinksforStreamHover(singleLink: SLink): { selectedLinks: Set<SLink>; selectedNodes: Set<SNode> } {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-array-constructor\n const q: any = new Array<any>();\n const finalLinks: Set<SLink> = new Set<SLink>();\n const finalNodes: Set<SNode> = new Set<SNode>();\n\n q.push(singleLink.source);\n finalLinks.add(singleLink);\n while (q.length > 0) {\n const poppedNode: SNode = q.shift();\n finalNodes.add(poppedNode);\n if (poppedNode.targetLinks && poppedNode.targetLinks.length > 0) {\n poppedNode.targetLinks.forEach((link: SLink) => {\n q.push(link.source);\n finalLinks.add(link);\n });\n }\n }\n\n q.push(singleLink.target);\n\n while (q.length > 0) {\n const poppedNode: SNode = q.shift();\n finalNodes.add(poppedNode);\n if (poppedNode.sourceLinks && poppedNode.sourceLinks.length > 0) {\n poppedNode.sourceLinks.forEach((link: SLink) => {\n q.push(link.target);\n finalLinks.add(link);\n });\n }\n }\n\n return {\n selectedLinks: finalLinks,\n selectedNodes: finalNodes,\n };\n }\n\n private _getOpacityStream(singleLink: SLink): number {\n if (this.state.selectedState) {\n if (!this.state.selectedLinks.has(singleLink.index!)) {\n return NON_SELECTED_OPACITY;\n } else if (\n this.state.selectedState &&\n this.state.selectedLinks.has(singleLink.index!) &&\n !this.state.selectedNode\n ) {\n return SELECTED_STREAM_OPACITY;\n }\n }\n return REST_STREAM_OPACITY;\n }\n\n private _getOpacityStreamBorder(singleLink: SLink): number {\n if (this.state.selectedState && !this.state.selectedLinks.has(singleLink.index!) && !this.state.selectedNode) {\n return NON_SELECTED_STREAM_BORDER_OPACITY;\n }\n\n return NON_SELECTED_OPACITY;\n }\n\n private _fitParentContainer(): void {\n const { containerWidth, containerHeight } = this.state;\n this._reqID = requestAnimationFrame(() => {\n const container = this.props.parentRef ? this.props.parentRef : this.chartContainer;\n const currentContainerWidth = container && container.getBoundingClientRect().width;\n const currentContainerHeight = container && container.getBoundingClientRect().height;\n const shouldResize = containerWidth !== currentContainerWidth || containerHeight !== currentContainerHeight;\n if (shouldResize) {\n this.setState({\n containerWidth: currentContainerWidth,\n containerHeight: currentContainerHeight,\n });\n }\n });\n }\n /**\n *\n * @param text is the text which we are trying to truncate\n * @param rectangleWidth is the width of the rectangle which will contain the text\n * @param padding is the space we need to leave between the rect lines and other text\n * @param nodeWeight is the text if present needs to be accomodate in the same line as text.\n * @returns the truncated text , if truncated given the above parameters.\n */\n private _truncateText(text: string, rectangleWidth: number, padding: number) {\n const textLengthForNodeName = rectangleWidth - padding;\n let elipsisLength = 0;\n const tspan = select('.nodeName')\n .append('text')\n .attr('class', 'tempText')\n .attr('font-size', '10')\n .append('tspan')\n .text(null);\n tspan.text(text);\n if (tspan.node() !== null && tspan.node()!.getComputedTextLength() <= textLengthForNodeName) {\n return text;\n }\n tspan.text(null);\n tspan.text('...');\n if (tspan.node() !== null) {\n elipsisLength = tspan.node()!.getComputedTextLength();\n }\n tspan.text(null);\n let line: string = '';\n for (let i = 0; i < text.length; i++) {\n line += text[i];\n tspan.text(line);\n if (tspan.node() !== null) {\n const w = tspan.node()!.getComputedTextLength();\n if (w >= textLengthForNodeName - elipsisLength) {\n line = line.slice(0, -1);\n line += '...';\n break;\n }\n }\n }\n tspan.text(null);\n selectAll('.tempText').remove();\n return line;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _showTooltip(text: string, checkTrcuncated: boolean, div: any, evt: any) {\n if (checkTrcuncated) {\n //Fixing tooltip position by attaching it to the element rather than page\n div.style('opacity', 0.9);\n div\n .html(text)\n .style('left', evt.pageX + 'px')\n .style('top', evt.pageY - 28 + 'px');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _hideTooltip(div: any) {\n div.style('opacity', 0);\n }\n\n private _isChartEmpty() {\n return !(\n this.props.data &&\n this.props.data.SankeyChartData &&\n this.props.data.SankeyChartData.nodes.length > 0 &&\n this.props.data.SankeyChartData.links.length > 0\n );\n }\n}\n"]}
1
+ {"version":3,"file":"SankeyChart.base.js","sourceRoot":"../src/","sources":["components/SankeyChart/SankeyChart.base.tsx"],"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ApB,UAAqB,IAAY,EAAE,eAAwB,EAAE,GAAQ,EAAE,GAAQ;QAC7E,IAAI,eAAe,EAAE;YACnB,yEAAyE;YACzE,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;YAC1B,GAAG;iBACA,IAAI,CAAC,IAAI,CAAC;iBACV,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC;iBAC/B,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;SACxC;IACH,CAAC;IAED,8DAA8D;IACtD,sCAAY,GAApB,UAAqB,GAAQ;QAC3B,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC;IAEO,uCAAa,GAArB;QACE,OAAO,CAAC,CACN,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe;YAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CACjD,CAAC;IACJ,CAAC;IACH,sBAAC;AAAD,CAAC,AApyBD,CAAqC,KAAK,CAAC,SAAS,GAoyBnD","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId, getRTL, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport { ISankeyChartData, ISankeyChartProps, ISankeyChartStyleProps, ISankeyChartStyles } from './SankeyChart.types';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { SankeyLayout, SankeyGraph, sankey as d3Sankey, sankeyRight, sankeyJustify } from 'd3-sankey';\nimport { area as d3Area, curveBumpX as d3CurveBasis } from 'd3-shape';\nimport { sum as d3Sum } from 'd3-array';\nimport { ChartHoverCard, IBasestate, IChartHoverCardProps, SLink, SNode } from '../../index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { select, selectAll } from 'd3-selection';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport { IMargins } from '../../utilities/utilities';\n\nconst getClassNames = classNamesFunction<ISankeyChartStyleProps, ISankeyChartStyles>();\nconst PADDING_PERCENTAGE = 0.3;\n\ntype NodesInColumns = { [key: number]: SNode[] };\ntype NodeColors = { fillColor: string; borderColor: string };\n\nexport interface ISankeyChartState extends IBasestate, IChartHoverCardProps {\n containerWidth: number;\n containerHeight: number;\n selectedState: boolean;\n selectedLinks: Set<Number>;\n selectedNodes: Set<Number>;\n selectedNode?: SNode;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n selectedLink?: SLink;\n shouldOverflow: boolean;\n}\n\nconst NON_SELECTED_NODE_AND_STREAM_COLOR: string = '#757575';\nconst DEFAULT_NODE_COLORS: NodeColors[] = [\n { fillColor: '#00758F', borderColor: '#002E39' },\n { fillColor: '#77004D', borderColor: '#43002C' },\n { fillColor: '#4F6BED', borderColor: '#3B52B4' },\n { fillColor: '#937600', borderColor: '#6D5700' },\n { fillColor: '#286EA8', borderColor: '#00457E' },\n { fillColor: '#A43FB1', borderColor: '#7C158A' },\n { fillColor: '#CC3595', borderColor: '#7F215D' },\n { fillColor: '#0E7878', borderColor: '#004E4E' },\n { fillColor: '#8764B8', borderColor: '#4B3867' },\n { fillColor: '#9C663F', borderColor: '#6D4123' },\n];\n\nconst MIN_HEIGHT_FOR_DOUBLINE_TYPE = 36;\nconst MIN_HEIGHT_FOR_TYPE = 24;\nconst REST_STREAM_OPACITY: number = 1;\nconst NON_SELECTED_OPACITY: number = 1;\nconst SELECTED_STREAM_OPACITY: number = 0.3;\nconst NON_SELECTED_STREAM_BORDER_OPACITY: number = 0.5;\nconst DEFAULT_TEXT_COLOR: string = '#323130';\nconst NON_SELECTED_TEXT_COLOR: string = '#FFFFFF';\n\nexport class SankeyChartBase extends React.Component<ISankeyChartProps, ISankeyChartState> {\n private _classNames: IProcessedStyleSet<ISankeyChartStyles>;\n private chartContainer: HTMLDivElement;\n private _reqID: number;\n private _calloutId: string;\n private _linkId: string;\n private _nodesInColumn: NodesInColumns;\n private _sankey: SankeyLayout<SankeyGraph<{}, {}>, {}, {}>;\n private _margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _normalizeData: (data: ISankeyChartData) => void;\n private _emptyChartId: string;\n\n constructor(props: ISankeyChartProps) {\n super(props);\n this.state = {\n containerHeight: 468,\n containerWidth: 912,\n selectedState: false,\n selectedLinks: new Set<number>(),\n selectedNodes: new Set<number>(),\n shouldOverflow: false,\n isCalloutVisible: false,\n };\n this._calloutId = getId('callout');\n this._linkId = getId('link');\n this._margins = { top: 36, right: 48, bottom: 32, left: 48 };\n this._preRenderLayout();\n this._normalizeData = memoizeFunction((data: ISankeyChartData) => this._normalizeSankeyData(data));\n this._emptyChartId = getId('_SankeyChart_empty');\n }\n public componentDidMount(): void {\n this._fitParentContainer();\n }\n\n public componentDidUpdate(prevProps: ISankeyChartProps): void {\n if (prevProps.shouldResize !== this.props.shouldResize) {\n this._fitParentContainer();\n }\n }\n public componentWillUnmount(): void {\n cancelAnimationFrame(this._reqID);\n }\n public render(): React.ReactNode {\n if (!this._isChartEmpty()) {\n const { theme, className, styles, pathColor } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n width: this.state.containerWidth,\n height: this.state.containerHeight,\n pathColor,\n className,\n });\n // We are using the this._margins.left and this._margins.top in sankey extent while constructing the layout\n const { height, width } = this._preRenderLayout();\n this._normalizeData(this.props.data.SankeyChartData!);\n let nodePadding = 8;\n nodePadding = this._adjustPadding(this._sankey, height - 6, this._nodesInColumn);\n\n this._sankey.nodePadding(nodePadding);\n this._sankey(this.props.data.SankeyChartData!);\n this._populateNodeActualValue(this.props.data.SankeyChartData!);\n this._assignNodeColors();\n const nodeData = this._createNodes(width);\n const linkData = this._createLinks();\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n color: this.state.color,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n descriptionMessage: this.state.descriptionMessage,\n isBeakVisible: false,\n gapSpace: 15,\n onDismiss: this._onCloseCallout,\n className: this._classNames.calloutContentRoot,\n preventDismissOnLostFocus: true,\n };\n return (\n <div\n className={this._classNames.root}\n role={'presentation'}\n ref={(rootElem: HTMLDivElement) => (this.chartContainer = rootElem)}\n onMouseLeave={this._onCloseCallout}\n >\n <FocusZone\n direction={FocusZoneDirection.bidirectional}\n isCircularNavigation={true}\n handleTabKey={FocusZoneTabbableElements.all}\n >\n <svg width={width} height={height} id={getId('sankeyChart')}>\n <g className={this._classNames.links} strokeOpacity={1}>\n {linkData}\n </g>\n <g className={this._classNames.nodes}>{nodeData}</g>\n {calloutProps.isCalloutVisible && (\n <Callout {...calloutProps}>\n <ChartHoverCard\n XValue={calloutProps.XValue}\n YValue={calloutProps.YValue}\n color={calloutProps.color}\n descriptionMessage={calloutProps.descriptionMessage ? calloutProps.descriptionMessage : ''}\n />\n </Callout>\n )}\n </svg>\n </FocusZone>\n </div>\n );\n }\n return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _preRenderLayout(): { height: number; width: number } {\n const width = this.state.containerWidth - this._margins.right!;\n const height =\n this.state.containerHeight - this._margins.bottom! > 0 ? this.state.containerHeight - this._margins.bottom! : 0;\n\n this._sankey = d3Sankey()\n .nodeWidth(124)\n .extent([\n [this._margins.left!, this._margins.top!],\n [width - 1, height - 6],\n ])\n .nodeAlign(this._isRtl ? sankeyRight : sankeyJustify);\n\n return { height, width };\n }\n\n /**\n * This is used for calculating the node non normalized value based on link non normalized value.\n *\n */\n private _populateNodeActualValue(data: ISankeyChartData) {\n data.links.forEach((link: SLink) => {\n if (!link.unnormalizedValue) {\n link.unnormalizedValue = link.value;\n }\n });\n data.nodes.forEach((node: SNode) => {\n node.actualValue = Math.max(\n d3Sum(node.sourceLinks!, (link: SLink) => link.unnormalizedValue),\n d3Sum(node.targetLinks!, (link: SLink) => link.unnormalizedValue),\n );\n });\n }\n\n private _normalizeSankeyData(data: ISankeyChartData): void {\n this._nodesInColumn = this._populateNodeInColumns(data, this._sankey);\n this._adjustOnePercentHeightNodes(this._nodesInColumn);\n }\n /**\n *\n * This is used to group nodes by column index.\n */\n private _populateNodeInColumns(graph: ISankeyChartData, sankey: SankeyLayout<SankeyGraph<{}, {}>, {}, {}>) {\n sankey(graph);\n const nodesInColumn: NodesInColumns = {};\n graph.nodes.forEach((node: SNode) => {\n const columnId = node.layer!;\n if (nodesInColumn[columnId]) {\n nodesInColumn[columnId].push(node);\n } else {\n nodesInColumn[columnId] = [node];\n }\n });\n return nodesInColumn;\n }\n\n /**\n * This is used to normalize the nodes value whose value is less than 1% of the total column value.\n *\n */\n private _adjustOnePercentHeightNodes(nodesInColumn: NodesInColumns) {\n const totalColumnValue = Object.values(nodesInColumn).map((column: SNode[]) => {\n return d3Sum(column, (node: SNode) => node.value);\n });\n totalColumnValue.forEach((columnValue: number, index: number) => {\n let totalPercentage = 0;\n nodesInColumn[index].forEach((node: SNode) => {\n const nodePercentage = (node.value! / columnValue) * 100;\n node.actualValue = node.value;\n //if the value is less than 1% then we are making it as 1% of total .\n if (nodePercentage < 1) {\n node.value = 0.01 * columnValue;\n totalPercentage = totalPercentage + 1;\n } else {\n totalPercentage = totalPercentage + nodePercentage;\n }\n });\n //since we have adjusted the value to be 1% but we need to keep the sum of the percentage value under 100.\n const scalingRatio = totalPercentage !== 0 ? totalPercentage / 100 : 1;\n if (scalingRatio > 1) {\n nodesInColumn[index].forEach((node: SNode) => {\n node.value = node.value! / scalingRatio;\n this._changeColumnValue(node, node.actualValue!, node.value);\n });\n }\n });\n }\n\n /**\n *\n * This is used for normalizing each links value for reflecting the normalized node value.\n */\n private _changeColumnValue(node: SNode, originalValue: number, normalizedValue: number) {\n node.sourceLinks!.forEach((link: SLink) => {\n link.unnormalizedValue = link.value;\n const linkRatio = link.value / originalValue;\n link.value = normalizedValue * linkRatio;\n });\n node.targetLinks!.forEach((link: SLink) => {\n link.unnormalizedValue = link.value;\n const linkRatio = link.value / originalValue;\n link.value = normalizedValue * linkRatio;\n });\n }\n\n /**\n *\n * This is used to introduce dynamic padding for cases where the number of nodes in a column is huge\n * so that we maintain a node to space ratio for such columns as if we fail to do so the\n * chart is devoid of nodes and only shows links.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _adjustPadding(sankey: any, height: number, nodesInColumn: NodesInColumns) {\n let padding = this._sankey.nodePadding();\n Object.values(nodesInColumn).forEach((column: SNode[]) => {\n const minPadding = PADDING_PERCENTAGE * height;\n const toatlPaddingInColumn = height - d3Sum(column, (node: SNode) => node.y1! - node.y0!);\n if (minPadding < toatlPaddingInColumn) {\n //Here we are calculating the min of default and calculated padding, we will not increase the padding\n //in any scenario.\n padding = Math.min(padding, minPadding / (column.length - 1));\n }\n });\n return padding;\n }\n\n private _createLinks(): React.ReactNode[] | undefined {\n const links: React.ReactNode[] = [];\n\n if (this.props.data.SankeyChartData) {\n this.props.data.SankeyChartData.links.forEach((singleLink: SLink, index: number) => {\n const onMouseOut = () => {\n this._onStreamLeave(singleLink);\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data = (d: any) => {\n return [\n { x: d.source.x1, y0: d.y0 + d.width / 2, y1: d.y0 - d.width / 2 },\n { x: d.target.x0, y0: d.y1 + d.width / 2, y1: d.y1 - d.width / 2 },\n ];\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const dataPoints: Array<any> = data(singleLink);\n const linkArea = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((p: any) => p.x)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((p: any) => p.y0)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((p: any) => p.y1)\n .curve(d3CurveBasis);\n const gradientUrl = `url(#gradient-${this._linkId}-${index})`;\n const link = (\n <g key={`${this._linkId}-${index}`}>\n <defs>\n <linearGradient id={`gradient-${this._linkId}-${index}`} x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0\" stopColor={(singleLink.source as SNode).color} />\n <stop offset=\"100%\" stopColor={(singleLink.target as SNode).color} />\n </linearGradient>\n </defs>\n <path\n d={linkArea(dataPoints)!}\n id={getId('link')}\n fill={this._fillStreamColors(singleLink, gradientUrl)}\n stroke={this._fillStreamBorder(singleLink, gradientUrl)}\n strokeWidth=\"2\"\n strokeOpacity={this._getOpacityStreamBorder(singleLink)}\n onMouseOver={this._onStreamHover.bind(this, singleLink)}\n onMouseOut={onMouseOut}\n onFocus={this._onFocusLink.bind(this, singleLink)}\n onBlur={this._onBlur}\n fillOpacity={this._getOpacityStream(singleLink)}\n data-is-focusable={true}\n aria-label={\n 'link from' +\n (singleLink.source as SNode).name +\n 'to' +\n (singleLink.target as SNode).name +\n 'with weight' +\n singleLink!.unnormalizedValue\n }\n role=\"img\"\n />\n </g>\n );\n links.push(link);\n });\n }\n return links;\n }\n\n private _createNodes(width: number): React.ReactNode[] | undefined {\n const nodes: React.ReactNode[] = [];\n\n if (this.props.data.SankeyChartData) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.props.data.SankeyChartData.nodes.forEach((singleNode: SNode, index: number) => {\n const onMouseOut = () => {\n this._onLeave(singleNode);\n };\n const height = singleNode.y1! - singleNode.y0! > 0 ? singleNode.y1! - singleNode.y0! : 0;\n let padding = 8;\n let textLengthForNodeWeight = 0;\n\n // If the nodeWeight is in the same line as node description an extra padding\n // of 6 px is required between node description and node weight.\n if (height < MIN_HEIGHT_FOR_DOUBLINE_TYPE) {\n padding = padding + 6;\n const tspan = select('.nodeName').append('text').attr('class', 'tempText').append('tspan').text(null);\n tspan.text(singleNode.actualValue!);\n if (tspan.node() !== null) {\n textLengthForNodeWeight = tspan.node()!.getComputedTextLength();\n padding = padding + textLengthForNodeWeight;\n }\n tspan.text(null);\n selectAll('.tempText').remove();\n }\n // Since the total width of the node is 124 and we are giving margin of 8px from the left .\n //So the actual value on which it will be truncated is 124-8=116.\n const truncatedname: string = this._truncateText(singleNode.name, 116, padding);\n const isTruncated: boolean = truncatedname.slice(-3) === '...';\n const id = getId('tooltip');\n const div = select('body')\n .append('div')\n .attr('id', id)\n .attr('class', this._classNames.toolTip!)\n .style('opacity', 0);\n const nodeId = getId('nodeBar');\n const node = (\n <g key={index} id={getId('nodeGElement')}>\n <rect\n x={singleNode.x0}\n y={singleNode.y0}\n height={height}\n width={singleNode.x1! - singleNode.x0!}\n fill={this._fillNodeColors(singleNode)}\n id={nodeId}\n onMouseOver={this._onHover.bind(this, singleNode)}\n onMouseOut={onMouseOut}\n onFocus={this._onCloseCallout.bind(this)}\n stroke={this._fillNodeBorder(singleNode)}\n strokeWidth=\"2\"\n opacity=\"1\"\n data-is-focusable={true}\n aria-label={'node' + `${singleNode.name}` + 'with weight' + `${singleNode.actualValue}`}\n role=\"img\"\n />\n {singleNode.y1! - singleNode.y0! > MIN_HEIGHT_FOR_TYPE && (\n <g className={this._classNames.nodeTextContainer}>\n <g className=\"nodeName\">\n <text\n id={`${nodeId}-name`}\n x={singleNode.x0}\n y={singleNode.y0}\n dy={'1.2em'}\n dx={'0.4em'}\n textAnchor={this._isRtl ? 'end' : 'start'}\n fontWeight=\"regular\"\n aria-hidden=\"true\"\n fill={\n !(\n !this.state.selectedState ||\n (this.state.selectedState &&\n this.state.selectedNodes.has(singleNode.index!) &&\n this.state.selectedNode) ||\n (this.state.selectedState && !this.state.selectedNode)\n )\n ? DEFAULT_TEXT_COLOR\n : NON_SELECTED_TEXT_COLOR\n }\n fontSize={10}\n onMouseOver={this._showTooltip.bind(this, singleNode.name, isTruncated, div)}\n onMouseOut={this._hideTooltip.bind(this, div)}\n >\n {truncatedname}\n </text>\n </g>\n\n <text\n x={\n height > MIN_HEIGHT_FOR_DOUBLINE_TYPE ? singleNode.x0 : singleNode.x1! - textLengthForNodeWeight - 8\n }\n y={singleNode.y0}\n dy={height > MIN_HEIGHT_FOR_DOUBLINE_TYPE ? '2em' : '1em'}\n dx={height > MIN_HEIGHT_FOR_DOUBLINE_TYPE ? '0.4em' : '0em'}\n textAnchor={this._isRtl ? 'end' : 'start'}\n fontWeight=\"bold\"\n aria-hidden=\"true\"\n fill={\n !(\n !this.state.selectedState ||\n (this.state.selectedState &&\n this.state.selectedNodes.has(singleNode.index!) &&\n this.state.selectedNode) ||\n (this.state.selectedState && !this.state.selectedNode)\n )\n ? DEFAULT_TEXT_COLOR\n : NON_SELECTED_TEXT_COLOR\n }\n fontSize={14}\n >\n {singleNode.actualValue}\n </text>\n </g>\n )}\n </g>\n );\n nodes.push(node);\n });\n return nodes;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onLeave(singleNode: SNode) {\n if (this.state.selectedState) {\n this.setState({\n selectedState: false,\n selectedNodes: new Set<number>(),\n selectedLinks: new Set<number>(),\n selectedNode: undefined,\n });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onHover(singleNode: SNode, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n this._onCloseCallout();\n if (!this.state.selectedState) {\n const selectedLinks = this._getSelectedLinks(singleNode);\n const selectedNodes = this._getSelectedNodes(selectedLinks);\n selectedNodes.push(singleNode);\n this.setState({\n selectedState: true,\n selectedNodes: new Set<number>(Array.from(selectedNodes).map(node => node.index)),\n selectedLinks: new Set<number>(Array.from(selectedLinks).map(link => link.index!)),\n selectedNode: singleNode,\n refSelected: mouseEvent, //this._refArray.get(index),\n isCalloutVisible: singleNode.y1! - singleNode.y0! < MIN_HEIGHT_FOR_TYPE,\n color: singleNode.color,\n xCalloutValue: singleNode.name,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yCalloutValue: singleNode.actualValue! as any as string,\n });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onStreamHover(singleLink: SLink, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n this._onCloseCallout();\n if (!this.state.selectedState) {\n const { selectedLinks, selectedNodes } = this._getSelectedLinksforStreamHover(singleLink);\n this.setState({\n selectedState: true,\n selectedNodes: new Set<number>(Array.from(selectedNodes).map(node => node.index!)),\n selectedLinks: new Set<number>(Array.from(selectedLinks).map(link => link.index!)),\n refSelected: mouseEvent,\n selectedLink: singleLink,\n isCalloutVisible: true,\n color: (singleLink.source as SNode).color,\n xCalloutValue: (singleLink.target as SNode).name,\n yCalloutValue: singleLink.unnormalizedValue!.toString(),\n descriptionMessage: 'from ' + (singleLink.source as SNode).name,\n });\n }\n }\n\n private _onStreamLeave(singleLink: SLink) {\n if (this.state.selectedState) {\n this.setState({\n selectedState: false,\n selectedNodes: new Set<number>(),\n selectedLinks: new Set<number>(),\n selectedLink: undefined,\n });\n }\n }\n\n private _onFocusLink(singleLink: SLink, element: React.FocusEvent<SVGElement>): void {\n element.persist();\n this._onCloseCallout();\n this.setState({\n refSelected: element.currentTarget,\n selectedLink: singleLink,\n isCalloutVisible: true,\n color: (singleLink.source as SNode).color,\n xCalloutValue: (singleLink.target as SNode).name,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yCalloutValue: (singleLink.source as SNode).actualValue! as any as string,\n descriptionMessage: 'from ' + (singleLink.source as SNode).name,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onCloseCallout = () => {\n this.setState({\n isCalloutVisible: false,\n refSelected: undefined,\n descriptionMessage: '',\n });\n };\n\n private _onBlur = (): void => {\n /**/\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fillNodeColors = (singleNode: SNode): string | undefined => {\n if (!this.state.selectedState) {\n return singleNode.color;\n } else if (this.state.selectedState && this.state.selectedNodes.has(singleNode.index!) && this.state.selectedNode) {\n return this.state.selectedNode.color;\n } else if (this.state.selectedState && !this.state.selectedNode) {\n return singleNode.color;\n }\n };\n\n /**\n * This is used to assign node fillcolors and borderColor cyclically when the user doesnt\n * provide color to individual node.\n */\n private _assignNodeColors() {\n let colors: string[];\n let borders: string[];\n if (this.props.colorsForNodes && this.props.borderColorsForNodes) {\n colors = this.props.colorsForNodes;\n borders = this.props.borderColorsForNodes;\n } else {\n colors = DEFAULT_NODE_COLORS.map(color => color.fillColor);\n borders = DEFAULT_NODE_COLORS.map(color => color.borderColor);\n }\n let currentIndex = 0;\n this.props.data.SankeyChartData!.nodes.forEach((node: SNode) => {\n if (!node.color && !node.borderColor) {\n node.color = colors[currentIndex];\n node.borderColor = borders[currentIndex];\n } else if (node.color && !node.borderColor) {\n node.borderColor = '#757575';\n } else if (node.borderColor && !node.color) {\n node.color = '#F5F5F5';\n }\n currentIndex = (currentIndex + 1) % colors.length;\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fillStreamColors(singleLink: SLink, gradientUrl: string): string | undefined {\n if (this.state.selectedState && this.state.selectedLinks.has(singleLink.index!) && this.state.selectedNode) {\n return this.state.selectedNode.color;\n } else if (this.state.selectedState && this.state.selectedLinks.has(singleLink.index!)) {\n return gradientUrl;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fillStreamBorder(singleLink: SLink, gradientUrl: string): string {\n if (!this.state.selectedState) {\n return NON_SELECTED_NODE_AND_STREAM_COLOR;\n } else if (this.state.selectedState && this.state.selectedLinks.has(singleLink.index!) && this.state.selectedNode) {\n return this.state.selectedNode.borderColor!;\n } else if (this.state.selectedState && this.state.selectedLinks.has(singleLink.index!)) {\n return gradientUrl;\n }\n return NON_SELECTED_NODE_AND_STREAM_COLOR;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fillNodeBorder = (singleNode: SNode): string => {\n if (!this.state.selectedState) {\n return singleNode.borderColor!;\n } else if (this.state.selectedState && this.state.selectedNodes.has(singleNode.index!) && this.state.selectedNode) {\n return this.state.selectedNode.borderColor!;\n } else if (this.state.selectedState && this.state.selectedNodes.has(singleNode.index!)) {\n return singleNode.borderColor!;\n }\n return singleNode.borderColor!;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getSelectedNodes(selectedLinks: Set<SLink>): any[] {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nodes: SNode[] = [];\n selectedLinks.forEach(link => {\n nodes.push(link.target as SNode);\n\n if (nodes.indexOf(link.source as SNode) === -1) {\n nodes.push(link.source as SNode);\n }\n });\n return nodes;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getSelectedLinks(singleNode: SNode): Set<SLink> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-array-constructor\n const q: any = new Array<any>();\n const finalLinks: Set<SLink> = new Set<SLink>();\n\n singleNode.sourceLinks!.forEach((link: SLink) => {\n q.push(link);\n finalLinks.add(link);\n });\n\n while (q.length > 0) {\n const poppedLink: SLink = q.shift();\n const node: SNode = poppedLink.target as SNode;\n if (node && node.sourceLinks) {\n node.sourceLinks.forEach((link: SLink) => {\n finalLinks.add(link);\n q.push(link);\n });\n }\n }\n\n if (singleNode.targetLinks) {\n singleNode.targetLinks.forEach((link: SLink) => {\n q.push(link);\n finalLinks.add(link);\n });\n }\n\n while (q.length > 0) {\n const poppedLink: SLink = q.shift();\n const node: SNode = poppedLink.source as SNode;\n if (node && node.targetLinks) {\n node.targetLinks.forEach((link: SLink) => {\n finalLinks.add(link);\n q.push(link);\n });\n }\n }\n\n return finalLinks;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getSelectedLinksforStreamHover(singleLink: SLink): { selectedLinks: Set<SLink>; selectedNodes: Set<SNode> } {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-array-constructor\n const q: any = new Array<any>();\n const finalLinks: Set<SLink> = new Set<SLink>();\n const finalNodes: Set<SNode> = new Set<SNode>();\n\n q.push(singleLink.source);\n finalLinks.add(singleLink);\n while (q.length > 0) {\n const poppedNode: SNode = q.shift();\n finalNodes.add(poppedNode);\n if (poppedNode.targetLinks && poppedNode.targetLinks.length > 0) {\n poppedNode.targetLinks.forEach((link: SLink) => {\n q.push(link.source);\n finalLinks.add(link);\n });\n }\n }\n\n q.push(singleLink.target);\n\n while (q.length > 0) {\n const poppedNode: SNode = q.shift();\n finalNodes.add(poppedNode);\n if (poppedNode.sourceLinks && poppedNode.sourceLinks.length > 0) {\n poppedNode.sourceLinks.forEach((link: SLink) => {\n q.push(link.target);\n finalLinks.add(link);\n });\n }\n }\n\n return {\n selectedLinks: finalLinks,\n selectedNodes: finalNodes,\n };\n }\n\n private _getOpacityStream(singleLink: SLink): number {\n if (this.state.selectedState) {\n if (!this.state.selectedLinks.has(singleLink.index!)) {\n return NON_SELECTED_OPACITY;\n } else if (\n this.state.selectedState &&\n this.state.selectedLinks.has(singleLink.index!) &&\n !this.state.selectedNode\n ) {\n return SELECTED_STREAM_OPACITY;\n }\n }\n return REST_STREAM_OPACITY;\n }\n\n private _getOpacityStreamBorder(singleLink: SLink): number {\n if (this.state.selectedState && !this.state.selectedLinks.has(singleLink.index!) && !this.state.selectedNode) {\n return NON_SELECTED_STREAM_BORDER_OPACITY;\n }\n\n return NON_SELECTED_OPACITY;\n }\n\n private _fitParentContainer(): void {\n const { containerWidth, containerHeight } = this.state;\n this._reqID = requestAnimationFrame(() => {\n const container = this.props.parentRef ? this.props.parentRef : this.chartContainer;\n const currentContainerWidth = container && container.getBoundingClientRect().width;\n const currentContainerHeight = container && container.getBoundingClientRect().height;\n const shouldResize = containerWidth !== currentContainerWidth || containerHeight !== currentContainerHeight;\n if (shouldResize) {\n this.setState({\n containerWidth: currentContainerWidth,\n containerHeight: currentContainerHeight,\n });\n }\n });\n }\n /**\n *\n * @param text is the text which we are trying to truncate\n * @param rectangleWidth is the width of the rectangle which will contain the text\n * @param padding is the space we need to leave between the rect lines and other text\n * @param nodeWeight is the text if present needs to be accomodate in the same line as text.\n * @returns the truncated text , if truncated given the above parameters.\n */\n private _truncateText(text: string, rectangleWidth: number, padding: number) {\n const textLengthForNodeName = rectangleWidth - padding;\n let elipsisLength = 0;\n const tspan = select('.nodeName')\n .append('text')\n .attr('class', 'tempText')\n .attr('font-size', '10')\n .append('tspan')\n .text(null);\n tspan.text(text);\n if (tspan.node() !== null && tspan.node()!.getComputedTextLength() <= textLengthForNodeName) {\n return text;\n }\n tspan.text(null);\n tspan.text('...');\n if (tspan.node() !== null) {\n elipsisLength = tspan.node()!.getComputedTextLength();\n }\n tspan.text(null);\n let line: string = '';\n for (let i = 0; i < text.length; i++) {\n line += text[i];\n tspan.text(line);\n if (tspan.node() !== null) {\n const w = tspan.node()!.getComputedTextLength();\n if (w >= textLengthForNodeName - elipsisLength) {\n line = line.slice(0, -1);\n line += '...';\n break;\n }\n }\n }\n tspan.text(null);\n selectAll('.tempText').remove();\n return line;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _showTooltip(text: string, checkTrcuncated: boolean, div: any, evt: any) {\n if (checkTrcuncated) {\n //Fixing tooltip position by attaching it to the element rather than page\n div.style('opacity', 0.9);\n div\n .html(text)\n .style('left', evt.pageX + 'px')\n .style('top', evt.pageY - 28 + 'px');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _hideTooltip(div: any) {\n div.style('opacity', 0);\n }\n\n private _isChartEmpty() {\n return !(\n this.props.data &&\n this.props.data.SankeyChartData &&\n this.props.data.SankeyChartData.nodes.length > 0 &&\n this.props.data.SankeyChartData.links.length > 0\n );\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { SVGProps } from 'react';
2
2
  import { LegendShape } from '../components/Legends/Legends.types';
3
- import * as d3Sankey from 'd3-sankey';
3
+ import { SankeyLink, SankeyNode } from 'd3-sankey';
4
4
  export interface IBasestate {
5
5
  _width?: number;
6
6
  _height?: number;
@@ -423,8 +423,8 @@ interface ISLinkExtra {
423
423
  value: number;
424
424
  unnormalizedValue?: number;
425
425
  }
426
- export declare type SNode = d3Sankey.SankeyNode<ISNodeExtra, ISLinkExtra>;
427
- export declare type SLink = d3Sankey.SankeyLink<ISNodeExtra, ISLinkExtra>;
426
+ export declare type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;
427
+ export declare type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;
428
428
  /**
429
429
  * {@docCategory IChartProps}
430
430
  */
@@ -1 +1 @@
1
- {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import { SVGProps } from 'react';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport * as d3Sankey from 'd3-sankey';\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n nodeId: number | string;\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n source: number;\n target: number;\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = d3Sankey.SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = d3Sankey.SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number;\n color: string;\n legend: string;\n /**\n * Data to show in callout\n */\n data?: number;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color: string;\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n"]}
1
+ {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import { SVGProps } from 'react';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n nodeId: number | string;\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n source: number;\n target: number;\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number;\n color: string;\n legend: string;\n /**\n * Data to show in callout\n */\n data?: number;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color: string;\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { IChartDataPoint, IChartProps, IVerticalStackedChartProps } from '../index';
1
+ import { IChartDataPoint, IChartProps, IHorizontalBarChartWithAxisDataPoint, IVerticalStackedChartProps } from '../index';
2
2
  export declare const chartPointsVBC: {
3
3
  x: number;
4
4
  y: number;
@@ -20,3 +20,6 @@ export declare const pointsHBCWA: {
20
20
  }[];
21
21
  export declare const pointsDC: IChartDataPoint[];
22
22
  export declare const chartPointsDC: IChartProps;
23
+ export declare const chartPointsHBCWA: IHorizontalBarChartWithAxisDataPoint[];
24
+ export declare const chartPointsWithStringYAxisHBCWA: IHorizontalBarChartWithAxisDataPoint[];
25
+ export declare const chartPointsWithAxisToolTipHBCWA: IHorizontalBarChartWithAxisDataPoint[];
@@ -117,4 +117,82 @@ export var chartPointsDC = {
117
117
  chartTitle: 'Donut chart example',
118
118
  chartData: pointsDC,
119
119
  };
120
+ export var chartPointsHBCWA = [
121
+ {
122
+ x: 10000,
123
+ y: 5000,
124
+ legend: 'Oranges',
125
+ color: DefaultPalette.accent,
126
+ yAxisCalloutData: '2020/04/30',
127
+ xAxisCalloutData: '10%',
128
+ },
129
+ {
130
+ x: 20000,
131
+ y: 50000,
132
+ legend: 'Grapes',
133
+ color: DefaultPalette.blueDark,
134
+ yAxisCalloutData: '2020/04/30',
135
+ xAxisCalloutData: '20%',
136
+ },
137
+ {
138
+ x: 25000,
139
+ y: 30000,
140
+ legend: 'Apples',
141
+ color: DefaultPalette.blueMid,
142
+ yAxisCalloutData: '2020/04/30',
143
+ xAxisCalloutData: '37%',
144
+ },
145
+ {
146
+ x: 40000,
147
+ y: 13000,
148
+ legend: 'Bananas',
149
+ color: DefaultPalette.blueLight,
150
+ yAxisCalloutData: '2020/04/30',
151
+ xAxisCalloutData: '88%',
152
+ },
153
+ ];
154
+ export var chartPointsWithStringYAxisHBCWA = [
155
+ {
156
+ y: 'String One',
157
+ x: 1000,
158
+ color: DefaultPalette.accent,
159
+ },
160
+ {
161
+ y: 'String Two',
162
+ x: 5000,
163
+ color: DefaultPalette.blueDark,
164
+ },
165
+ {
166
+ y: 'String Three',
167
+ x: 3000,
168
+ color: DefaultPalette.blueMid,
169
+ },
170
+ {
171
+ y: 'String Four',
172
+ x: 2000,
173
+ color: DefaultPalette.blue,
174
+ },
175
+ ];
176
+ export var chartPointsWithAxisToolTipHBCWA = [
177
+ {
178
+ x: 1000,
179
+ y: 1000,
180
+ color: DefaultPalette.accent,
181
+ },
182
+ {
183
+ x: 2000,
184
+ y: 5000,
185
+ color: DefaultPalette.blueDark,
186
+ },
187
+ {
188
+ x: 3000,
189
+ y: 3000,
190
+ color: DefaultPalette.blueMid,
191
+ },
192
+ {
193
+ x: 4000,
194
+ y: 2000,
195
+ color: DefaultPalette.blue,
196
+ },
197
+ ];
120
198
  //# sourceMappingURL=test-data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-data.js","sourceRoot":"../src/","sources":["utilities/test-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,MAAM,CAAC,IAAM,cAAc,GAAG;IAC5B;QACE,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,KAAK;QACR,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,cAAc,CAAC,MAAM;QAC5B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EAAE,KAAK;KACxB;IACD;QACE,CAAC,EAAE,KAAK;QACR,CAAC,EAAE,KAAK;QACR,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,cAAc,CAAC,QAAQ;QAC9B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EAAE,KAAK;KACxB;IACD;QACE,CAAC,EAAE,KAAK;QACR,CAAC,EAAE,KAAK;QACR,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,cAAc,CAAC,OAAO;QAC7B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EAAE,KAAK;KACxB;CACF,CAAC;AAEF,IAAM,oBAAoB,GAAwB;IAChD;QACE,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,cAAc,CAAC,MAAM;QAC5B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EA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lib/Styling';\nimport { IChartDataPoint, IChartProps, IVSChartDataPoint, IVerticalStackedChartProps } from '../index';\n\nexport const chartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: 50000,\n legend: 'Second',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nconst firstChartPointsVSBC: IVSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 40,\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '40%',\n },\n {\n legend: 'Metadata2',\n data: 5,\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '5%',\n },\n];\n\nconst secondChartPointsVSBC: IVSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 30,\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '30%',\n },\n {\n legend: 'Metadata2',\n data: 20,\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n];\n\nexport const chartPointsVSBC: IVerticalStackedChartProps[] = [\n { chartData: firstChartPointsVSBC, xAxisPoint: 0 },\n { chartData: secondChartPointsVSBC, xAxisPoint: 20 },\n];\n\nexport const chartPoints2VSBC: IVerticalStackedChartProps[] = [\n {\n chartData: firstChartPointsVSBC,\n xAxisPoint: 0,\n lineData: [{ y: 15, legend: 'Line1', color: DefaultPalette.yellow }],\n },\n {\n chartData: secondChartPointsVSBC,\n xAxisPoint: 20,\n lineData: [{ y: 30, legend: 'Line1', color: DefaultPalette.yellow }],\n },\n];\n\nexport const emptychartPointsVSBC: IVerticalStackedChartProps[] = [{ chartData: [], xAxisPoint: 0 }];\n\nexport const pointsHBCWA = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Dogs',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: DefaultPalette.blueLight,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '88%',\n },\n];\n\nexport const pointsDC: IChartDataPoint[] = [\n { legend: 'first', data: 20000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 45000, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const chartPointsDC: IChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n"]}
1
+ {"version":3,"file":"test-data.js","sourceRoot":"../src/","sources":["utilities/test-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAS7D,MAAM,CAAC,IAAM,cAAc,GAAG;IAC5B;QACE,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,KAAK;QACR,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,cAAc,CAAC,MAAM;QAC5B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EAAE,KAAK;KACxB;IACD;QACE,CAAC,EAAE,KAAK;QACR,CAAC,EAAE,KAAK;QACR,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,cAAc,CAAC,QAAQ;QAC9B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EAAE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EAAE,IAAI;QACP,KAAK,EAAE,cAAc,CAAC,QAAQ;KAC/B;IACD;QACE,CAAC,EAAE,cAAc;QACjB,CAAC,EAAE,IAAI;QACP,KAAK,EAAE,cAAc,CAAC,OAAO;KAC9B;IACD;QACE,CAAC,EAAE,aAAa;QAChB,CAAC,EAAE,IAAI;QACP,KAAK,EAAE,cAAc,CAAC,IAAI;KAC3B;CACF,CAAC;AAEF,MAAM,CAAC,IAAM,+BAA+B,GAA2C;IACrF;QACE,CAAC,EAAE,IAAI;QACP,CAAC,EAAE,IAAI;QACP,KAAK,EAAE,cAAc,CAAC,MAAM;KAC7B;IACD;QACE,CAAC,EAAE,IAAI;QACP,CAAC,EAAE,IAAI;QACP,KAAK,EAAE,cAAc,CAAC,QAAQ;KAC/B;IACD;QACE,CAAC,EAAE,IAAI;QACP,CAAC,EAAE,IAAI;QACP,KAAK,EAAE,cAAc,CAAC,OAAO;KAC9B;IACD;QACE,CAAC,EAAE,IAAI;QACP,CAAC,EAAE,IAAI;QACP,KAAK,EAAE,cAAc,CAAC,IAAI;KAC3B;CACF,CAAC","sourcesContent":["import { DefaultPalette } from '@fluentui/react/lib/Styling';\nimport {\n IChartDataPoint,\n IChartProps,\n IHorizontalBarChartWithAxisDataPoint,\n IVSChartDataPoint,\n IVerticalStackedChartProps,\n} from '../index';\n\nexport const chartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: 50000,\n legend: 'Second',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nconst firstChartPointsVSBC: IVSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 40,\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '40%',\n },\n {\n legend: 'Metadata2',\n data: 5,\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '5%',\n },\n];\n\nconst secondChartPointsVSBC: IVSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 30,\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '30%',\n },\n {\n legend: 'Metadata2',\n data: 20,\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n];\n\nexport const chartPointsVSBC: IVerticalStackedChartProps[] = [\n { chartData: firstChartPointsVSBC, xAxisPoint: 0 },\n { chartData: secondChartPointsVSBC, xAxisPoint: 20 },\n];\n\nexport const chartPoints2VSBC: IVerticalStackedChartProps[] = [\n {\n chartData: firstChartPointsVSBC,\n xAxisPoint: 0,\n lineData: [{ y: 15, legend: 'Line1', color: DefaultPalette.yellow }],\n },\n {\n chartData: secondChartPointsVSBC,\n xAxisPoint: 20,\n lineData: [{ y: 30, legend: 'Line1', color: DefaultPalette.yellow }],\n },\n];\n\nexport const emptychartPointsVSBC: IVerticalStackedChartProps[] = [{ chartData: [], xAxisPoint: 0 }];\n\nexport const pointsHBCWA = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Dogs',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: DefaultPalette.blueLight,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '88%',\n },\n];\n\nexport const pointsDC: IChartDataPoint[] = [\n { legend: 'first', data: 20000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 45000, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const chartPointsDC: IChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: DefaultPalette.accent,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Grapes',\n color: DefaultPalette.blueDark,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: DefaultPalette.blueMid,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: DefaultPalette.blueLight,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '88%',\n },\n];\n\nexport const chartPointsWithStringYAxisHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n y: 'String One',\n x: 1000,\n color: DefaultPalette.accent,\n },\n {\n y: 'String Two',\n x: 5000,\n color: DefaultPalette.blueDark,\n },\n {\n y: 'String Three',\n x: 3000,\n color: DefaultPalette.blueMid,\n },\n {\n y: 'String Four',\n x: 2000,\n color: DefaultPalette.blue,\n },\n];\n\nexport const chartPointsWithAxisToolTipHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 1000,\n y: 1000,\n color: DefaultPalette.accent,\n },\n {\n x: 2000,\n y: 5000,\n color: DefaultPalette.blueDark,\n },\n {\n x: 3000,\n y: 3000,\n color: DefaultPalette.blueMid,\n },\n {\n x: 4000,\n y: 2000,\n color: DefaultPalette.blue,\n },\n];\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Axis as D3Axis } from 'd3-axis';
2
- import * as d3TimeFormat from 'd3-time-format';
2
+ import { TimeLocaleDefinition as d3TimeLocaleDefinition } from 'd3-time-format';
3
3
  import { IAccessibilityProps, IEventsAnnotationProps, ILineChartPoints, IDataPoint, IVerticalBarChartDataPoint, IHorizontalBarChartWithAxisDataPoint } from '../index';
4
4
  export declare type NumericAxis = D3Axis<number | {
5
5
  valueOf(): number;
@@ -116,7 +116,7 @@ export declare function createNumericXAxis(xAxisParams: IXAxisParams, chartType:
116
116
  * @param {IXAxisParams} xAxisParams
117
117
  * @param {ITickParams} tickParams
118
118
  */
119
- export declare function createDateXAxis(xAxisParams: IXAxisParams, tickParams: ITickParams, culture?: string, options?: Intl.DateTimeFormatOptions, timeFormatLocale?: d3TimeFormat.TimeLocaleDefinition, customDateTimeFormatter?: (dateTime: Date) => string): {
119
+ export declare function createDateXAxis(xAxisParams: IXAxisParams, tickParams: ITickParams, culture?: string, options?: Intl.DateTimeFormatOptions, timeFormatLocale?: d3TimeLocaleDefinition, customDateTimeFormatter?: (dateTime: Date) => string): {
120
120
  xScale: import("d3-scale").ScaleTime<number, number, never>;
121
121
  tickValues: string[];
122
122
  };
@@ -5,7 +5,7 @@ import { max as d3Max, min as d3Min } from 'd3-array';
5
5
  import { scaleLinear as d3ScaleLinear, scaleTime as d3ScaleTime, scaleBand as d3ScaleBand } from 'd3-scale';
6
6
  import { select as d3Select, event as d3Event, selectAll as d3SelectAll } from 'd3-selection';
7
7
  import { format as d3Format } from 'd3-format';
8
- import * as d3TimeFormat from 'd3-time-format';
8
+ import { timeFormat as d3TimeFormat, timeFormatLocale as d3TimeFormatLocale, } from 'd3-time-format';
9
9
  import { timeSecond as d3TimeSecond, timeMinute as d3TimeMinute, timeHour as d3TimeHour, timeDay as d3TimeDay, timeMonth as d3TimeMonth, timeWeek as d3TimeWeek, timeYear as d3TimeYear, } from 'd3-time';
10
10
  import { formatPrefix as d3FormatPrefix } from 'd3-format';
11
11
  export var ChartTypes;
@@ -59,7 +59,7 @@ export function createNumericXAxis(xAxisParams, chartType, culture) {
59
59
  return { xScale: xAxisScale, tickValues: tickValues };
60
60
  }
61
61
  function multiFormat(date, locale) {
62
- var timeFormat = locale ? locale.format : d3TimeFormat.timeFormat;
62
+ var timeFormat = locale ? locale.format : d3TimeFormat;
63
63
  var formatMillisecond = timeFormat('.%L');
64
64
  var formatSecond = timeFormat(':%S');
65
65
  var formatMinute = timeFormat('%I:%M');
@@ -108,14 +108,14 @@ export function createDateXAxis(xAxisParams, tickParams, culture, options, timeF
108
108
  });
109
109
  }
110
110
  else if (timeFormatLocale) {
111
- var locale_1 = d3TimeFormat.timeFormatLocale(timeFormatLocale);
111
+ var locale_1 = d3TimeFormatLocale(timeFormatLocale);
112
112
  xAxis.tickFormat(function (domainValue, _index) {
113
113
  return multiFormat(domainValue, locale_1);
114
114
  });
115
115
  }
116
116
  tickParams.tickValues ? xAxis.tickValues(tickParams.tickValues) : '';
117
117
  if (culture === undefined) {
118
- tickParams.tickFormat ? xAxis.tickFormat(d3TimeFormat.timeFormat(tickParams.tickFormat)) : '';
118
+ tickParams.tickFormat ? xAxis.tickFormat(d3TimeFormat(tickParams.tickFormat)) : '';
119
119
  }
120
120
  if (xAxisElement) {
121
121
  d3Select(xAxisElement).call(xAxis).selectAll('text').attr('aria-hidden', 'true');