@fluentui/react-charting 5.24.4 → 5.24.6

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 (141) hide show
  1. package/CHANGELOG.json +55 -1
  2. package/CHANGELOG.md +24 -2
  3. package/config/tests.js +0 -12
  4. package/dist/react-charting.d.ts +4 -0
  5. package/dist/react-charting.js +1 -1
  6. package/dist/react-charting.min.js +1 -1
  7. package/etc/react-charting.api.md +1 -0
  8. package/lib/components/AreaChart/AreaChart.styles.js +2 -2
  9. package/lib/components/AreaChart/AreaChart.styles.js.map +1 -1
  10. package/lib/components/CommonComponents/CartesianChart.base.js +28 -21
  11. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  12. package/lib/components/CommonComponents/CartesianChart.styles.js +35 -58
  13. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  14. package/lib/components/DeclarativeChart/DeclarativeChart.js +38 -16
  15. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  16. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +13 -3
  17. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +215 -139
  18. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  19. package/lib/components/DonutChart/DonutChart.base.js +1 -0
  20. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  21. package/lib/components/DonutChart/DonutChart.styles.js +2 -0
  22. package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
  23. package/lib/components/DonutChart/DonutChart.types.d.ts +4 -0
  24. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  25. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -1
  26. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  27. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +3 -14
  28. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  29. package/lib/components/LineChart/LineChart.styles.js +3 -11
  30. package/lib/components/LineChart/LineChart.styles.js.map +1 -1
  31. package/lib/components/SankeyChart/SankeyChart.styles.js +2 -1
  32. package/lib/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  33. package/lib/components/ScatterChart/ScatterChart.styles.js +3 -14
  34. package/lib/components/ScatterChart/ScatterChart.styles.js.map +1 -1
  35. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +3 -1
  36. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  37. package/lib/components/VerticalBarChart/VerticalBarChart.styles.js +3 -14
  38. package/lib/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  39. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -1
  40. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  41. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +3 -14
  42. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  43. package/lib/utilities/Common.styles.d.ts +6 -0
  44. package/lib/utilities/Common.styles.js +51 -0
  45. package/lib/utilities/Common.styles.js.map +1 -0
  46. package/lib/utilities/SVGTooltipText.d.ts +1 -1
  47. package/lib/utilities/SVGTooltipText.js +3 -3
  48. package/lib/utilities/SVGTooltipText.js.map +1 -1
  49. package/lib/utilities/index.d.ts +1 -0
  50. package/lib/utilities/index.js +1 -0
  51. package/lib/utilities/index.js.map +1 -1
  52. package/lib-amd/components/AreaChart/AreaChart.styles.js +2 -2
  53. package/lib-amd/components/AreaChart/AreaChart.styles.js.map +1 -1
  54. package/lib-amd/components/CommonComponents/CartesianChart.base.js +28 -21
  55. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  56. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +33 -57
  57. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  58. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +37 -15
  59. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  60. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +13 -3
  61. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +216 -139
  62. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  63. package/lib-amd/components/DonutChart/DonutChart.base.js +1 -0
  64. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  65. package/lib-amd/components/DonutChart/DonutChart.styles.js +2 -1
  66. package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -1
  67. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +4 -0
  68. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  69. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -1
  70. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  71. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +3 -13
  72. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  73. package/lib-amd/components/LineChart/LineChart.styles.js +3 -10
  74. package/lib-amd/components/LineChart/LineChart.styles.js.map +1 -1
  75. package/lib-amd/components/SankeyChart/SankeyChart.styles.js +2 -2
  76. package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  77. package/lib-amd/components/ScatterChart/ScatterChart.styles.js +3 -13
  78. package/lib-amd/components/ScatterChart/ScatterChart.styles.js.map +1 -1
  79. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +3 -1
  80. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  81. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js +3 -13
  82. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  83. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -1
  84. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  85. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +3 -13
  86. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  87. package/lib-amd/utilities/Common.styles.d.ts +6 -0
  88. package/lib-amd/utilities/Common.styles.js +57 -0
  89. package/lib-amd/utilities/Common.styles.js.map +1 -0
  90. package/lib-amd/utilities/SVGTooltipText.d.ts +1 -1
  91. package/lib-amd/utilities/SVGTooltipText.js +3 -3
  92. package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
  93. package/lib-amd/utilities/index.d.ts +1 -0
  94. package/lib-amd/utilities/index.js +2 -1
  95. package/lib-amd/utilities/index.js.map +1 -1
  96. package/lib-commonjs/components/AreaChart/AreaChart.styles.js +2 -2
  97. package/lib-commonjs/components/AreaChart/AreaChart.styles.js.map +1 -1
  98. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +28 -21
  99. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  100. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +33 -56
  101. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  102. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +37 -15
  103. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  104. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +13 -3
  105. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +216 -139
  106. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  107. package/lib-commonjs/components/DonutChart/DonutChart.base.js +1 -0
  108. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  109. package/lib-commonjs/components/DonutChart/DonutChart.styles.js +2 -0
  110. package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
  111. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +4 -0
  112. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  113. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -1
  114. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  115. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +3 -14
  116. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  117. package/lib-commonjs/components/LineChart/LineChart.styles.js +3 -11
  118. package/lib-commonjs/components/LineChart/LineChart.styles.js.map +1 -1
  119. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js +2 -1
  120. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  121. package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js +3 -14
  122. package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js.map +1 -1
  123. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +3 -1
  124. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  125. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.styles.js +3 -14
  126. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  127. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -1
  128. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  129. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +3 -14
  130. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  131. package/lib-commonjs/utilities/Common.styles.d.ts +6 -0
  132. package/lib-commonjs/utilities/Common.styles.js +58 -0
  133. package/lib-commonjs/utilities/Common.styles.js.map +1 -0
  134. package/lib-commonjs/utilities/SVGTooltipText.d.ts +1 -1
  135. package/lib-commonjs/utilities/SVGTooltipText.js +3 -3
  136. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  137. package/lib-commonjs/utilities/index.d.ts +1 -0
  138. package/lib-commonjs/utilities/index.js +1 -0
  139. package/lib-commonjs/utilities/index.js.map +1 -1
  140. package/package.json +2 -2
  141. package/src/components/DonutChart/DonutChart.types.ts +5 -0
@@ -155,6 +155,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities",
155
155
  ? this._valueInsideDonut(this.props.valueInsideDonut, chartData)
156
156
  : '';
157
157
  return !this._isChartEmpty() ? (React.createElement("div", { className: this._classNames.root, ref: function (rootElem) { return (_this._rootElem = rootElem); }, onMouseLeave: this._handleChartMouseLeave },
158
+ this.props.xAxisAnnotation && (React.createElement("text", { className: this._classNames.axisAnnotation, x: this.state._width / 2, y: this.state._height - 10, textAnchor: "middle" }, this.props.xAxisAnnotation)),
158
159
  React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal, handleTabKey: react_focus_1.FocusZoneTabbableElements.all },
159
160
  React.createElement("div", null,
160
161
  React.createElement("svg", { className: this._classNames.chart, "aria-label": data === null || data === void 0 ? void 0 : data.chartTitle, ref: function (node) { return _this._setViewBox(node); } },
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.base.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.base.tsx"],"names":[],"mappings":";;;;IAsBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4C,CAAC;IACrF,IAAM,uBAAuB,GAAG,EAAE,CAAC;IAkBnC;QAAoC,0CAAmD;QAiCrF,wBAAY,KAAuB;;YACjC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAkJR,aAAO,GAAG,UAAC,IAA0B;;gBAC1C,OAAO,IAAA,4BAAO,EAAC,KAAI,CAAC,SAAS,EAAE,MAAA,KAAI,CAAC,WAAW,CAAC,OAAO,0CAAE,KAAK,EAAE,IAAA,kBAAM,GAAE,EAAE,IAAI,CA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,MAAM,GAAG,CAAC,CAClF,CAAC;QACJ,CAAC;QAnYa,2BAAY,GAA8B;YACtD,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,IAAI;SACjB,AAHyB,CAGxB;QAiZJ,qBAAC;KAAA,AArZD,CAAoC,KAAK,CAAC,SAAS,GAqZlD;IArZY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport { ScaleOrdinal } from 'd3-scale';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport { IAccessibilityProps, ChartHoverCard, ILegend, Legends } from '../../index';\nimport { Pie } from './Pie/index';\nimport { IChartDataPoint, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './index';\nimport {\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n areArraysEqual,\n MIN_DONUT_RADIUS,\n} from '../../utilities/index';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { ILegendContainer } from '../Legends/index';\n\nconst getClassNames = classNamesFunction<IDonutChartStyleProps, IDonutChartStyles>();\nconst LEGEND_CONTAINER_HEIGHT = 40;\n\nexport interface IDonutChartState {\n showHover?: boolean;\n value?: string | undefined;\n legend?: string | undefined;\n _width?: number | undefined;\n _height?: number | undefined;\n activeLegend?: string;\n color?: string | undefined;\n xCalloutValue?: string;\n yCalloutValue?: string;\n focusedArcId?: string;\n dataPointCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n selectedLegends: string[];\n}\n\nexport class DonutChartBase extends React.Component<IDonutChartProps, IDonutChartState> implements IChart {\n public static defaultProps: Partial<IDonutChartProps> = {\n innerRadius: 0,\n hideLabels: true,\n };\n public _colors: ScaleOrdinal<string, {}>;\n private _classNames: IProcessedStyleSet<IDonutChartStyles>;\n private _rootElem: HTMLElement | null;\n private _uniqText: string;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private _currentHoverElement: any;\n private _calloutId: string;\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _emptyChartId: string | null;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n public static getDerivedStateFromProps(\n nextProps: Readonly<IDonutChartProps>,\n prevState: Readonly<IDonutChartState>,\n ): Partial<IDonutChartState> | null {\n let widthState: { _width: number } | undefined;\n if (nextProps.width && nextProps.width !== prevState._width) {\n widthState = { _width: nextProps.width };\n }\n\n let heightState: { _height: number } | undefined;\n if (nextProps.height && nextProps.height !== prevState._height) {\n heightState = { _height: nextProps.height - LEGEND_CONTAINER_HEIGHT };\n }\n\n return { ...widthState, ...heightState };\n }\n\n constructor(props: IDonutChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this.state = {\n showHover: false,\n value: '',\n legend: '',\n _width: this.props.width || 200,\n _height: this.props.height || 200,\n activeLegend: undefined,\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n focusedArcId: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n };\n this._hoverCallback = this._hoverCallback.bind(this);\n this._focusCallback = this._focusCallback.bind(this);\n this._hoverLeave = this._hoverLeave.bind(this);\n this._calloutId = getId('callout');\n this._uniqText = getId('_Pie_');\n this._emptyChartId = getId('_DonutChart_empty');\n this._legendsRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n _width: this._rootElem.offsetWidth,\n _height: this._rootElem.offsetHeight - LEGEND_CONTAINER_HEIGHT,\n });\n }\n }\n\n public componentDidUpdate(prevProps: IDonutChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): JSX.Element {\n const { data, hideLegend = false } = this.props;\n const points = this._addDefaultColors(data?.chartData);\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.state._width!,\n height: this.state._height!,\n color: this.state.color!,\n className: this.props.className!,\n });\n\n const legendBars = this._createLegends(points);\n const donutMarginHorizontal = this.props.hideLabels ? 0 : 80;\n const donutMarginVertical = this.props.hideLabels ? 0 : 40;\n const outerRadius =\n Math.min(this.state._width! - donutMarginHorizontal, this.state._height! - donutMarginVertical) / 2;\n const chartData = this._elevateToMinimums(points.filter((d: IChartDataPoint) => d.data! >= 0));\n const valueInsideDonut =\n this.props.innerRadius! > MIN_DONUT_RADIUS\n ? this._valueInsideDonut(this.props.valueInsideDonut!, chartData!)\n : '';\n return !this._isChartEmpty() ? (\n <div\n className={this._classNames.root}\n ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}\n onMouseLeave={this._handleChartMouseLeave}\n >\n <FocusZone direction={FocusZoneDirection.horizontal} handleTabKey={FocusZoneTabbableElements.all}>\n <div>\n <svg\n className={this._classNames.chart}\n aria-label={data?.chartTitle}\n ref={(node: SVGElement | null) => this._setViewBox(node)}\n >\n <Pie\n width={this.state._width!}\n height={this.state._height!}\n outerRadius={outerRadius}\n innerRadius={this.props.innerRadius!}\n data={chartData!}\n enableGradient={this.props.enableGradient}\n roundCorners={this.props.roundCorners}\n onFocusCallback={this._focusCallback}\n hoverOnCallback={this._hoverCallback}\n hoverLeaveCallback={this._hoverLeave}\n uniqText={this._uniqText}\n onBlurCallback={this._onBlur}\n activeArc={this._getHighlightedLegend()}\n focusedArcId={this.state.focusedArcId || ''}\n href={this.props.href!}\n calloutId={this._calloutId}\n valueInsideDonut={this._toLocaleString(valueInsideDonut)}\n theme={this.props.theme!}\n showLabelsInPercent={this.props.showLabelsInPercent}\n hideLabels={this.props.hideLabels}\n />\n </svg>\n </div>\n </FocusZone>\n <Callout\n target={this._currentHoverElement}\n alignTargetEdge={true}\n isBeakVisible={false}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n hidden={!(!this.props.hideTooltip && this.state.showHover)}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n preventDismissOnLostFocus={true}\n /** Keep the callout updated with details of focused/hovered arc */\n shouldUpdateWhenHidden={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)}\n >\n {this.props.onRenderCalloutPerDataPoint ? (\n this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps!)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value}\n color={this.state.color}\n culture={this.props.culture}\n />\n )}\n </Callout>\n {!hideLegend && <div className={this._classNames.legendContainer}>{legendBars}</div>}\n </div>\n ) : (\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 public get chartContainer(): HTMLElement | null {\n return this._rootElem;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._rootElem, this._legendsRef.current?.toSVG, getRTL(), opts);\n };\n\n private _closeCallout = () => {\n this.setState({\n showHover: false,\n });\n };\n\n private _elevateToMinimums(data: IChartDataPoint[]) {\n let sumOfData = 0;\n const minPercent = 0.01;\n const elevatedData: IChartDataPoint[] = [];\n data.forEach(item => {\n sumOfData += item.data!;\n });\n data.forEach(item => {\n elevatedData.push(\n minPercent * sumOfData > item.data! && item.data! > 0\n ? {\n ...item,\n data: minPercent * sumOfData,\n yAxisCalloutData:\n item.yAxisCalloutData === undefined ? item.data!.toLocaleString() : item.yAxisCalloutData,\n }\n : item,\n );\n });\n return elevatedData;\n }\n private _setViewBox(node: SVGElement | null): void {\n if (node === null) {\n return;\n }\n\n const widthVal = node.parentElement ? node.parentElement.clientWidth : this.state._width;\n\n const heightVal =\n node.parentElement && node.parentElement?.offsetHeight > this.state._height!\n ? node.parentElement?.offsetHeight\n : this.state._height;\n const viewbox = `0 0 ${widthVal!} ${heightVal!}`;\n node.setAttribute('viewBox', viewbox);\n }\n\n private _createLegends(chartData: IChartDataPoint[]): JSX.Element {\n const legendDataItems = chartData.map((point: IChartDataPoint, index: number) => {\n const color: string = this.props.enableGradient\n ? point.gradient?.[0] || getNextGradient(index, 0, this.props.theme?.isInverted)[0]\n : point.color!;\n\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n hoverAction: () => {\n this._handleChartMouseLeave();\n this.setState({ activeLegend: point.legend! });\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: undefined });\n },\n };\n return legend;\n });\n\n const legends = (\n <Legends\n legends={legendDataItems}\n centerLegends\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n // eslint-disable-next-line react/jsx-no-bind\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n return legends;\n }\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps && this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n private _focusCallback = (data: IChartDataPoint, id: string, element: SVGPathElement): void => {\n this._currentHoverElement = element;\n this.setState({\n /** Show the callout if highlighted arc is focused and Hide it if unhighlighted arc is focused */\n showHover: this._noLegendsHighlighted() || this._isLegendHighlighted(data.legend),\n value: data.data!.toString(),\n legend: data.legend,\n color: data.color!,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n focusedArcId: id,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n };\n\n private _hoverCallback = (data: IChartDataPoint, e: React.MouseEvent<SVGPathElement>): void => {\n if (this._calloutAnchorPoint !== data) {\n this._calloutAnchorPoint = data;\n this._currentHoverElement = e;\n let color: string = data.color!;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(this.props.data?.chartData?.findIndex(item => item.legend === data.legend) || 0, 0);\n color = data.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n this.setState({\n /** Show the callout if highlighted arc is hovered and Hide it if unhighlighted arc is hovered */\n showHover: this._noLegendsHighlighted() || this._isLegendHighlighted(data.legend),\n value: data.data!.toString(),\n legend: data.legend,\n color,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n }\n };\n private _onBlur = (): void => {\n this.setState({ focusedArcId: '' });\n };\n\n private _hoverLeave(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n this.setState({ showHover: false });\n };\n\n private _valueInsideDonut(valueInsideDonut: string | number | undefined, data: IChartDataPoint[]) {\n const highlightedLegends = this._getHighlightedLegend();\n if (valueInsideDonut !== undefined && (highlightedLegends.length === 1 || this.state.showHover)) {\n const pointValue = data.find(point => this._isLegendHighlighted(point.legend));\n return pointValue\n ? pointValue.yAxisCalloutData\n ? pointValue.yAxisCalloutData\n : pointValue.data!\n : valueInsideDonut;\n } else if (highlightedLegends.length > 0) {\n let totalValue = 0;\n data.forEach(point => {\n if (highlightedLegends.includes(point.legend!)) {\n totalValue += point.data!;\n }\n });\n return totalValue;\n } else {\n return valueInsideDonut;\n }\n }\n\n private _toLocaleString(data: string | number | undefined) {\n const localeString = formatToLocaleString(data, this.props.culture, this.props.useUTC);\n if (!localeString) {\n return data;\n }\n return localeString?.toString();\n }\n\n /**\n * This function returns\n * the selected legend if there is one\n * or the hovered legend if none of the legends is selected.\n */\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\n }\n\n private _isLegendHighlighted = (legend: string | undefined): boolean => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n private _noLegendsHighlighted = (): boolean => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.chartData &&\n this.props.data.chartData!.filter((d: IChartDataPoint) => d.data! > 0).length > 0\n );\n }\n\n private _addDefaultColors = (donutChartDataPoint?: IChartDataPoint[]): IChartDataPoint[] => {\n return donutChartDataPoint\n ? donutChartDataPoint.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n}\n"]}
1
+ {"version":3,"file":"DonutChart.base.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.base.tsx"],"names":[],"mappings":";;;;IAsBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4C,CAAC;IACrF,IAAM,uBAAuB,GAAG,EAAE,CAAC;IAkBnC;QAAoC,0CAAmD;QAiCrF,wBAAY,KAAuB;;YACjC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YA4JR,aAAO,GAAG,UAAC,IAA0B;;gBAC1C,OAAO,IAAA,4BAAO,EAAC,KAAI,CAAC,SAAS,EAAE,MAAA,KAAI,CAAC,WAAW,CAAC,OAAO,0CAAE,KAAK,EAAE,IAAA,kBAAM,GAAE,EAAE,IAAI,CAAC,CAAC;YAClF,CAAC,CAAC;YAEM,mBAAa,GAAG;gBACtB,KAAI,CAAC,QAAQ,CAAC;oBACZ,SAAS,EAAE,KAAK;iBACjB,CAAC,CAAC;YACL,CAAC,CAA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C,SAAS;gBACzB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAU,CAAC,MAAM,CAAC,UAAC,CAAkB,IAAK,OAAA,CAAC,CAAC,IAAK,GAAG,CAAC,EAAX,CAAW,CAAC,CAAC,MAAM,GAAG,CAAC,CAClF,CAAC;QACJ,CAAC;QA7Ya,2BAAY,GAA8B;YACtD,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,IAAI;SACjB,AAHyB,CAGxB;QA2ZJ,qBAAC;KAAA,AA/ZD,CAAoC,KAAK,CAAC,SAAS,GA+ZlD;IA/ZY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport { ScaleOrdinal } from 'd3-scale';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport { IAccessibilityProps, ChartHoverCard, ILegend, Legends } from '../../index';\nimport { Pie } from './Pie/index';\nimport { IChartDataPoint, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './index';\nimport {\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n areArraysEqual,\n MIN_DONUT_RADIUS,\n} from '../../utilities/index';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { ILegendContainer } from '../Legends/index';\n\nconst getClassNames = classNamesFunction<IDonutChartStyleProps, IDonutChartStyles>();\nconst LEGEND_CONTAINER_HEIGHT = 40;\n\nexport interface IDonutChartState {\n showHover?: boolean;\n value?: string | undefined;\n legend?: string | undefined;\n _width?: number | undefined;\n _height?: number | undefined;\n activeLegend?: string;\n color?: string | undefined;\n xCalloutValue?: string;\n yCalloutValue?: string;\n focusedArcId?: string;\n dataPointCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n selectedLegends: string[];\n}\n\nexport class DonutChartBase extends React.Component<IDonutChartProps, IDonutChartState> implements IChart {\n public static defaultProps: Partial<IDonutChartProps> = {\n innerRadius: 0,\n hideLabels: true,\n };\n public _colors: ScaleOrdinal<string, {}>;\n private _classNames: IProcessedStyleSet<IDonutChartStyles>;\n private _rootElem: HTMLElement | null;\n private _uniqText: string;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private _currentHoverElement: any;\n private _calloutId: string;\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _emptyChartId: string | null;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n public static getDerivedStateFromProps(\n nextProps: Readonly<IDonutChartProps>,\n prevState: Readonly<IDonutChartState>,\n ): Partial<IDonutChartState> | null {\n let widthState: { _width: number } | undefined;\n if (nextProps.width && nextProps.width !== prevState._width) {\n widthState = { _width: nextProps.width };\n }\n\n let heightState: { _height: number } | undefined;\n if (nextProps.height && nextProps.height !== prevState._height) {\n heightState = { _height: nextProps.height - LEGEND_CONTAINER_HEIGHT };\n }\n\n return { ...widthState, ...heightState };\n }\n\n constructor(props: IDonutChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this.state = {\n showHover: false,\n value: '',\n legend: '',\n _width: this.props.width || 200,\n _height: this.props.height || 200,\n activeLegend: undefined,\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n focusedArcId: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n };\n this._hoverCallback = this._hoverCallback.bind(this);\n this._focusCallback = this._focusCallback.bind(this);\n this._hoverLeave = this._hoverLeave.bind(this);\n this._calloutId = getId('callout');\n this._uniqText = getId('_Pie_');\n this._emptyChartId = getId('_DonutChart_empty');\n this._legendsRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n _width: this._rootElem.offsetWidth,\n _height: this._rootElem.offsetHeight - LEGEND_CONTAINER_HEIGHT,\n });\n }\n }\n\n public componentDidUpdate(prevProps: IDonutChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): JSX.Element {\n const { data, hideLegend = false } = this.props;\n const points = this._addDefaultColors(data?.chartData);\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.state._width!,\n height: this.state._height!,\n color: this.state.color!,\n className: this.props.className!,\n });\n\n const legendBars = this._createLegends(points);\n const donutMarginHorizontal = this.props.hideLabels ? 0 : 80;\n const donutMarginVertical = this.props.hideLabels ? 0 : 40;\n const outerRadius =\n Math.min(this.state._width! - donutMarginHorizontal, this.state._height! - donutMarginVertical) / 2;\n const chartData = this._elevateToMinimums(points.filter((d: IChartDataPoint) => d.data! >= 0));\n const valueInsideDonut =\n this.props.innerRadius! > MIN_DONUT_RADIUS\n ? this._valueInsideDonut(this.props.valueInsideDonut!, chartData!)\n : '';\n return !this._isChartEmpty() ? (\n <div\n className={this._classNames.root}\n ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}\n onMouseLeave={this._handleChartMouseLeave}\n >\n {this.props.xAxisAnnotation && (\n <text\n className={this._classNames.axisAnnotation}\n x={this.state._width! / 2}\n y={this.state._height! - 10}\n textAnchor=\"middle\"\n >\n {this.props.xAxisAnnotation}\n </text>\n )}\n <FocusZone direction={FocusZoneDirection.horizontal} handleTabKey={FocusZoneTabbableElements.all}>\n <div>\n <svg\n className={this._classNames.chart}\n aria-label={data?.chartTitle}\n ref={(node: SVGElement | null) => this._setViewBox(node)}\n >\n <Pie\n width={this.state._width!}\n height={this.state._height!}\n outerRadius={outerRadius}\n innerRadius={this.props.innerRadius!}\n data={chartData!}\n enableGradient={this.props.enableGradient}\n roundCorners={this.props.roundCorners}\n onFocusCallback={this._focusCallback}\n hoverOnCallback={this._hoverCallback}\n hoverLeaveCallback={this._hoverLeave}\n uniqText={this._uniqText}\n onBlurCallback={this._onBlur}\n activeArc={this._getHighlightedLegend()}\n focusedArcId={this.state.focusedArcId || ''}\n href={this.props.href!}\n calloutId={this._calloutId}\n valueInsideDonut={this._toLocaleString(valueInsideDonut)}\n theme={this.props.theme!}\n showLabelsInPercent={this.props.showLabelsInPercent}\n hideLabels={this.props.hideLabels}\n />\n </svg>\n </div>\n </FocusZone>\n <Callout\n target={this._currentHoverElement}\n alignTargetEdge={true}\n isBeakVisible={false}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n hidden={!(!this.props.hideTooltip && this.state.showHover)}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n preventDismissOnLostFocus={true}\n /** Keep the callout updated with details of focused/hovered arc */\n shouldUpdateWhenHidden={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)}\n >\n {this.props.onRenderCalloutPerDataPoint ? (\n this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps!)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value}\n color={this.state.color}\n culture={this.props.culture}\n />\n )}\n </Callout>\n {!hideLegend && <div className={this._classNames.legendContainer}>{legendBars}</div>}\n </div>\n ) : (\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 public get chartContainer(): HTMLElement | null {\n return this._rootElem;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._rootElem, this._legendsRef.current?.toSVG, getRTL(), opts);\n };\n\n private _closeCallout = () => {\n this.setState({\n showHover: false,\n });\n };\n\n private _elevateToMinimums(data: IChartDataPoint[]) {\n let sumOfData = 0;\n const minPercent = 0.01;\n const elevatedData: IChartDataPoint[] = [];\n data.forEach(item => {\n sumOfData += item.data!;\n });\n data.forEach(item => {\n elevatedData.push(\n minPercent * sumOfData > item.data! && item.data! > 0\n ? {\n ...item,\n data: minPercent * sumOfData,\n yAxisCalloutData:\n item.yAxisCalloutData === undefined ? item.data!.toLocaleString() : item.yAxisCalloutData,\n }\n : item,\n );\n });\n return elevatedData;\n }\n private _setViewBox(node: SVGElement | null): void {\n if (node === null) {\n return;\n }\n\n const widthVal = node.parentElement ? node.parentElement.clientWidth : this.state._width;\n\n const heightVal =\n node.parentElement && node.parentElement?.offsetHeight > this.state._height!\n ? node.parentElement?.offsetHeight\n : this.state._height;\n const viewbox = `0 0 ${widthVal!} ${heightVal!}`;\n node.setAttribute('viewBox', viewbox);\n }\n\n private _createLegends(chartData: IChartDataPoint[]): JSX.Element {\n const legendDataItems = chartData.map((point: IChartDataPoint, index: number) => {\n const color: string = this.props.enableGradient\n ? point.gradient?.[0] || getNextGradient(index, 0, this.props.theme?.isInverted)[0]\n : point.color!;\n\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n hoverAction: () => {\n this._handleChartMouseLeave();\n this.setState({ activeLegend: point.legend! });\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: undefined });\n },\n };\n return legend;\n });\n\n const legends = (\n <Legends\n legends={legendDataItems}\n centerLegends\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n // eslint-disable-next-line react/jsx-no-bind\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n return legends;\n }\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps && this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n private _focusCallback = (data: IChartDataPoint, id: string, element: SVGPathElement): void => {\n this._currentHoverElement = element;\n this.setState({\n /** Show the callout if highlighted arc is focused and Hide it if unhighlighted arc is focused */\n showHover: this._noLegendsHighlighted() || this._isLegendHighlighted(data.legend),\n value: data.data!.toString(),\n legend: data.legend,\n color: data.color!,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n focusedArcId: id,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n };\n\n private _hoverCallback = (data: IChartDataPoint, e: React.MouseEvent<SVGPathElement>): void => {\n if (this._calloutAnchorPoint !== data) {\n this._calloutAnchorPoint = data;\n this._currentHoverElement = e;\n let color: string = data.color!;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(this.props.data?.chartData?.findIndex(item => item.legend === data.legend) || 0, 0);\n color = data.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n this.setState({\n /** Show the callout if highlighted arc is hovered and Hide it if unhighlighted arc is hovered */\n showHover: this._noLegendsHighlighted() || this._isLegendHighlighted(data.legend),\n value: data.data!.toString(),\n legend: data.legend,\n color,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n }\n };\n private _onBlur = (): void => {\n this.setState({ focusedArcId: '' });\n };\n\n private _hoverLeave(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n this.setState({ showHover: false });\n };\n\n private _valueInsideDonut(valueInsideDonut: string | number | undefined, data: IChartDataPoint[]) {\n const highlightedLegends = this._getHighlightedLegend();\n if (valueInsideDonut !== undefined && (highlightedLegends.length === 1 || this.state.showHover)) {\n const pointValue = data.find(point => this._isLegendHighlighted(point.legend));\n return pointValue\n ? pointValue.yAxisCalloutData\n ? pointValue.yAxisCalloutData\n : pointValue.data!\n : valueInsideDonut;\n } else if (highlightedLegends.length > 0) {\n let totalValue = 0;\n data.forEach(point => {\n if (highlightedLegends.includes(point.legend!)) {\n totalValue += point.data!;\n }\n });\n return totalValue;\n } else {\n return valueInsideDonut;\n }\n }\n\n private _toLocaleString(data: string | number | undefined) {\n const localeString = formatToLocaleString(data, this.props.culture, this.props.useUTC);\n if (!localeString) {\n return data;\n }\n return localeString?.toString();\n }\n\n /**\n * This function returns\n * the selected legend if there is one\n * or the hovered legend if none of the legends is selected.\n */\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\n }\n\n private _isLegendHighlighted = (legend: string | undefined): boolean => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n private _noLegendsHighlighted = (): boolean => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.chartData &&\n this.props.data.chartData!.filter((d: IChartDataPoint) => d.data! > 0).length > 0\n );\n }\n\n private _addDefaultColors = (donutChartDataPoint?: IChartDataPoint[]): IChartDataPoint[] => {\n return donutChartDataPoint\n ? donutChartDataPoint.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- define(["require", "exports"], function (require, exports) {
1
+ define(["require", "exports", "../../utilities/index"], function (require, exports, index_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.getStyles = void 0;
@@ -29,6 +29,7 @@ define(["require", "exports"], function (require, exports) {
29
29
  paddingTop: '16px',
30
30
  width: "".concat(width, "px"),
31
31
  },
32
+ axisAnnotation: (0, index_1.getAxisTitleStyle)(theme, theme.fonts.small),
32
33
  };
33
34
  };
34
35
  exports.getStyles = getStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.styles.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.styles.ts"],"names":[],"mappings":";;;;IAEO,IAAM,SAAS,GAAG,UAAC,KAA4B;QAC5C,IAAA,SAAS,GAA2B,KAAK,UAAhC,EAAE,KAAK,GAAoB,KAAK,MAAzB,EAAE,MAAM,GAAY,KAAK,OAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAClD,OAAO;YACL,IAAI,EAAE;gBACJ,KAAK,CAAC,KAAK,CAAC,MAAM;gBAClB,eAAe;gBACf;oBACE,UAAU,EAAE,QAAQ;oBACpB,OAAO,EAAE,MAAM;oBACf,aAAa,EAAE,QAAQ;oBACvB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;iBACf;gBACD,SAAS;aACV;YACD,KAAK,EAAE;gBACL,KAAK,OAAA;gBACL,MAAM,QAAA;gBACN,SAAS,EAAE,aAAa;gBACxB,QAAQ,EAAE,SAAS;gBACnB,eAAe,EAAE,QAAQ;gBACzB,OAAO,EAAE,OAAO;aACjB;YACD,eAAe,EAAE;gBACf,UAAU,EAAE,MAAM;gBAClB,KAAK,EAAE,UAAG,KAAK,OAAI;aACpB;SACF,CAAC;IACJ,CAAC,CAAC;IA5BW,QAAA,SAAS,aA4BpB","sourcesContent":["import { IDonutChartStyleProps, IDonutChartStyles } from './DonutChart.types';\n\nexport const getStyles = (props: IDonutChartStyleProps): IDonutChartStyles => {\n const { className, width, height, theme } = props;\n return {\n root: [\n theme.fonts.medium,\n 'ms-DonutChart',\n {\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n },\n className,\n ],\n chart: {\n width,\n height,\n boxSizing: 'content-box',\n overflow: 'visible',\n alignmentAdjust: 'center',\n display: 'block',\n },\n legendContainer: {\n paddingTop: '16px',\n width: `${width}px`,\n },\n };\n};\n"]}
1
+ {"version":3,"file":"DonutChart.styles.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.styles.ts"],"names":[],"mappings":";;;;IAGO,IAAM,SAAS,GAAG,UAAC,KAA4B;QAC5C,IAAA,SAAS,GAA2B,KAAK,UAAhC,EAAE,KAAK,GAAoB,KAAK,MAAzB,EAAE,MAAM,GAAY,KAAK,OAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAClD,OAAO;YACL,IAAI,EAAE;gBACJ,KAAK,CAAC,KAAK,CAAC,MAAM;gBAClB,eAAe;gBACf;oBACE,UAAU,EAAE,QAAQ;oBACpB,OAAO,EAAE,MAAM;oBACf,aAAa,EAAE,QAAQ;oBACvB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;iBACf;gBACD,SAAS;aACV;YACD,KAAK,EAAE;gBACL,KAAK,OAAA;gBACL,MAAM,QAAA;gBACN,SAAS,EAAE,aAAa;gBACxB,QAAQ,EAAE,SAAS;gBACnB,eAAe,EAAE,QAAQ;gBACzB,OAAO,EAAE,OAAO;aACjB;YACD,eAAe,EAAE;gBACf,UAAU,EAAE,MAAM;gBAClB,KAAK,EAAE,UAAG,KAAK,OAAI;aACpB;YACD,cAAc,EAAE,IAAA,yBAAiB,EAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;SAC5D,CAAC;IACJ,CAAC,CAAC;IA7BW,QAAA,SAAS,aA6BpB","sourcesContent":["import { IDonutChartStyleProps, IDonutChartStyles } from './DonutChart.types';\nimport { getAxisTitleStyle } from '../../utilities/index';\n\nexport const getStyles = (props: IDonutChartStyleProps): IDonutChartStyles => {\n const { className, width, height, theme } = props;\n return {\n root: [\n theme.fonts.medium,\n 'ms-DonutChart',\n {\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n },\n className,\n ],\n chart: {\n width,\n height,\n boxSizing: 'content-box',\n overflow: 'visible',\n alignmentAdjust: 'center',\n display: 'block',\n },\n legendContainer: {\n paddingTop: '16px',\n width: `${width}px`,\n },\n axisAnnotation: getAxisTitleStyle(theme, theme.fonts.small),\n };\n};\n"]}
@@ -87,4 +87,8 @@ export interface IDonutChartStyles {
87
87
  * Style for the legend container.
88
88
  */
89
89
  legendContainer: IStyle;
90
+ /**
91
+ * styles for axis annotation
92
+ */
93
+ axisAnnotation?: IStyle;
90
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.types.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IStyle } from '@fluentui/react/lib/Styling';\nimport { IRefObject, IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { ICartesianChartProps, ICartesianChartStyleProps } from '../CommonComponents/index';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { IChartProps, IChartDataPoint, IChart } from './index';\n\nexport interface IDonutChart {}\n\n/**\n * Donut Chart properties.\n * {@docCategory DonutChart}\n */\nexport interface IDonutChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: IChartProps;\n\n /**\n * inner radius for donut size\n */\n innerRadius?: number;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IDonutChartStyleProps, IDonutChartStyles>;\n\n /**\n * props for inside donut value\n */\n valueInsideDonut?: string | number;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<IChartDataPoint>;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * Prop to show the arc labels in percentage format\n * @default false\n */\n showLabelsInPercent?: boolean;\n\n /**\n * Prop to hide the arc labels\n * @default true\n */\n hideLabels?: boolean;\n\n /**\n * Prop to enable the gradient in the chart\n * @default false\n */\n enableGradient?: boolean;\n\n /**\n * Prop to enable the round corners in the chart\n * @default false\n */\n roundCorners?: boolean;\n\n /**\n * Optional callback to access the IChart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: IRefObject<IChart>;\n}\n\n/**\n * Donut Chart style properties\n * {@docCategory DonutChart}\n */\nexport interface IDonutChartStyleProps extends ICartesianChartStyleProps {}\n\n/**\n * Donut Chart styles\n * {@docCategory DonutChart}\n */\nexport interface IDonutChartStyles {\n /**\n * Style for the root element.\n */\n root?: IStyle;\n\n /**\n * Style for the chart.\n */\n chart?: IStyle;\n /**\n * Style for the legend container.\n */\n legendContainer: IStyle;\n}\n"]}
1
+ {"version":3,"file":"DonutChart.types.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IStyle } from '@fluentui/react/lib/Styling';\nimport { IRefObject, IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { ICartesianChartProps, ICartesianChartStyleProps } from '../CommonComponents/index';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { IChartProps, IChartDataPoint, IChart } from './index';\n\nexport interface IDonutChart {}\n\n/**\n * Donut Chart properties.\n * {@docCategory DonutChart}\n */\nexport interface IDonutChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: IChartProps;\n\n /**\n * inner radius for donut size\n */\n innerRadius?: number;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IDonutChartStyleProps, IDonutChartStyles>;\n\n /**\n * props for inside donut value\n */\n valueInsideDonut?: string | number;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<IChartDataPoint>;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * Prop to show the arc labels in percentage format\n * @default false\n */\n showLabelsInPercent?: boolean;\n\n /**\n * Prop to hide the arc labels\n * @default true\n */\n hideLabels?: boolean;\n\n /**\n * Prop to enable the gradient in the chart\n * @default false\n */\n enableGradient?: boolean;\n\n /**\n * Prop to enable the round corners in the chart\n * @default false\n */\n roundCorners?: boolean;\n\n /**\n * Optional callback to access the IChart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: IRefObject<IChart>;\n}\n\n/**\n * Donut Chart style properties\n * {@docCategory DonutChart}\n */\nexport interface IDonutChartStyleProps extends ICartesianChartStyleProps {}\n\n/**\n * Donut Chart styles\n * {@docCategory DonutChart}\n */\nexport interface IDonutChartStyles {\n /**\n * Style for the root element.\n */\n root?: IStyle;\n\n /**\n * Style for the chart.\n */\n chart?: IStyle;\n /**\n * Style for the legend container.\n */\n legendContainer: IStyle;\n\n /**\n * styles for axis annotation\n */\n axisAnnotation?: IStyle;\n}\n"]}
@@ -188,7 +188,9 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
188
188
  barTotalValue_1 += pointData.data;
189
189
  });
190
190
  if (barTotalValue_1 !== null && !_this.props.hideLabels && _this._barWidth >= 16 && isLegendActive_1) {
191
- barLabelsForGroup.push(React.createElement("text", { key: "".concat(singleSet.indexNum, "-").concat(legendIndex), x: xPoint_1 + _this._barWidth / 2, y: barTotalValue_1 >= _this.Y_ORIGIN ? yPositiveStart_1 - 6 : yNegativeStart_1 + 12, textAnchor: "middle", className: _this._classNames.barLabel, "aria-hidden": true }, (0, index_1.formatScientificLimitWidth)(barTotalValue_1)));
191
+ barLabelsForGroup.push(React.createElement("text", { key: "".concat(singleSet.indexNum, "-").concat(legendIndex), x: xPoint_1 + _this._barWidth / 2, y: barTotalValue_1 >= _this.Y_ORIGIN ? yPositiveStart_1 - 6 : yNegativeStart_1 + 12, textAnchor: "middle", className: _this._classNames.barLabel, "aria-hidden": true }, typeof _this.props.yAxisTickFormat === 'function'
192
+ ? _this.props.yAxisTickFormat(barTotalValue_1)
193
+ : (0, index_1.formatScientificLimitWidth)(barTotalValue_1)));
192
194
  }
193
195
  }
194
196
  });
@@ -1 +1 @@
1
- {"version":3,"file":"GroupedVerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx"],"names":[],"mappings":";;;;IAwDA,IAAM,cAAc,GAAG,4BAA4B,CAAC;IACpD,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAsE,CAAC;IAI/G,IAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,IAAM,gBAAgB,GAAG,GAAG,CAAC;IAC7B,2EAA2E;IAC3E,kFAAkF;IAClF,oFAAoF;IACpF,IAAM,YAAY,GAAG,gBAAgB,GAAG,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC;IAC/D,IAAM,gBAAgB,GAAG,CAAC,CAAC;IAC3B,IAAM,cAAc,GAAG,CAAC,CAAC;IAkBzB;QACU,uDAA6E;QAoCrF,qCAAmB,KAAoC;;YACrD,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAdP,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAU3B,qBAAe,GAAqC,EAAE,CAAC;YAC9C,cAAQ,GAAW,CAAC,CAAC;YA0I/B,aAAO,GAAG,UAAC,IAA0B;;gBAC1C,OAAO,IAAA,4BAAO,EAAC,MAAA,KAAI,CAAC,kBAAkB,CAAC,OAAO,0CAAE,cAAc,EAAE,MAAA,KAAI,CAAC,WAAW,CAAC,OAAO,0CAAE,KAAK,EAAE,KAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACtH,CAAC,CAAC;YAEF,8DAA8D;YACtD,uBAAiB,GAAG,UAAC,cAAmB,EAAE,SAAqB,EAAE,kBAA4B;gBACnG,IAAM,MAAM,GAAa,EAAE,CAAC;gBAC5B,8DAA8D;gBAC9D,cAAc,CAAC,OAAO,CAAC,UAAC,IAAS;oBAC/B,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAC,KAA6B;wBACrD,IAAI,CAAC,kBAAkB,KAAK,CA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AAC;QAC1E,CAAC;QAjrBa,wCAAY,GAA2C;YACnE,WAAW,EAAE,EAAE;YACf,kBAAkB,EAAE,SAAS;SAC9B,AAHyB,CAGxB;QAwwBJ,kCAAC;KAAA,AA/wBD,CACU,KAAK,CAAC,SAAS,GA8wBxB;IA/wBY,kEAA2B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport {\n classNamesFunction,\n getId,\n getRTL,\n initializeComponentRef,\n memoizeFunction,\n warnDeprecations,\n} from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n getNextGradient,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n YAxisType,\n sortAxisCategories,\n} from '../../utilities/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ILegend,\n IGroupedVerticalBarChartData,\n IGroupedVerticalBarChartProps,\n IGroupedVerticalBarChartStyleProps,\n IGroupedVerticalBarChartStyles,\n IGVBarChartSeriesPoint,\n IMargins,\n IBasestate,\n Legends,\n} from '../../index';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { ILegendContainer } from '../Legends/index';\nimport { rgb } from 'd3-color';\n\nconst COMPONENT_NAME = 'GROUPED VERTICAL BAR CHART';\nconst getClassNames = classNamesFunction<IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles>();\ntype StringAxis = D3Axis<string>;\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\n// x1_inner_padding = space_between_bars / (space_between_bars + bar_width)\n// => space_between_bars = (x1_inner_padding / (1 - x1_inner_padding)) * bar_width\n/** Rate at which the space between the bars in a group changes wrt the bar width */\nconst BAR_GAP_RATE = X1_INNER_PADDING / (1 - X1_INNER_PADDING);\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface IGVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface IGVSingleDataPoint {\n [key: string]: IGVDataPoint;\n}\nexport interface IGroupedVerticalBarChartState extends IBasestate {\n dataPointCalloutProps?: IGVBarChartSeriesPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n selectedLegends: string[];\n}\n\nexport class GroupedVerticalBarChartBase\n extends React.Component<IGroupedVerticalBarChartProps, IGroupedVerticalBarChartState>\n implements IChart\n{\n public static defaultProps: Partial<IGroupedVerticalBarChartProps> = {\n maxBarWidth: 24,\n xAxisCategoryOrder: 'default',\n };\n\n private _createSet: (\n data: IGroupedVerticalBarChartData[],\n ) => // eslint-disable-next-line @typescript-eslint/no-explicit-any\n { legends: string[]; xAxisLabels: string[]; datasetForBars: any };\n private _legends: string[];\n private _xAxisLabels: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _datasetForBars: any;\n private margins: IMargins;\n private _groupedVerticalBarGraph: JSX.Element[];\n private _classNames: IProcessedStyleSet<IGroupedVerticalBarChartStyles>;\n private _yMax: number;\n private _calloutId: string;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _isRtl: boolean = getRTL();\n private _calloutAnchorPoint: IGVBarChartSeriesPoint | null;\n private _barWidth: number;\n private _domainMargin: number;\n private _emptyChartId: string;\n private _groupWidth: number;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n private _legendColorMap: Record<string, [string, string]> = {};\n private readonly Y_ORIGIN: number = 0;\n\n public constructor(props: IGroupedVerticalBarChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._createSet = memoizeFunction((data: IGroupedVerticalBarChartData[]) => this._createDataSetOfGVBC(data));\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n refSelected: null,\n selectedLegends: props.legendProps?.selectedLegends || [],\n xCalloutValue: '',\n yCalloutValue: '',\n YValueHover: [],\n hoverXValue: '',\n calloutLegend: '',\n activeLegend: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n showXAxisPath: 'Dont use this property. Axis line removed default.',\n showYAxisPath: 'Dont use this property. No need to display Y axis path. Handling default',\n showXAxisGridLines: 'Dont use this property. Handling with default value.',\n legendColor: 'Dont use this property. colour will pick from given data.',\n });\n this._calloutId = getId('callout');\n this._tooltipId = getId('GVBCTooltipId_');\n this._emptyChartId = getId('_GVBC_empty');\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IGroupedVerticalBarChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n const points = this._addDefaultColors(this.props.data);\n this._xAxisType = getTypeOfAxis(points[0].name, true) as XAxisTypes;\n const { legends, xAxisLabels, datasetForBars } = this._createSet(points);\n this._legends = legends;\n this._xAxisLabels = xAxisLabels;\n this._datasetForBars = datasetForBars;\n const legendBars: JSX.Element = this._getLegendData();\n this._adjustProps();\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = this._getMinMaxOfYAxis(this._datasetForBars).endValue;\n this._yMax = Math.max(yMax, this.props.yMaxValue || 0);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n href: this.props.href!,\n });\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n gapSpace: 15,\n isBeakVisible: false,\n setInitialFocus: true,\n color: this.state.color,\n Legend: this.state.calloutLegend,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n onDismiss: this._closeCallout,\n ...this.props.calloutProps,\n preventDismissOnLostFocus: true,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: this.props.tickValues!,\n tickFormat: this.props.tickFormat!,\n };\n\n return !this._isChartEmpty() ? (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={this._datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n calloutProps={calloutProps}\n legendBars={legendBars}\n xAxisType={this._xAxisType}\n createYAxis={createNumericYAxis}\n datasetForXAxisDomain={this._xAxisLabels}\n tickParams={tickParams}\n getDomainNRangeValues={this._getDomainNRangeValues}\n getMinMaxOfYAxis={this._getMinMaxOfYAxis}\n createStringYAxis={createStringYAxis}\n tickPadding={this.props.tickPadding || 5}\n maxOfYVal={this._yMax}\n svgFocusZoneProps={{\n direction: FocusZoneDirection.horizontal,\n }}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\n barwidth={this._barWidth}\n ref={this._cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={() => {\n return <g>{this._groupedVerticalBarGraph}</g>;\n }}\n />\n ) : (\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 public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, this._isRtl, opts);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getMinMaxOfYAxis = (datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) => {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: IGVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n };\n\n private _getDomainNRangeValues = (\n points: IGroupedVerticalBarChartData[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n };\n\n private _getGraphData = (\n xScale: StringAxis | NumericAxis,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = this._createX0Scale(containerWidth);\n\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n this._barWidth = getBarWidth(\n this.props.barwidth,\n this.props.maxBarWidth,\n xScale0.bandwidth() / (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE),\n );\n this._groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * this._barWidth;\n\n const xScale1 = this._createX1Scale();\n const allGroupsBars: JSX.Element[] = [];\n this._datasetForBars.forEach((singleSet: IGVSingleDataPoint) => {\n allGroupsBars.push(\n this._buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n this._groupedVerticalBarGraph = allGroupsBars;\n };\n\n private _getMargins = (margins: IMargins) => (this.margins = margins);\n\n private _createDataSetOfGVBC = (points: IGroupedVerticalBarChartData[]) => {\n const legends = new Set<string>();\n const xAxisLabels: string[] = this._getOrderedXAxisLabels(points);\n points.forEach((point: IGroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n legends.add(seriesPoint.legend);\n });\n });\n const datasetForBars = this._createDataset(points);\n return {\n legends: Array.from(legends),\n xAxisLabels,\n datasetForBars,\n };\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _onBarHover = (\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (this._calloutAnchorPoint !== pointData) {\n this._calloutAnchorPoint = pointData;\n this.setState({\n refSelected: mouseEvent,\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries,\n hoverXValue: pointData.xAxisCalloutData,\n });\n }\n };\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({ isCalloutVisible: false });\n };\n\n private _onBarFocus = (\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n focusEvent: React.FocusEvent<SVGElement>,\n ): void => {\n this.setState({\n refSelected: focusEvent.currentTarget,\n /** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries,\n hoverXValue: pointData.xAxisCalloutData,\n });\n };\n\n private _redirectToUrl = (href: string | undefined): void => {\n href ? (window.location.href = href) : '';\n };\n\n private _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element => {\n const singleGroup: JSX.Element[] = [];\n const barLabelsForGroup: JSX.Element[] = [];\n\n this._legends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n // To align the centers of the generated bandwidth and the calculated one when they differ,\n // use the following addend.\n const xPoint = xScale1(legendTitle) + (xScale1.bandwidth() - this._barWidth) / 2;\n const isLegendActive = this._legendHighlighted(legendTitle) || this._noLegendHighlighted();\n const barOpacity = isLegendActive ? '' : '0.1';\n\n let barTotalValue = 0;\n const yBaseline = yBarScale(this.Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = this.Y_ORIGIN;\n\n barPoints.forEach((pointData: IGVBarChartSeriesPoint, pointIndex: number) => {\n if (!pointData.data) {\n // Not rendering data with 0.\n return;\n }\n const gradientId = getId('GVBC_Gradient') + `_${singleSet.indexNum}_${legendIndex}_${pointIndex}`;\n if (this.props.enableGradient) {\n const startColor = pointData.gradient?.[0] || pointData.color;\n const endColor = pointData.gradient?.[1] || pointData.color;\n\n singleGroup.push(\n <defs key={`defs_${gradientId}`}>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>,\n );\n }\n\n const barGap = (VERTICAL_BAR_GAP / 2) * (pointIndex > 0 ? 2 : 0);\n const height = Math.max(yBarScale(this.Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n const pointColor = pointData.color; // Use the color of the current point\n\n if (pointData.data >= this.Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n\n singleGroup.push(\n <rect\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}`}\n className={this._classNames.opacityChangeOnHover}\n height={height}\n width={this._barWidth}\n x={xPoint}\n y={yPoint}\n data-is-focusable={!this.props.hideTooltip && isLegendActive}\n opacity={barOpacity}\n fill={this.props.enableGradient ? `url(#${gradientId})` : pointColor}\n rx={this.props.roundCorners ? 3 : 0}\n onMouseOver={this._onBarHover.bind(this, pointData, singleSet)}\n onMouseMove={this._onBarHover.bind(this, pointData, singleSet)}\n onMouseOut={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, pointData, singleSet)}\n onBlur={this._onBarLeave}\n onClick={this.props.href ? this._redirectToUrl.bind(this, this.props.href!) : pointData.onClick}\n aria-label={this._getAriaLabel(pointData, singleSet.xAxisPoint)}\n role=\"img\"\n />,\n );\n\n barTotalValue += pointData.data;\n });\n if (barTotalValue !== null && !this.props.hideLabels && this._barWidth >= 16 && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}`}\n x={xPoint + this._barWidth / 2}\n y={barTotalValue >= this.Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatScientificLimitWidth(barTotalValue)}\n </text>,\n );\n }\n }\n });\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - this._groupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n private _createDataset = (points: IGroupedVerticalBarChartData[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n points.forEach((point: IGroupedVerticalBarChartData, index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const legendToBarPoint: Record<string, IGVBarChartSeriesPoint> = {};\n\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n if (!singleDatasetPointForBars[seriesPoint.legend]) {\n singleDatasetPointForBars[seriesPoint.legend] = [{ ...seriesPoint }];\n legendToBarPoint[seriesPoint.legend] = { ...seriesPoint };\n } else {\n singleDatasetPointForBars[seriesPoint.legend].push({ ...seriesPoint });\n legendToBarPoint[seriesPoint.legend].data += seriesPoint.data;\n }\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = Object.values(legendToBarPoint);\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n });\n return datasetForBars;\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n private _createX0Scale = (containerWidth: number) => {\n const x0Axis = d3ScaleBand()\n .domain(this._xAxisLabels)\n .range(\n this._isRtl\n ? [containerWidth! - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth! - this.margins.right! - this._domainMargin],\n )\n .paddingInner(this._xAxisInnerPadding)\n .paddingOuter(this._xAxisOuterPadding);\n return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(this._legends)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(this._isRtl ? [this._groupWidth, 0] : [0, this._groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (): JSX.Element => {\n const actions: ILegend[] = [];\n\n this._legends.forEach((legendTitle: string) => {\n const legend: ILegend = {\n title: legendTitle,\n color: this._legendColorMap[legendTitle][0],\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || 0);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return this._getHighlightedLegend().includes(legendTitle!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\n }\n\n private _getAriaLabel = (point: IGVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth =\n containerWidth - (this.margins.left! + MIN_DOMAIN_MARGIN) - (this.margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the groups changes wrt the group width */\n const groupGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first group and after the last group.\n this._domainMargin = 0;\n } else if (this.props.barwidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n this._barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth);\n const groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * this._barWidth;\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (this.props.mode === 'plotly' && this._xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering groups at their maximum allowable width\n const groupBandwidth = totalWidth / (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate);\n const barBandwidth = groupBandwidth / (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE);\n const barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth, barBandwidth);\n const groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * barWidth;\n let reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!this.props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(this._xAxisLabels) + 20;\n reqWidth = (this._xAxisLabels.length - this._xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n this._domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n }\n\n return {\n ...this.margins,\n left: this.margins.left! + this._domainMargin,\n right: this.margins.right! + this._domainMargin,\n };\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.length > 0 &&\n this.props.data.filter((item: IGroupedVerticalBarChartData) => item.series.length).length > 0\n );\n }\n\n private _adjustProps(): void {\n this._barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = this._legends.length * bar_width + (this._legends.length - 1) * space_between_bars\n this._xAxisInnerPadding = getScalePadding(\n this.props.xAxisInnerPadding,\n undefined,\n 2 / (2 + this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE),\n );\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding);\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${this._xAxisLabels.length} groups of ${this._legends.length} bars each. `\n );\n };\n\n // Lighten/Darken a color by a given percentage using d3-scale\n private _adjustColor = (color: string, percentage: number, lightenColor: boolean, isDarkTheme: boolean): string => {\n const targetColor = lightenColor ? (isDarkTheme ? '#000000' : '#ffffff') : isDarkTheme ? '#ffffff' : '#000000';\n const colorInterpolator = d3ScaleLinear<string>().domain([0, 1]).range([color, targetColor]);\n return rgb(colorInterpolator(percentage)).formatRgb();\n };\n\n private _addDefaultColors = (data?: IGroupedVerticalBarChartData[]): IGroupedVerticalBarChartData[] => {\n this._legendColorMap = {};\n let colorIndex = 0;\n\n return (\n data?.map(point => {\n return {\n ...point,\n series:\n point.series?.map(seriesPoint => {\n let startColor = seriesPoint.color\n ? seriesPoint.color\n : getNextColor(colorIndex, 0, this.props.theme?.isInverted);\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n if (seriesPoint.color) {\n // Generate gradient colors based on seriesPoint.color\n startColor = this._adjustColor(\n seriesPoint.color || endColor,\n 0.2,\n false,\n this.props.theme?.isInverted!,\n );\n endColor = this._adjustColor(\n seriesPoint.color || startColor,\n 0.2,\n true,\n this.props.theme?.isInverted!,\n );\n } else {\n const nextGradient = getNextGradient(colorIndex, 0, this.props.theme?.isInverted);\n startColor = seriesPoint.gradient?.[0] || nextGradient[0];\n endColor = seriesPoint.gradient?.[1] || nextGradient[1];\n }\n }\n const pointGradient: [string, string] = [startColor, endColor];\n if (!this._legendColorMap[seriesPoint.legend]) {\n this._legendColorMap[seriesPoint.legend] = [startColor, endColor];\n }\n colorIndex += 1;\n\n return {\n ...seriesPoint,\n color: seriesPoint.color ?? this._legendColorMap[seriesPoint.legend][0],\n ...(this.props.enableGradient ? { gradient: pointGradient } : {}),\n };\n }) ?? [],\n };\n }) ?? []\n );\n };\n\n private _getOrderedXAxisLabels = (points: IGroupedVerticalBarChartData[]) => {\n if (this._xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(this._mapCategoryToValues(points), this.props.xAxisCategoryOrder);\n };\n\n private _mapCategoryToValues = (points: IGroupedVerticalBarChartData[]) => {\n const categoryToValues: Record<string, number[]> = {};\n points.forEach(point => {\n if (!categoryToValues[point.name]) {\n categoryToValues[point.name] = [];\n }\n point.series.forEach(seriesPoint => {\n categoryToValues[point.name].push(seriesPoint.data);\n });\n });\n return categoryToValues;\n };\n}\n"]}
1
+ {"version":3,"file":"GroupedVerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx"],"names":[],"mappings":";;;;IAwDA,IAAM,cAAc,GAAG,4BAA4B,CAAC;IACpD,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAsE,CAAC;IAI/G,IAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,IAAM,gBAAgB,GAAG,GAAG,CAAC;IAC7B,2EAA2E;IAC3E,kFAAkF;IAClF,oFAAoF;IACpF,IAAM,YAAY,GAAG,gBAAgB,GAAG,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC;IAC/D,IAAM,gBAAgB,GAAG,CAAC,CAAC;IAC3B,IAAM,cAAc,GAAG,CAAC,CAAC;IAkBzB;QACU,uDAA6E;QAoCrF,qCAAmB,KAAoC;;YACrD,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAdP,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAU3B,qBAAe,GAAqC,EAAE,CAAC;YAC9C,cAAQ,GAAW,CAAC,CAAC;YA0I/B,aAAO,GAAG,UAAC,IAA0B;;gBAC1C,OAAO,IAAA,4BAAO,EAAC,MAAA,KAAI,CAAC,kBAAkB,CAAC,OAAO,0CAAE,cAAc,EAAE,MAAA,KAAI,CAAC,WAAW,CAAC,OAAO,0CAAE,KAAK,EAAE,KAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACtH,CAAC,CAAC;YAEF,8DAA8D;YACtD,uBAAiB,GAAG,UAAC,cAAmB,EAAE,SAAqB,EAAE,kBAA4B;gBACnG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kB,GAAG,IAAA,uBAAe,EACvC,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAC5B,SAAS,EACT,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC,CAC3E,CAAC;YACF,IAAI,CAAC,kBAAkB,GAAG,IAAA,uBAAe,EAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC1E,CAAC;QAnrBa,wCAAY,GAA2C;YACnE,WAAW,EAAE,EAAE;YACf,kBAAkB,EAAE,SAAS;SAC9B,AAHyB,CAGxB;QA0wBJ,kCAAC;KAAA,AAjxBD,CACU,KAAK,CAAC,SAAS,GAgxBxB;IAjxBY,kEAA2B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport {\n classNamesFunction,\n getId,\n getRTL,\n initializeComponentRef,\n memoizeFunction,\n warnDeprecations,\n} from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n getNextGradient,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n YAxisType,\n sortAxisCategories,\n} from '../../utilities/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ILegend,\n IGroupedVerticalBarChartData,\n IGroupedVerticalBarChartProps,\n IGroupedVerticalBarChartStyleProps,\n IGroupedVerticalBarChartStyles,\n IGVBarChartSeriesPoint,\n IMargins,\n IBasestate,\n Legends,\n} from '../../index';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { ILegendContainer } from '../Legends/index';\nimport { rgb } from 'd3-color';\n\nconst COMPONENT_NAME = 'GROUPED VERTICAL BAR CHART';\nconst getClassNames = classNamesFunction<IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles>();\ntype StringAxis = D3Axis<string>;\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\n// x1_inner_padding = space_between_bars / (space_between_bars + bar_width)\n// => space_between_bars = (x1_inner_padding / (1 - x1_inner_padding)) * bar_width\n/** Rate at which the space between the bars in a group changes wrt the bar width */\nconst BAR_GAP_RATE = X1_INNER_PADDING / (1 - X1_INNER_PADDING);\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface IGVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface IGVSingleDataPoint {\n [key: string]: IGVDataPoint;\n}\nexport interface IGroupedVerticalBarChartState extends IBasestate {\n dataPointCalloutProps?: IGVBarChartSeriesPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n selectedLegends: string[];\n}\n\nexport class GroupedVerticalBarChartBase\n extends React.Component<IGroupedVerticalBarChartProps, IGroupedVerticalBarChartState>\n implements IChart\n{\n public static defaultProps: Partial<IGroupedVerticalBarChartProps> = {\n maxBarWidth: 24,\n xAxisCategoryOrder: 'default',\n };\n\n private _createSet: (\n data: IGroupedVerticalBarChartData[],\n ) => // eslint-disable-next-line @typescript-eslint/no-explicit-any\n { legends: string[]; xAxisLabels: string[]; datasetForBars: any };\n private _legends: string[];\n private _xAxisLabels: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _datasetForBars: any;\n private margins: IMargins;\n private _groupedVerticalBarGraph: JSX.Element[];\n private _classNames: IProcessedStyleSet<IGroupedVerticalBarChartStyles>;\n private _yMax: number;\n private _calloutId: string;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _isRtl: boolean = getRTL();\n private _calloutAnchorPoint: IGVBarChartSeriesPoint | null;\n private _barWidth: number;\n private _domainMargin: number;\n private _emptyChartId: string;\n private _groupWidth: number;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n private _legendColorMap: Record<string, [string, string]> = {};\n private readonly Y_ORIGIN: number = 0;\n\n public constructor(props: IGroupedVerticalBarChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._createSet = memoizeFunction((data: IGroupedVerticalBarChartData[]) => this._createDataSetOfGVBC(data));\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n refSelected: null,\n selectedLegends: props.legendProps?.selectedLegends || [],\n xCalloutValue: '',\n yCalloutValue: '',\n YValueHover: [],\n hoverXValue: '',\n calloutLegend: '',\n activeLegend: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n showXAxisPath: 'Dont use this property. Axis line removed default.',\n showYAxisPath: 'Dont use this property. No need to display Y axis path. Handling default',\n showXAxisGridLines: 'Dont use this property. Handling with default value.',\n legendColor: 'Dont use this property. colour will pick from given data.',\n });\n this._calloutId = getId('callout');\n this._tooltipId = getId('GVBCTooltipId_');\n this._emptyChartId = getId('_GVBC_empty');\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IGroupedVerticalBarChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n const points = this._addDefaultColors(this.props.data);\n this._xAxisType = getTypeOfAxis(points[0].name, true) as XAxisTypes;\n const { legends, xAxisLabels, datasetForBars } = this._createSet(points);\n this._legends = legends;\n this._xAxisLabels = xAxisLabels;\n this._datasetForBars = datasetForBars;\n const legendBars: JSX.Element = this._getLegendData();\n this._adjustProps();\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = this._getMinMaxOfYAxis(this._datasetForBars).endValue;\n this._yMax = Math.max(yMax, this.props.yMaxValue || 0);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n href: this.props.href!,\n });\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n gapSpace: 15,\n isBeakVisible: false,\n setInitialFocus: true,\n color: this.state.color,\n Legend: this.state.calloutLegend,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n onDismiss: this._closeCallout,\n ...this.props.calloutProps,\n preventDismissOnLostFocus: true,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: this.props.tickValues!,\n tickFormat: this.props.tickFormat!,\n };\n\n return !this._isChartEmpty() ? (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={this._datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n calloutProps={calloutProps}\n legendBars={legendBars}\n xAxisType={this._xAxisType}\n createYAxis={createNumericYAxis}\n datasetForXAxisDomain={this._xAxisLabels}\n tickParams={tickParams}\n getDomainNRangeValues={this._getDomainNRangeValues}\n getMinMaxOfYAxis={this._getMinMaxOfYAxis}\n createStringYAxis={createStringYAxis}\n tickPadding={this.props.tickPadding || 5}\n maxOfYVal={this._yMax}\n svgFocusZoneProps={{\n direction: FocusZoneDirection.horizontal,\n }}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\n barwidth={this._barWidth}\n ref={this._cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={() => {\n return <g>{this._groupedVerticalBarGraph}</g>;\n }}\n />\n ) : (\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 public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, this._isRtl, opts);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getMinMaxOfYAxis = (datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) => {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: IGVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n };\n\n private _getDomainNRangeValues = (\n points: IGroupedVerticalBarChartData[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n };\n\n private _getGraphData = (\n xScale: StringAxis | NumericAxis,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = this._createX0Scale(containerWidth);\n\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n this._barWidth = getBarWidth(\n this.props.barwidth,\n this.props.maxBarWidth,\n xScale0.bandwidth() / (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE),\n );\n this._groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * this._barWidth;\n\n const xScale1 = this._createX1Scale();\n const allGroupsBars: JSX.Element[] = [];\n this._datasetForBars.forEach((singleSet: IGVSingleDataPoint) => {\n allGroupsBars.push(\n this._buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n this._groupedVerticalBarGraph = allGroupsBars;\n };\n\n private _getMargins = (margins: IMargins) => (this.margins = margins);\n\n private _createDataSetOfGVBC = (points: IGroupedVerticalBarChartData[]) => {\n const legends = new Set<string>();\n const xAxisLabels: string[] = this._getOrderedXAxisLabels(points);\n points.forEach((point: IGroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n legends.add(seriesPoint.legend);\n });\n });\n const datasetForBars = this._createDataset(points);\n return {\n legends: Array.from(legends),\n xAxisLabels,\n datasetForBars,\n };\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _onBarHover = (\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (this._calloutAnchorPoint !== pointData) {\n this._calloutAnchorPoint = pointData;\n this.setState({\n refSelected: mouseEvent,\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries,\n hoverXValue: pointData.xAxisCalloutData,\n });\n }\n };\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({ isCalloutVisible: false });\n };\n\n private _onBarFocus = (\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n focusEvent: React.FocusEvent<SVGElement>,\n ): void => {\n this.setState({\n refSelected: focusEvent.currentTarget,\n /** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries,\n hoverXValue: pointData.xAxisCalloutData,\n });\n };\n\n private _redirectToUrl = (href: string | undefined): void => {\n href ? (window.location.href = href) : '';\n };\n\n private _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element => {\n const singleGroup: JSX.Element[] = [];\n const barLabelsForGroup: JSX.Element[] = [];\n\n this._legends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n // To align the centers of the generated bandwidth and the calculated one when they differ,\n // use the following addend.\n const xPoint = xScale1(legendTitle) + (xScale1.bandwidth() - this._barWidth) / 2;\n const isLegendActive = this._legendHighlighted(legendTitle) || this._noLegendHighlighted();\n const barOpacity = isLegendActive ? '' : '0.1';\n\n let barTotalValue = 0;\n const yBaseline = yBarScale(this.Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = this.Y_ORIGIN;\n\n barPoints.forEach((pointData: IGVBarChartSeriesPoint, pointIndex: number) => {\n if (!pointData.data) {\n // Not rendering data with 0.\n return;\n }\n const gradientId = getId('GVBC_Gradient') + `_${singleSet.indexNum}_${legendIndex}_${pointIndex}`;\n if (this.props.enableGradient) {\n const startColor = pointData.gradient?.[0] || pointData.color;\n const endColor = pointData.gradient?.[1] || pointData.color;\n\n singleGroup.push(\n <defs key={`defs_${gradientId}`}>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>,\n );\n }\n\n const barGap = (VERTICAL_BAR_GAP / 2) * (pointIndex > 0 ? 2 : 0);\n const height = Math.max(yBarScale(this.Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n const pointColor = pointData.color; // Use the color of the current point\n\n if (pointData.data >= this.Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n\n singleGroup.push(\n <rect\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}`}\n className={this._classNames.opacityChangeOnHover}\n height={height}\n width={this._barWidth}\n x={xPoint}\n y={yPoint}\n data-is-focusable={!this.props.hideTooltip && isLegendActive}\n opacity={barOpacity}\n fill={this.props.enableGradient ? `url(#${gradientId})` : pointColor}\n rx={this.props.roundCorners ? 3 : 0}\n onMouseOver={this._onBarHover.bind(this, pointData, singleSet)}\n onMouseMove={this._onBarHover.bind(this, pointData, singleSet)}\n onMouseOut={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, pointData, singleSet)}\n onBlur={this._onBarLeave}\n onClick={this.props.href ? this._redirectToUrl.bind(this, this.props.href!) : pointData.onClick}\n aria-label={this._getAriaLabel(pointData, singleSet.xAxisPoint)}\n role=\"img\"\n />,\n );\n\n barTotalValue += pointData.data;\n });\n if (barTotalValue !== null && !this.props.hideLabels && this._barWidth >= 16 && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}`}\n x={xPoint + this._barWidth / 2}\n y={barTotalValue >= this.Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {typeof this.props.yAxisTickFormat === 'function'\n ? this.props.yAxisTickFormat(barTotalValue)\n : formatScientificLimitWidth(barTotalValue)}\n </text>,\n );\n }\n }\n });\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - this._groupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n private _createDataset = (points: IGroupedVerticalBarChartData[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n points.forEach((point: IGroupedVerticalBarChartData, index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const legendToBarPoint: Record<string, IGVBarChartSeriesPoint> = {};\n\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n if (!singleDatasetPointForBars[seriesPoint.legend]) {\n singleDatasetPointForBars[seriesPoint.legend] = [{ ...seriesPoint }];\n legendToBarPoint[seriesPoint.legend] = { ...seriesPoint };\n } else {\n singleDatasetPointForBars[seriesPoint.legend].push({ ...seriesPoint });\n legendToBarPoint[seriesPoint.legend].data += seriesPoint.data;\n }\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = Object.values(legendToBarPoint);\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n });\n return datasetForBars;\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n private _createX0Scale = (containerWidth: number) => {\n const x0Axis = d3ScaleBand()\n .domain(this._xAxisLabels)\n .range(\n this._isRtl\n ? [containerWidth! - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth! - this.margins.right! - this._domainMargin],\n )\n .paddingInner(this._xAxisInnerPadding)\n .paddingOuter(this._xAxisOuterPadding);\n return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(this._legends)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(this._isRtl ? [this._groupWidth, 0] : [0, this._groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (): JSX.Element => {\n const actions: ILegend[] = [];\n\n this._legends.forEach((legendTitle: string) => {\n const legend: ILegend = {\n title: legendTitle,\n color: this._legendColorMap[legendTitle][0],\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || 0);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return this._getHighlightedLegend().includes(legendTitle!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\n }\n\n private _getAriaLabel = (point: IGVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth =\n containerWidth - (this.margins.left! + MIN_DOMAIN_MARGIN) - (this.margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the groups changes wrt the group width */\n const groupGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first group and after the last group.\n this._domainMargin = 0;\n } else if (this.props.barwidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n this._barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth);\n const groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * this._barWidth;\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (this.props.mode === 'plotly' && this._xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering groups at their maximum allowable width\n const groupBandwidth = totalWidth / (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate);\n const barBandwidth = groupBandwidth / (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE);\n const barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth, barBandwidth);\n const groupWidth = (this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE) * barWidth;\n let reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!this.props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(this._xAxisLabels) + 20;\n reqWidth = (this._xAxisLabels.length - this._xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n this._domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n }\n\n return {\n ...this.margins,\n left: this.margins.left! + this._domainMargin,\n right: this.margins.right! + this._domainMargin,\n };\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.length > 0 &&\n this.props.data.filter((item: IGroupedVerticalBarChartData) => item.series.length).length > 0\n );\n }\n\n private _adjustProps(): void {\n this._barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = this._legends.length * bar_width + (this._legends.length - 1) * space_between_bars\n this._xAxisInnerPadding = getScalePadding(\n this.props.xAxisInnerPadding,\n undefined,\n 2 / (2 + this._legends.length + (this._legends.length - 1) * BAR_GAP_RATE),\n );\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding);\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${this._xAxisLabels.length} groups of ${this._legends.length} bars each. `\n );\n };\n\n // Lighten/Darken a color by a given percentage using d3-scale\n private _adjustColor = (color: string, percentage: number, lightenColor: boolean, isDarkTheme: boolean): string => {\n const targetColor = lightenColor ? (isDarkTheme ? '#000000' : '#ffffff') : isDarkTheme ? '#ffffff' : '#000000';\n const colorInterpolator = d3ScaleLinear<string>().domain([0, 1]).range([color, targetColor]);\n return rgb(colorInterpolator(percentage)).formatRgb();\n };\n\n private _addDefaultColors = (data?: IGroupedVerticalBarChartData[]): IGroupedVerticalBarChartData[] => {\n this._legendColorMap = {};\n let colorIndex = 0;\n\n return (\n data?.map(point => {\n return {\n ...point,\n series:\n point.series?.map(seriesPoint => {\n let startColor = seriesPoint.color\n ? seriesPoint.color\n : getNextColor(colorIndex, 0, this.props.theme?.isInverted);\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n if (seriesPoint.color) {\n // Generate gradient colors based on seriesPoint.color\n startColor = this._adjustColor(\n seriesPoint.color || endColor,\n 0.2,\n false,\n this.props.theme?.isInverted!,\n );\n endColor = this._adjustColor(\n seriesPoint.color || startColor,\n 0.2,\n true,\n this.props.theme?.isInverted!,\n );\n } else {\n const nextGradient = getNextGradient(colorIndex, 0, this.props.theme?.isInverted);\n startColor = seriesPoint.gradient?.[0] || nextGradient[0];\n endColor = seriesPoint.gradient?.[1] || nextGradient[1];\n }\n }\n const pointGradient: [string, string] = [startColor, endColor];\n if (!this._legendColorMap[seriesPoint.legend]) {\n this._legendColorMap[seriesPoint.legend] = [startColor, endColor];\n }\n colorIndex += 1;\n\n return {\n ...seriesPoint,\n color: seriesPoint.color ?? this._legendColorMap[seriesPoint.legend][0],\n ...(this.props.enableGradient ? { gradient: pointGradient } : {}),\n };\n }) ?? [],\n };\n }) ?? []\n );\n };\n\n private _getOrderedXAxisLabels = (points: IGroupedVerticalBarChartData[]) => {\n if (this._xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(this._mapCategoryToValues(points), this.props.xAxisCategoryOrder);\n };\n\n private _mapCategoryToValues = (points: IGroupedVerticalBarChartData[]) => {\n const categoryToValues: Record<string, number[]> = {};\n points.forEach(point => {\n if (!categoryToValues[point.name]) {\n categoryToValues[point.name] = [];\n }\n point.series.forEach(seriesPoint => {\n categoryToValues[point.name].push(seriesPoint.data);\n });\n });\n return categoryToValues;\n };\n}\n"]}
@@ -1,25 +1,15 @@
1
- define(["require", "exports", "tslib", "@fluentui/react/lib/Styling"], function (require, exports, tslib_1, Styling_1) {
1
+ define(["require", "exports", "../../utilities/index"], function (require, exports, index_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.getStyles = void 0;
5
5
  var getStyles = function (props) {
6
- var _a;
7
6
  var theme = props.theme, href = props.href;
8
7
  return {
9
8
  opacityChangeOnHover: {
10
9
  cursor: href ? 'pointer' : 'default',
11
10
  },
12
- tooltip: tslib_1.__assign(tslib_1.__assign({}, theme.fonts.medium), { display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', top: '0px', background: theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none', color: theme.semanticColors.bodyText }),
13
- barLabel: {
14
- fontSize: Styling_1.FontSizes.small,
15
- fontWeight: Styling_1.FontWeights.semibold,
16
- fill: theme.palette.neutralPrimary,
17
- selectors: (_a = {},
18
- _a[Styling_1.HighContrastSelector] = {
19
- fill: 'CanvasText',
20
- },
21
- _a),
22
- },
11
+ tooltip: (0, index_1.getTooltipStyle)(theme),
12
+ barLabel: (0, index_1.getBarLabelStyle)(theme),
23
13
  };
24
14
  };
25
15
  exports.getStyles = getStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"GroupedVerticalBarChart.styles.js","sourceRoot":"../src/","sources":["components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.ts"],"names":[],"mappings":";;;;IAGO,IAAM,SAAS,GAAG,UAAC,KAAyC;;QACzD,IAAA,KAAK,GAAW,KAAK,MAAhB,EAAE,IAAI,GAAK,KAAK,KAAV,CAAW;QAC9B,OAAO;YACL,oBAAoB,EAAE;gBACpB,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;aACrC;YAED,OAAO,wCACF,KAAK,CAAC,KAAK,CAAC,MAAM,KACrB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,QAAQ,EACnB,GAAG,EAAE,KAAK,EACV,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,EAC/C,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,GACrC;YAED,QAAQ,EAAE;gBACR,QAAQ,EAAE,mBAAS,CAAC,KAAK;gBACzB,UAAU,EAAE,qBAAW,CAAC,QAAQ;gBAChC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;gBAClC,SAAS;oBACP,GAAC,8BAAoB,IAAG;wBACtB,IAAI,EAAE,YAAY;qBACnB;uBACF;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IAhCW,QAAA,SAAS,aAgCpB","sourcesContent":["import { FontSizes, FontWeights, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles } from '../../index';\n\nexport const getStyles = (props: IGroupedVerticalBarChartStyleProps): IGroupedVerticalBarChartStyles => {\n const { theme, href } = props;\n return {\n opacityChangeOnHover: {\n cursor: href ? 'pointer' : 'default',\n },\n\n tooltip: {\n ...theme.fonts.medium,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: theme.semanticColors.bodyBackground,\n borderRadius: '2px',\n pointerEvents: 'none',\n color: theme.semanticColors.bodyText,\n },\n\n barLabel: {\n fontSize: FontSizes.small,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n };\n};\n"]}
1
+ {"version":3,"file":"GroupedVerticalBarChart.styles.js","sourceRoot":"../src/","sources":["components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.ts"],"names":[],"mappings":";;;;IAGO,IAAM,SAAS,GAAG,UAAC,KAAyC;QACzD,IAAA,KAAK,GAAW,KAAK,MAAhB,EAAE,IAAI,GAAK,KAAK,KAAV,CAAW;QAC9B,OAAO;YACL,oBAAoB,EAAE;gBACpB,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;aACrC;YACD,OAAO,EAAE,IAAA,uBAAe,EAAC,KAAK,CAAC;YAC/B,QAAQ,EAAE,IAAA,wBAAgB,EAAC,KAAK,CAAC;SAClC,CAAC;IACJ,CAAC,CAAC;IATW,QAAA,SAAS,aASpB","sourcesContent":["import { IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles } from '../../index';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\n\nexport const getStyles = (props: IGroupedVerticalBarChartStyleProps): IGroupedVerticalBarChartStyles => {\n const { theme, href } = props;\n return {\n opacityChangeOnHover: {\n cursor: href ? 'pointer' : 'default',\n },\n tooltip: getTooltipStyle(theme),\n barLabel: getBarLabelStyle(theme),\n };\n};\n"]}
@@ -1,18 +1,11 @@
1
- define(["require", "exports", "tslib", "@fluentui/react/lib/Styling"], function (require, exports, tslib_1, Styling_1) {
1
+ define(["require", "exports", "../../utilities/index"], function (require, exports, index_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.getStyles = void 0;
5
5
  var getStyles = function (props) {
6
- var _a;
7
6
  return {
8
- tooltip: tslib_1.__assign(tslib_1.__assign({}, props.theme.fonts.medium), { display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', top: '0px', background: props.theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none', color: props.theme.semanticColors.bodyText }),
9
- markerLabel: {
10
- selectors: (_a = {},
11
- _a[Styling_1.HighContrastSelector] = {
12
- fill: 'CanvasText',
13
- },
14
- _a),
15
- },
7
+ tooltip: (0, index_1.getTooltipStyle)(props.theme),
8
+ markerLabel: (0, index_1.getMarkerLabelStyle)(props.theme),
16
9
  };
17
10
  };
18
11
  exports.getStyles = getStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.styles.js","sourceRoot":"../src/","sources":["components/LineChart/LineChart.styles.ts"],"names":[],"mappings":";;;;IAGO,IAAM,SAAS,GAAG,UAAC,KAA2B;;QACnD,OAAO;YACL,OAAO,wCACF,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,KAC5B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,QAAQ,EACnB,GAAG,EAAE,KAAK,EACV,UAAU,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,cAAc,EACtD,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,QAAQ,GAC5C;YACD,WAAW,EAAE;gBACX,SAAS;oBACP,GAAC,8BAAoB,IAAG;wBACtB,IAAI,EAAE,YAAY;qBACnB;uBACF;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IAvBW,QAAA,SAAS,aAuBpB","sourcesContent":["import { HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { ILineChartStyleProps, ILineChartStyles } from './LineChart.types';\n\nexport const getStyles = (props: ILineChartStyleProps): ILineChartStyles => {\n return {\n tooltip: {\n ...props.theme!.fonts.medium,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: props.theme!.semanticColors.bodyBackground,\n borderRadius: '2px',\n pointerEvents: 'none',\n color: props.theme!.semanticColors.bodyText,\n },\n markerLabel: {\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n };\n};\n"]}
1
+ {"version":3,"file":"LineChart.styles.js","sourceRoot":"../src/","sources":["components/LineChart/LineChart.styles.ts"],"names":[],"mappings":";;;;IAGO,IAAM,SAAS,GAAG,UAAC,KAA2B;QACnD,OAAO;YACL,OAAO,EAAE,IAAA,uBAAe,EAAC,KAAK,CAAC,KAAM,CAAC;YACtC,WAAW,EAAE,IAAA,2BAAmB,EAAC,KAAK,CAAC,KAAM,CAAC;SAC/C,CAAC;IACJ,CAAC,CAAC;IALW,QAAA,SAAS,aAKpB","sourcesContent":["import { ILineChartStyleProps, ILineChartStyles } from './LineChart.types';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n\nexport const getStyles = (props: ILineChartStyleProps): ILineChartStyles => {\n return {\n tooltip: getTooltipStyle(props.theme!),\n markerLabel: getMarkerLabelStyle(props.theme!),\n };\n};\n"]}