@fluentui/react-charting 5.25.6 → 5.25.8

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 (52) hide show
  1. package/CHANGELOG.json +75 -1
  2. package/CHANGELOG.md +26 -2
  3. package/dist/react-charting.d.ts +12 -6
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/lib/components/DonutChart/Arc/Arc.js +4 -2
  7. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  8. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +4 -2
  9. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  10. package/lib/components/Legends/Legends.types.d.ts +12 -6
  11. package/lib/components/Legends/Legends.types.js.map +1 -1
  12. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +4 -2
  13. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  14. package/lib/components/StackedBarChart/StackedBarChart.base.js +4 -2
  15. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  16. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +4 -2
  17. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  18. package/lib/utilities/utilities.d.ts +1 -0
  19. package/lib/utilities/utilities.js +6 -0
  20. package/lib/utilities/utilities.js.map +1 -1
  21. package/lib-amd/components/DonutChart/Arc/Arc.js +3 -1
  22. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  23. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -1
  24. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  25. package/lib-amd/components/Legends/Legends.types.d.ts +12 -6
  26. package/lib-amd/components/Legends/Legends.types.js.map +1 -1
  27. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +3 -1
  28. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  29. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +3 -1
  30. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  31. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -1
  32. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  33. package/lib-amd/utilities/utilities.d.ts +1 -0
  34. package/lib-amd/utilities/utilities.js +7 -0
  35. package/lib-amd/utilities/utilities.js.map +1 -1
  36. package/lib-commonjs/components/DonutChart/Arc/Arc.js +3 -1
  37. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  38. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -1
  39. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  40. package/lib-commonjs/components/Legends/Legends.types.d.ts +12 -6
  41. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  42. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +3 -1
  43. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  44. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +3 -1
  45. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  46. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -1
  47. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  48. package/lib-commonjs/utilities/utilities.d.ts +1 -0
  49. package/lib-commonjs/utilities/utilities.js +7 -0
  50. package/lib-commonjs/utilities/utilities.js.map +1 -1
  51. package/package.json +4 -4
  52. package/src/components/Legends/Legends.types.ts +12 -6
@@ -95,7 +95,9 @@ var Arc = /** @class */ (function (_super) {
95
95
  this.props.hoverOnCallback(data, mouseEvent);
96
96
  };
97
97
  Arc.prototype._redirectToUrl = function (href) {
98
- href ? (window.location.href = href) : '';
98
+ if (href && (0, index_1.isSafeUrl)(href)) {
99
+ window.location.href = href;
100
+ }
99
101
  };
100
102
  Arc.defaultProps = {
101
103
  arc: (0, d3_shape_1.arc)(),
@@ -1 +1 @@
1
- {"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAwC;AACxC,2DAAkF;AAClF,2CAAyC;AAGzC,uCAA+C;AAC/C,kDAAsE;AAOtE;IAAyB,+BAAqC;IAA9D;;QAKS,WAAK,GAAO,EAAE,CAAC;QAEd,gBAAU,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QAC/C,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;QAyF3B,eAAS,GAAG;YAClB,KAAI,CAAC,KAAK,CAAC,kBAAmB,EAAE,CAAC;QACnC,CAAC,CAAC;QAEM,aAAO,GAAG;YAChB,KAAI,CAAC,KAAK,CAAC,cAAe,EAAE,CAAC;QAC/B,CAAC,CAAC;QAMM,mBAAa,GAAG;;YACtB,IAAM,KAAK,GAAG,KAAI,CAAC,KAAK,CAAC,IAAK,CAAC,IAAI,CAAC;YACpC,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC;YACtD,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC;YACzD,OAAO,CAAA,MAAA,KAAK,CAAC,wBAAwB,0CAAE,SAAS,KAAI,CAAC,MAAM,CAAC,CAAC,CAAC,UAAG,MAAM,OAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,UAAG,MAAM,MAAG,CAAC;QACnG,CAAC,CAAC;QAEM,yBAAmB,GAAG,UAAC,MAAe;YACpC,IAAA,SAAS,GAAK,KAAI,CAAC,KAAK,UAAf,CAAgB;YACjC,uGAAuG;YACvG,OAAO,CAAC,SAAS,I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J,UAAC;CAAA,AAzJD,CAAyB,KAAK,CAAC,SAAS,GAyJvC;AAzJY,kBAAG;AA2JhB,SAAS,YAAY,CAAC,QAAmB;IACvC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC/C,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { IChartDataPoint } from '../index';\nimport { IArcProps, IArcStyleProps, IArcStyles } from './index';\nimport { format as d3Format } from 'd3-format';\nimport { formatScientificLimitWidth } from '../../../utilities/index';\nimport type { JSXElement } from '@fluentui/utilities';\n\nexport interface IArcState {\n isCalloutVisible?: boolean;\n}\n\nexport class Arc extends React.Component<IArcProps, IArcState> {\n public static defaultProps: Partial<IArcProps> = {\n arc: d3Arc(),\n };\n\n public state: {} = {};\n\n private currentRef = React.createRef<SVGPathElement>();\n private _isRTL: boolean = getRTL();\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): Partial<IArcState> | null {\n _updateChart(nextProps);\n return null;\n }\n\n public updateChart(newProps: IArcProps): void {\n _updateChart(newProps);\n }\n\n public render(): JSXElement {\n const { arc, href, focusedArcId, activeArc } = this.props;\n const getClassNames = classNamesFunction<IArcStyleProps, IArcStyles>();\n const id =\n this.props.uniqText! +\n (typeof this.props.data!.data.legend === 'string' ? this.props.data!.data.legend.replace(/\\s+/g, '') : '') +\n this.props.data!.data.data;\n const opacity: number =\n activeArc && activeArc.length > 0 ? (activeArc.includes(this.props.data?.data.legend!) ? 1 : 0.1) : 1;\n const startAngle = this.props.data?.startAngle ?? 0;\n const endAngle = (this.props.data?.endAngle ?? 0) - startAngle;\n const cornerRadius = this.props.roundCorners ? 3 : 0;\n\n const classNames = getClassNames(getStyles, {\n solidFill: this.props.enableGradient ? 'transparent' : this.props.color,\n gradientFill: `conic-gradient(\n from ${startAngle}rad,\n ${this.props.color},\n ${this.props.nextColor} ${endAngle}rad\n )`,\n href: href!,\n theme: this.props.theme!,\n opacity,\n });\n\n const clipId = getId('Arc_clip') + `${this.props.color}_${this.props.nextColor}`;\n\n return (\n <g ref={this.currentRef}>\n {!!focusedArcId && focusedArcId === id && (\n <path\n id={id + 'focusRing'}\n d={arc.cornerRadius(cornerRadius)(this.props.focusData)}\n className={classNames.focusRing}\n />\n )}\n\n <path\n id={id}\n d={arc.cornerRadius(cornerRadius)(this.props.data)}\n onFocus={this._onFocus.bind(this, this.props.data!.data, id)}\n className={classNames.root}\n data-is-focusable={\n this._shouldHighlightArc(this.props.data!.data.legend!) || this.props.activeArc?.length === 0\n }\n onMouseOver={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseMove={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseLeave={this._hoverOff}\n onBlur={this._onBlur}\n onClick={href ? this._redirectToUrl.bind(this, href) : this.props.data?.data.onClick}\n aria-label={this._getAriaLabel()}\n role=\"img\"\n />\n {this._renderArcLabel(classNames.arcLabel)}\n\n {this.props.enableGradient && (\n <>\n <clipPath id={clipId}>\n <path d={arc.cornerRadius(cornerRadius)(this.props.data)} />\n </clipPath>\n <foreignObject x=\"-50%\" y=\"-50%\" width=\"100%\" height=\"100%\" clipPath={`url(#${clipId})`}>\n <div className={classNames.gradientArc} />\n </foreignObject>\n </>\n )}\n </g>\n );\n }\n\n private _onFocus(data: IChartDataPoint, id: string): void {\n this.props.onFocusCallback!(data, id, this.currentRef.current);\n }\n\n private _hoverOn(data: IChartDataPoint, mouseEvent: React.MouseEvent<SVGPathElement>): void {\n mouseEvent.persist();\n this.props.hoverOnCallback!(data, mouseEvent);\n }\n\n private _hoverOff = (): void => {\n this.props.hoverLeaveCallback!();\n };\n\n private _onBlur = (): void => {\n this.props.onBlurCallback!();\n };\n\n private _redirectToUrl(href: string | undefined): void {\n href ? (window.location.href = href) : '';\n }\n\n private _getAriaLabel = (): string => {\n const point = this.props.data!.data;\n const legend = point.xAxisCalloutData || point.legend;\n const yValue = point.yAxisCalloutData || point.data || 0;\n return point.callOutAccessibilityData?.ariaLabel || (legend ? `${legend}, ` : '') + `${yValue}.`;\n };\n\n private _shouldHighlightArc = (legend?: string): boolean => {\n const { activeArc } = this.props;\n // If no activeArc is provided, highlight all arcs. Otherwise, only highlight the arcs that are active.\n return !activeArc || activeArc.length === 0 || legend === undefined || activeArc.includes(legend);\n };\n\n private _renderArcLabel = (className: string) => {\n const { arc, data, innerRadius, outerRadius, showLabelsInPercent, totalValue, hideLabels } = this.props;\n if (\n hideLabels ||\n Math.abs(data!.endAngle - data!.startAngle) < Math.PI / 12 ||\n !this._shouldHighlightArc(data!.data.legend!)\n ) {\n return null;\n }\n\n const [base, perp] = arc.centroid(data);\n const hyp = Math.sqrt(base * base + perp * perp);\n const labelRadius = Math.max(innerRadius!, outerRadius!) + 2;\n const angle = (data!.startAngle + data!.endAngle) / 2;\n const arcValue = data!.value;\n\n return (\n <text\n x={(hyp === 0 ? 0 : base / hyp) * labelRadius}\n y={(hyp === 0 ? 0 : perp / hyp) * labelRadius}\n textAnchor={angle > Math.PI !== this._isRTL ? 'end' : 'start'}\n dominantBaseline={angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto'}\n className={className}\n aria-hidden={true}\n >\n {showLabelsInPercent\n ? d3Format('.0%')(totalValue! === 0 ? 0 : arcValue / totalValue!)\n : formatScientificLimitWidth(arcValue)}\n </text>\n );\n };\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}
1
+ {"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAwC;AACxC,2DAAkF;AACl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cesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { IChartDataPoint } from '../index';\nimport { IArcProps, IArcStyleProps, IArcStyles } from './index';\nimport { format as d3Format } from 'd3-format';\nimport { formatScientificLimitWidth, isSafeUrl } from '../../../utilities/index';\nimport type { JSXElement } from '@fluentui/utilities';\n\nexport interface IArcState {\n isCalloutVisible?: boolean;\n}\n\nexport class Arc extends React.Component<IArcProps, IArcState> {\n public static defaultProps: Partial<IArcProps> = {\n arc: d3Arc(),\n };\n\n public state: {} = {};\n\n private currentRef = React.createRef<SVGPathElement>();\n private _isRTL: boolean = getRTL();\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): Partial<IArcState> | null {\n _updateChart(nextProps);\n return null;\n }\n\n public updateChart(newProps: IArcProps): void {\n _updateChart(newProps);\n }\n\n public render(): JSXElement {\n const { arc, href, focusedArcId, activeArc } = this.props;\n const getClassNames = classNamesFunction<IArcStyleProps, IArcStyles>();\n const id =\n this.props.uniqText! +\n (typeof this.props.data!.data.legend === 'string' ? this.props.data!.data.legend.replace(/\\s+/g, '') : '') +\n this.props.data!.data.data;\n const opacity: number =\n activeArc && activeArc.length > 0 ? (activeArc.includes(this.props.data?.data.legend!) ? 1 : 0.1) : 1;\n const startAngle = this.props.data?.startAngle ?? 0;\n const endAngle = (this.props.data?.endAngle ?? 0) - startAngle;\n const cornerRadius = this.props.roundCorners ? 3 : 0;\n\n const classNames = getClassNames(getStyles, {\n solidFill: this.props.enableGradient ? 'transparent' : this.props.color,\n gradientFill: `conic-gradient(\n from ${startAngle}rad,\n ${this.props.color},\n ${this.props.nextColor} ${endAngle}rad\n )`,\n href: href!,\n theme: this.props.theme!,\n opacity,\n });\n\n const clipId = getId('Arc_clip') + `${this.props.color}_${this.props.nextColor}`;\n\n return (\n <g ref={this.currentRef}>\n {!!focusedArcId && focusedArcId === id && (\n <path\n id={id + 'focusRing'}\n d={arc.cornerRadius(cornerRadius)(this.props.focusData)}\n className={classNames.focusRing}\n />\n )}\n\n <path\n id={id}\n d={arc.cornerRadius(cornerRadius)(this.props.data)}\n onFocus={this._onFocus.bind(this, this.props.data!.data, id)}\n className={classNames.root}\n data-is-focusable={\n this._shouldHighlightArc(this.props.data!.data.legend!) || this.props.activeArc?.length === 0\n }\n onMouseOver={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseMove={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseLeave={this._hoverOff}\n onBlur={this._onBlur}\n onClick={href ? this._redirectToUrl.bind(this, href) : this.props.data?.data.onClick}\n aria-label={this._getAriaLabel()}\n role=\"img\"\n />\n {this._renderArcLabel(classNames.arcLabel)}\n\n {this.props.enableGradient && (\n <>\n <clipPath id={clipId}>\n <path d={arc.cornerRadius(cornerRadius)(this.props.data)} />\n </clipPath>\n <foreignObject x=\"-50%\" y=\"-50%\" width=\"100%\" height=\"100%\" clipPath={`url(#${clipId})`}>\n <div className={classNames.gradientArc} />\n </foreignObject>\n </>\n )}\n </g>\n );\n }\n\n private _onFocus(data: IChartDataPoint, id: string): void {\n this.props.onFocusCallback!(data, id, this.currentRef.current);\n }\n\n private _hoverOn(data: IChartDataPoint, mouseEvent: React.MouseEvent<SVGPathElement>): void {\n mouseEvent.persist();\n this.props.hoverOnCallback!(data, mouseEvent);\n }\n\n private _hoverOff = (): void => {\n this.props.hoverLeaveCallback!();\n };\n\n private _onBlur = (): void => {\n this.props.onBlurCallback!();\n };\n\n private _redirectToUrl(href: string | undefined): void {\n if (href && isSafeUrl(href)) {\n window.location.href = href;\n }\n }\n\n private _getAriaLabel = (): string => {\n const point = this.props.data!.data;\n const legend = point.xAxisCalloutData || point.legend;\n const yValue = point.yAxisCalloutData || point.data || 0;\n return point.callOutAccessibilityData?.ariaLabel || (legend ? `${legend}, ` : '') + `${yValue}.`;\n };\n\n private _shouldHighlightArc = (legend?: string): boolean => {\n const { activeArc } = this.props;\n // If no activeArc is provided, highlight all arcs. Otherwise, only highlight the arcs that are active.\n return !activeArc || activeArc.length === 0 || legend === undefined || activeArc.includes(legend);\n };\n\n private _renderArcLabel = (className: string) => {\n const { arc, data, innerRadius, outerRadius, showLabelsInPercent, totalValue, hideLabels } = this.props;\n if (\n hideLabels ||\n Math.abs(data!.endAngle - data!.startAngle) < Math.PI / 12 ||\n !this._shouldHighlightArc(data!.data.legend!)\n ) {\n return null;\n }\n\n const [base, perp] = arc.centroid(data);\n const hyp = Math.sqrt(base * base + perp * perp);\n const labelRadius = Math.max(innerRadius!, outerRadius!) + 2;\n const angle = (data!.startAngle + data!.endAngle) / 2;\n const arcValue = data!.value;\n\n return (\n <text\n x={(hyp === 0 ? 0 : base / hyp) * labelRadius}\n y={(hyp === 0 ? 0 : perp / hyp) * labelRadius}\n textAnchor={angle > Math.PI !== this._isRTL ? 'end' : 'start'}\n dominantBaseline={angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto'}\n className={className}\n aria-hidden={true}\n >\n {showLabelsInPercent\n ? d3Format('.0%')(totalValue! === 0 ? 0 : arcValue / totalValue!)\n : formatScientificLimitWidth(arcValue)}\n </text>\n );\n };\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}
@@ -114,7 +114,9 @@ var GroupedVerticalBarChartBase = /** @class */ (function (_super) {
114
114
  _this._showCallout(focusEvent.currentTarget, pointData, groupData);
115
115
  };
116
116
  _this._redirectToUrl = function (href) {
117
- href ? (window.location.href = href) : '';
117
+ if (href && (0, index_1.isSafeUrl)(href)) {
118
+ window.location.href = href;
119
+ }
118
120
  };
119
121
  _this._buildGraph = function (
120
122
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1 +1 @@
1
- {"version":3,"file":"GroupedVerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/GroupedVerticalBarChart/GroupedVertic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AAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAtB,CAAsB,CAAC,CAAC,CACrF,CAAC;IACJ,CAAC;IAEO,kDAAY,GAApB;QACE,IAAI,CAAC,SAAS,GAAG,IAAA,mBAAW,EAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC1E,iFAAiF;QACjF,uCAAuC;QACvC,mGAAmG;QACnG,IAAI,CAAC,kBAAkB,GAAG,IAAA,uBAAe,EACvC,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAC5B,SAAS,EACT,CAAC,GAAG,CAAC,CAAC,GAAG,IAAA,0BAAkB,EAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CACxE,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,IAAA,uBAAe,EAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IA9tBa,wCAAY,GAA2C;QACnE,WAAW,EAAE,EAAE;QACf,kBAAkB,EAAE,SAAS;KAC9B,AAHyB,CAGxB;IAgkCJ,kCAAC;CAAA,AAvkCD,CACU,KAAK,CAAC,SAAS,GAskCxB;AAvkCY,kEAA2B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { pointer as d3Pointer } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear, scaleBand as d3ScaleBand, ScaleBand } 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 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 calcTotalWidth,\n calcBandwidth,\n calcTotalBandUnits,\n calcRequiredWidth,\n getColorFromToken,\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 IChildProps,\n IYValueHover,\n} from '../../index';\nimport { IChart, IImageExportOptions, IBarSeries, ILineSeries } from '../../types/index';\nimport { exportChartsAsImage } from '../../utilities/image-export-utils';\nimport { ILegendContainer } from '../Legends/index';\nimport { rgb } from 'd3-color';\nimport type { JSXElement } from '@fluentui/utilities';\nimport { isInvalidValue } from '@fluentui/chart-utilities';\n\nconst COMPONENT_NAME = 'GROUPED VERTICAL BAR CHART';\nconst getClassNames = classNamesFunction<IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles>();\ntype NumericScale = ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\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}\n\ntype IGVBCLineSeries = ILineSeries<string, number>;\n\nexport interface IGroupedVerticalBarChartState extends IBasestate {\n dataPointCalloutProps?: IGVBarChartSeriesPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n selectedLegends: string[];\n activeLinePoint: 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 barData: IGroupedVerticalBarChartData[],\n lineData: IGVBCLineSeries[],\n ) => // eslint-disable-next-line @typescript-eslint/no-explicit-any\n { barLegends: string[]; lineLegends: string[]; xAxisLabels: string[]; datasetForBars: any };\n private _barLegends: string[];\n private _lineLegends: string[];\n private _xAxisLabels: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _datasetForBars: any;\n private margins: IMargins;\n\n private _groupedVerticalBarGraph: JSXElement[];\n private _classNames: IProcessedStyleSet<IGroupedVerticalBarChartStyles>;\n private _yMax: number;\n private _calloutId: 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 | null>;\n private _legendsRef: React.RefObject<ILegendContainer | null>;\n private _legendColorMap: Record<string, [string, string]> = {};\n private readonly Y_ORIGIN: number = 0;\n private _rectRef: React.RefObject<SVGRectElement | null>;\n private _uniqDotId = getId('gvbc_dot_');\n\n public constructor(props: IGroupedVerticalBarChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._createSet = memoizeFunction((barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) =>\n this._createDataSetOfGVBC(barData, lineData),\n );\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 activeLinePoint: '',\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._emptyChartId = getId('_GVBC_empty');\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n this._rectRef = 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 { barData, lineData } = this._prepareChartData();\n const firstXValue = barData[0]?.name ?? lineData[0]?.data[0]?.x;\n this._xAxisType = isInvalidValue(firstXValue)\n ? XAxisTypes.StringAxis\n : (getTypeOfAxis(firstXValue, true) as XAxisTypes);\n const { barLegends, lineLegends, xAxisLabels, datasetForBars } = this._createSet(barData, lineData);\n this._barLegends = barLegends;\n this._lineLegends = lineLegends;\n this._xAxisLabels = xAxisLabels;\n this._datasetForBars = datasetForBars;\n\n const legendBars: JSXElement = 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\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(barData, lineData) ? (\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={(props: IChildProps) => {\n return (\n <>\n <rect\n ref={this._rectRef}\n width=\"100%\"\n height=\"100%\"\n fill=\"transparent\"\n style={{ pointerEvents: 'none' }}\n />\n <g>{this._groupedVerticalBarGraph}</g>\n {this._createLines(lineData, props.xScale, props.yScalePrimary, props.yScaleSecondary)}\n </>\n );\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 exportChartsAsImage(\n [{ container: this._cartesianChartRef.current?.chartContainer }],\n this.props.hideLegend ? undefined : this._legendsRef.current?.toSVG,\n this._isRtl,\n opts,\n );\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 ) => {\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: StringScale | NumericScale,\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 calcBandwidth(xScale0.bandwidth(), this._barLegends.length, X1_INNER_PADDING),\n );\n this._groupWidth = calcRequiredWidth(this._barWidth, this._barLegends.length, X1_INNER_PADDING);\n\n const xScale1 = this._createX1Scale();\n\n const allGroupsBars: JSXElement[] = [];\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 = (barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) => {\n const barLegends = new Set<string>();\n barData.forEach((point: IGroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n barLegends.add(seriesPoint.legend);\n });\n });\n const lineLegends = new Set<string>(lineData.map(series => series.legend));\n const xAxisLabels: string[] = this._getOrderedXAxisLabels(barData, lineData);\n const datasetForBars = this._createDataset(barData, lineData);\n return {\n barLegends: Array.from(barLegends),\n lineLegends: Array.from(lineLegends),\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._showCallout(mouseEvent, pointData, groupData);\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._showCallout(focusEvent.currentTarget, pointData, groupData);\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 ): JSXElement => {\n const singleGroup: JSXElement[] = [];\n\n const barLabelsForGroup: JSXElement[] = [];\n\n // Get the actual legends present at this x-axis point\n const presentLegends = this._barLegends.filter(key => key in singleSet);\n const effectiveGroupWidth = calcRequiredWidth(this._barWidth, presentLegends.length, X1_INNER_PADDING);\n\n // For stacked bars, center the single bar group in the available space\n // Instead of using the global legend position, use the local position within present legends\n const localScale = d3ScaleBand()\n .domain(presentLegends)\n .range(this._isRtl ? [effectiveGroupWidth, 0] : [0, effectiveGroupWidth])\n .paddingInner(X1_INNER_PADDING);\n this._barLegends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n const xPoint = (localScale(legendTitle) ?? 0) + (localScale.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 // Render individual bar label if provided\n if (pointData.barLabel && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}-label`}\n x={xPoint + this._barWidth / 2}\n y={pointData.data >= this.Y_ORIGIN ? yPoint - 6 : yPoint + height + 12}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {pointData.barLabel}\n </text>,\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 return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - effectiveGroupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n private _createDataset = (barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n const linePointsByX: Record<string, IYValueHover[]> = {};\n const visitedX = new Set<string>();\n lineData.forEach(series => {\n series.data.forEach(point => {\n if (!linePointsByX[point.x]) {\n linePointsByX[point.x] = [];\n }\n linePointsByX[point.x].push({\n ...point,\n legend: series.legend,\n color: series.color,\n data: point.y,\n useSecondaryYScale: series.useSecondaryYScale,\n } as IYValueHover);\n });\n });\n\n barData.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 = [\n ...Object.values(legendToBarPoint),\n ...(linePointsByX[point.name] ?? []),\n ];\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n visitedX.add(point.name);\n });\n\n Object.keys(linePointsByX).forEach(xPoint => {\n if (!visitedX.has(xPoint)) {\n datasetForBars.push({\n xAxisPoint: xPoint,\n groupSeries: linePointsByX[xPoint],\n });\n }\n });\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._barLegends)\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 = (): JSXElement => {\n const actions: ILegend[] = [];\n\n const addLegendButton = (legendTitle: string, isLineLegendInBarChart?: boolean) => {\n const legend: ILegend = {\n title: legendTitle,\n color: this._legendColorMap[legendTitle][0],\n isLineLegendInBarChart,\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n };\n\n this._lineLegends.forEach(legendTitle => addLegendButton(legendTitle, true));\n this._barLegends.forEach(legendTitle => addLegendButton(legendTitle));\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 = calcTotalWidth(containerWidth, this.margins, MIN_DOMAIN_MARGIN);\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 = calcRequiredWidth(this._barWidth, this._barLegends.length, X1_INNER_PADDING);\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = calcRequiredWidth(groupWidth, this._xAxisLabels.length, this._xAxisInnerPadding);\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 = calcBandwidth(totalWidth, this._xAxisLabels.length, this._xAxisInnerPadding);\n const barBandwidth = calcBandwidth(groupBandwidth, this._barLegends.length, X1_INNER_PADDING);\n const barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth, barBandwidth);\n const groupWidth = calcRequiredWidth(barWidth, this._barLegends.length, X1_INNER_PADDING);\n let reqWidth = calcRequiredWidth(groupWidth, this._xAxisLabels.length, this._xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\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 const margin2 = (totalWidth - reqWidth) / 2;\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(barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]): boolean {\n return !(\n (barData &&\n barData.length > 0 &&\n barData.filter((item: IGroupedVerticalBarChartData) => item.series.length).length > 0) ||\n (lineData && lineData.length > 0 && lineData.some(series => series.data.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 + calcTotalBandUnits(this._barLegends.length, X1_INNER_PADDING)),\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._barLegends.length} grouped bar series` +\n (this._lineLegends.length > 0 ? ` and ${this._lineLegends.length} line series. ` : '. ')\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 _prepareChartData = () => {\n let barData = this.props.data;\n let lineData: IGVBCLineSeries[] | undefined;\n\n if (Array.isArray(this.props.dataV2) && this.props.dataV2.length > 0) {\n ({ barData, lineData } = this._processDataV2(this.props.dataV2));\n }\n\n this._legendColorMap = {};\n let colorIndex = 0;\n\n return {\n barData:\n barData?.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 lineData:\n lineData?.map(series => {\n let color: string;\n if (typeof series.color === 'undefined') {\n color = getNextColor(colorIndex, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(series.color, this.props.theme?.isInverted);\n }\n\n if (!this._legendColorMap[series.legend]) {\n this._legendColorMap[series.legend] = [color, color];\n }\n colorIndex += 1;\n\n return {\n ...series,\n color: this._legendColorMap[series.legend][0],\n };\n }) ?? [],\n };\n };\n\n private _getOrderedXAxisLabels = (barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) => {\n if (this._xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(this._mapCategoryToValues(barData, lineData), this.props.xAxisCategoryOrder);\n };\n\n private _mapCategoryToValues = (barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) => {\n const categoryToValues: Record<string, number[]> = {};\n barData.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 lineData.forEach(series => {\n series.data.forEach(point => {\n if (!categoryToValues[point.x]) {\n categoryToValues[point.x] = [];\n }\n categoryToValues[point.x].push(point.y);\n });\n });\n return categoryToValues;\n };\n\n private _createLines = (\n lineData: IGVBCLineSeries[],\n xScale: StringScale,\n yScalePrimary: NumericScale,\n yScaleSecondary?: NumericScale,\n ): React.ReactNode => {\n const lineBorders: React.ReactNode[] = [];\n const lines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n\n const scaleLineX = (x: string) => xScale(x)! + xScale.bandwidth() / 2;\n\n lineData.forEach((series, seriesIdx) => {\n const lineBorderGroup: React.ReactNode[] = [];\n const lineGroup: React.ReactNode[] = [];\n const dotGroup: React.ReactNode[] = [];\n const lineBorderWidth = series.lineOptions?.lineBorderWidth\n ? Number.parseFloat(series.lineOptions.lineBorderWidth.toString())\n : 0;\n const yScale = series.useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n const shouldHighlight = this._legendHighlighted(series.legend) || this._noLegendHighlighted();\n\n series.data.forEach((point, pointIdx) => {\n const x2 = scaleLineX(point.x);\n const y2 = yScale(point.y);\n\n if (pointIdx > 0) {\n const x1 = scaleLineX(series.data[pointIdx - 1].x);\n const y1 = yScale(series.data[pointIdx - 1].y);\n\n if (lineBorderWidth > 0) {\n lineBorderGroup.push(\n <line\n key={`lineBorder-${seriesIdx}-${pointIdx}`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n fill=\"transparent\"\n stroke={series.lineOptions?.lineBorderColor ?? this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3 + lineBorderWidth * 2}\n strokeLinecap=\"round\"\n opacity={shouldHighlight ? 1 : 0.1}\n />,\n );\n }\n\n lineGroup.push(\n <line\n key={`line-${seriesIdx}-${pointIdx}`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n stroke={series.color}\n strokeWidth={series.lineOptions?.strokeWidth ?? 3}\n strokeLinecap={series.lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={series.lineOptions?.strokeDasharray}\n opacity={shouldHighlight ? 1 : 0.1}\n onMouseOver={e => this._onLineHover(e, series, seriesIdx, pointIdx, scaleLineX)}\n onMouseLeave={this._onBarLeave}\n />,\n );\n }\n\n const dotId = this._getDotId(seriesIdx, pointIdx);\n const { activeLinePoint } = this.state;\n const isLinePointActive = activeLinePoint === point.x || activeLinePoint === dotId;\n\n dotGroup.push(\n <circle\n key={dotId}\n id={dotId}\n cx={x2}\n cy={y2}\n r={shouldHighlight && isLinePointActive ? 8 : 0.3}\n fill={this.props.theme!.semanticColors.bodyBackground}\n stroke={series.color}\n strokeWidth={3}\n opacity={shouldHighlight ? 1 : 0.1}\n onMouseOver={e => this._onLineHover(e, series, seriesIdx, pointIdx, scaleLineX)}\n onMouseLeave={this._onBarLeave}\n data-is-focusable={shouldHighlight}\n onFocus={e => this._onLineFocus(e, series, seriesIdx, pointIdx)}\n onBlur={this._onBarLeave}\n role=\"img\"\n aria-label={this._getAriaLabel(\n {\n xAxisCalloutData: point.xAxisCalloutData,\n legend: series.legend,\n yAxisCalloutData: point.yAxisCalloutData,\n data: point.y,\n callOutAccessibilityData: point.callOutAccessibilityData,\n } as IGVBarChartSeriesPoint,\n point.x,\n )}\n />,\n );\n });\n\n lineBorders.push(<g key={`lineBorderGroup-${seriesIdx}`}>{lineBorderGroup}</g>);\n lines.push(<g key={`lineGroup-${seriesIdx}`}>{lineGroup}</g>);\n dots.push(<g key={`dotGroup-${seriesIdx}`}>{dotGroup}</g>);\n });\n\n return dots.length > 0 ? (\n <g>\n {lineBorders.length > 0 ? <g>{lineBorders}</g> : null}\n {lines.length > 0 ? <g>{lines}</g> : null}\n <g>{dots}</g>\n </g>\n ) : null;\n };\n\n private _onLineHover = (\n event: React.MouseEvent<SVGElement>,\n series: IGVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n scaleLineX: (x: string) => number,\n ) => {\n const pointerX = d3Pointer(event, this._rectRef.current)[0];\n\n let closestPointIdx = pointIdx;\n if (pointIdx > 0) {\n const currPointPos = scaleLineX(series.data[pointIdx].x);\n const prevPointPos = scaleLineX(series.data[pointIdx - 1].x);\n\n if (Math.abs(prevPointPos - pointerX) < Math.abs(currPointPos - pointerX)) {\n closestPointIdx = pointIdx - 1;\n }\n }\n\n event.persist();\n this._showCalloutForLines(event, series, seriesIdx, closestPointIdx);\n };\n\n private _onLineFocus = (\n event: React.FocusEvent<SVGElement>,\n series: IGVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n ) => {\n this._showCalloutForLines(event.currentTarget, series, seriesIdx, pointIdx);\n };\n\n private _showCalloutForLines = (\n target: React.MouseEvent<SVGElement> | SVGElement,\n series: IGVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n ) => {\n const point = series.data[pointIdx];\n const pointData = {\n ...point,\n legend: series.legend,\n color: series.color!,\n key: series.legend,\n data: point.y,\n yAxisCalloutData: point.yAxisCalloutData as string | undefined,\n };\n const groupData = this._datasetForBars.find(\n (singleSet: { xAxisPoint: string }) => singleSet.xAxisPoint === point.x,\n );\n\n this._showCallout(target, pointData, groupData, this._getDotId(seriesIdx, pointIdx));\n };\n\n private _showCallout = (\n target: React.MouseEvent<SVGElement> | SVGElement,\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n activeLinePoint = '',\n ) => {\n this.setState({\n refSelected: target,\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData ?? groupData.xAxisPoint,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries.filter(\n (item: IYValueHover) => this._noLegendHighlighted() || this._legendHighlighted(item.legend!),\n ),\n hoverXValue: pointData.xAxisCalloutData ?? groupData.xAxisPoint,\n activeLinePoint: this.props.isCalloutForStack ? groupData.xAxisPoint : activeLinePoint,\n });\n };\n\n private _getDotId = (seriesIdx: number, pointIdx: number) => {\n return this._uniqDotId + `-${seriesIdx}-${pointIdx}`;\n };\n\n private _processDataV2 = (dataV2: (IBarSeries<string, number> | ILineSeries<string, number>)[]) => {\n const barPointsByX: Record<string, IGroupedVerticalBarChartData> = {};\n const lineData: IGVBCLineSeries[] = [];\n\n dataV2.forEach(series => {\n if (series.type === 'bar') {\n series.data.forEach(point => {\n if (!barPointsByX[point.x]) {\n barPointsByX[point.x] = { name: point.x, series: [] };\n }\n\n barPointsByX[point.x].series.push({\n key: series.key ?? series.legend,\n data: point.y,\n color: point.color ?? series.color,\n gradient: series.gradient,\n legend: series.legend,\n xAxisCalloutData: point.xAxisCalloutData,\n yAxisCalloutData: point.yAxisCalloutData,\n onClick: point.onClick,\n useSecondaryYScale: series.useSecondaryYScale,\n });\n });\n } else if (series.type === 'line') {\n lineData!.push(series);\n }\n });\n\n return { barData: Object.values(barPointsByX), lineData };\n };\n}\n"]}
1
+ {"version":3,"file":"GroupedVerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAsD;AACtD,6CAAoD;AACpD,qCAA0G;AAC1G,2DAOuC;AAEvC,uDAA8D;AAC9D,qDAA2D;AAC3D,+CA0B+B;AAC/B,qCAcqB;AAErB,yEAAyE;AAEzE,qCAA+B;AAE/B,6DAA2D;AAE3D,IAAM,cAAc,GAAG,4BAA4B,CAAC;AACpD,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAsE,CAAC;AAI/G,IAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,IAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,IAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,IAAM,cAAc,GAAG,CAAC,CAAC;AAsBzB;IACU,uDAA6E;IAwCrF,qCAAmB,KAAoC;;QACrD,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QAhBP,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;QAU3B,qBAAe,GAAqC,EAAE,CAAC;QAC9C,cAAQ,GAAW,CAAC,CAAC;QAE9B,gBAAU,GAAG,IAAA,iBAAK,EAAC,WAAW,CAAC,CAAC;QA8JjC,aAAO,GAAG,UAAC,IAA0B;;YAC1C,OAAO,IAAA,wCAAmB,EACxB,CAAC,EAAE,SAAS,EAAE,MAAA,KAAI,CAAC,kBAAkB,CAAC,OAAO,0CAAE,cAAc,EAAE,CAAC,EAChE,KAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAA,KAAI,CAAC,WAAW,CAAC,OAAO,0CAAE,KAAK,EACnE,KAAI,CAAC,MAAM,EACX,IAAI,CACL,CAAC;QACJ,CAAC,CAAC;QAEF,8DAA8D;QACtD,uBAAiB,GAAG,UAAC,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AAM,GAAG,CAAC,CAAC;YACxF,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAtB,CAAsB,CAAC,CAAC,CACrF,CAAC;IACJ,CAAC;IAEO,kDAAY,GAApB;QACE,IAAI,CAAC,SAAS,GAAG,IAAA,mBAAW,EAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC1E,iFAAiF;QACjF,uCAAuC;QACvC,mGAAmG;QACnG,IAAI,CAAC,kBAAkB,GAAG,IAAA,uBAAe,EACvC,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAC5B,SAAS,EACT,CAAC,GAAG,CAAC,CAAC,GAAG,IAAA,0BAAkB,EAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CACxE,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,IAAA,uBAAe,EAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAhuBa,wCAAY,GAA2C;QACnE,WAAW,EAAE,EAAE;QACf,kBAAkB,EAAE,SAAS;KAC9B,AAHyB,CAGxB;IAkkCJ,kCAAC;CAAA,AAzkCD,CACU,KAAK,CAAC,SAAS,GAwkCxB;AAzkCY,kEAA2B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { pointer as d3Pointer } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear, scaleBand as d3ScaleBand, ScaleBand } 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 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 calcTotalWidth,\n calcBandwidth,\n calcTotalBandUnits,\n calcRequiredWidth,\n getColorFromToken,\n isSafeUrl,\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 IChildProps,\n IYValueHover,\n} from '../../index';\nimport { IChart, IImageExportOptions, IBarSeries, ILineSeries } from '../../types/index';\nimport { exportChartsAsImage } from '../../utilities/image-export-utils';\nimport { ILegendContainer } from '../Legends/index';\nimport { rgb } from 'd3-color';\nimport type { JSXElement } from '@fluentui/utilities';\nimport { isInvalidValue } from '@fluentui/chart-utilities';\n\nconst COMPONENT_NAME = 'GROUPED VERTICAL BAR CHART';\nconst getClassNames = classNamesFunction<IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles>();\ntype NumericScale = ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\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}\n\ntype IGVBCLineSeries = ILineSeries<string, number>;\n\nexport interface IGroupedVerticalBarChartState extends IBasestate {\n dataPointCalloutProps?: IGVBarChartSeriesPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n selectedLegends: string[];\n activeLinePoint: 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 barData: IGroupedVerticalBarChartData[],\n lineData: IGVBCLineSeries[],\n ) => // eslint-disable-next-line @typescript-eslint/no-explicit-any\n { barLegends: string[]; lineLegends: string[]; xAxisLabels: string[]; datasetForBars: any };\n private _barLegends: string[];\n private _lineLegends: string[];\n private _xAxisLabels: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _datasetForBars: any;\n private margins: IMargins;\n\n private _groupedVerticalBarGraph: JSXElement[];\n private _classNames: IProcessedStyleSet<IGroupedVerticalBarChartStyles>;\n private _yMax: number;\n private _calloutId: 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 | null>;\n private _legendsRef: React.RefObject<ILegendContainer | null>;\n private _legendColorMap: Record<string, [string, string]> = {};\n private readonly Y_ORIGIN: number = 0;\n private _rectRef: React.RefObject<SVGRectElement | null>;\n private _uniqDotId = getId('gvbc_dot_');\n\n public constructor(props: IGroupedVerticalBarChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._createSet = memoizeFunction((barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) =>\n this._createDataSetOfGVBC(barData, lineData),\n );\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 activeLinePoint: '',\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._emptyChartId = getId('_GVBC_empty');\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n this._rectRef = 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 { barData, lineData } = this._prepareChartData();\n const firstXValue = barData[0]?.name ?? lineData[0]?.data[0]?.x;\n this._xAxisType = isInvalidValue(firstXValue)\n ? XAxisTypes.StringAxis\n : (getTypeOfAxis(firstXValue, true) as XAxisTypes);\n const { barLegends, lineLegends, xAxisLabels, datasetForBars } = this._createSet(barData, lineData);\n this._barLegends = barLegends;\n this._lineLegends = lineLegends;\n this._xAxisLabels = xAxisLabels;\n this._datasetForBars = datasetForBars;\n\n const legendBars: JSXElement = 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\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(barData, lineData) ? (\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={(props: IChildProps) => {\n return (\n <>\n <rect\n ref={this._rectRef}\n width=\"100%\"\n height=\"100%\"\n fill=\"transparent\"\n style={{ pointerEvents: 'none' }}\n />\n <g>{this._groupedVerticalBarGraph}</g>\n {this._createLines(lineData, props.xScale, props.yScalePrimary, props.yScaleSecondary)}\n </>\n );\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 exportChartsAsImage(\n [{ container: this._cartesianChartRef.current?.chartContainer }],\n this.props.hideLegend ? undefined : this._legendsRef.current?.toSVG,\n this._isRtl,\n opts,\n );\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 ) => {\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: StringScale | NumericScale,\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 calcBandwidth(xScale0.bandwidth(), this._barLegends.length, X1_INNER_PADDING),\n );\n this._groupWidth = calcRequiredWidth(this._barWidth, this._barLegends.length, X1_INNER_PADDING);\n\n const xScale1 = this._createX1Scale();\n\n const allGroupsBars: JSXElement[] = [];\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 = (barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) => {\n const barLegends = new Set<string>();\n barData.forEach((point: IGroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: IGVBarChartSeriesPoint) => {\n barLegends.add(seriesPoint.legend);\n });\n });\n const lineLegends = new Set<string>(lineData.map(series => series.legend));\n const xAxisLabels: string[] = this._getOrderedXAxisLabels(barData, lineData);\n const datasetForBars = this._createDataset(barData, lineData);\n return {\n barLegends: Array.from(barLegends),\n lineLegends: Array.from(lineLegends),\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._showCallout(mouseEvent, pointData, groupData);\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._showCallout(focusEvent.currentTarget, pointData, groupData);\n };\n\n private _redirectToUrl = (href: string | undefined): void => {\n if (href && isSafeUrl(href)) {\n window.location.href = href;\n }\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 ): JSXElement => {\n const singleGroup: JSXElement[] = [];\n\n const barLabelsForGroup: JSXElement[] = [];\n\n // Get the actual legends present at this x-axis point\n const presentLegends = this._barLegends.filter(key => key in singleSet);\n const effectiveGroupWidth = calcRequiredWidth(this._barWidth, presentLegends.length, X1_INNER_PADDING);\n\n // For stacked bars, center the single bar group in the available space\n // Instead of using the global legend position, use the local position within present legends\n const localScale = d3ScaleBand()\n .domain(presentLegends)\n .range(this._isRtl ? [effectiveGroupWidth, 0] : [0, effectiveGroupWidth])\n .paddingInner(X1_INNER_PADDING);\n this._barLegends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n const xPoint = (localScale(legendTitle) ?? 0) + (localScale.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 // Render individual bar label if provided\n if (pointData.barLabel && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}-label`}\n x={xPoint + this._barWidth / 2}\n y={pointData.data >= this.Y_ORIGIN ? yPoint - 6 : yPoint + height + 12}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {pointData.barLabel}\n </text>,\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 return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - effectiveGroupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n private _createDataset = (barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n const linePointsByX: Record<string, IYValueHover[]> = {};\n const visitedX = new Set<string>();\n lineData.forEach(series => {\n series.data.forEach(point => {\n if (!linePointsByX[point.x]) {\n linePointsByX[point.x] = [];\n }\n linePointsByX[point.x].push({\n ...point,\n legend: series.legend,\n color: series.color,\n data: point.y,\n useSecondaryYScale: series.useSecondaryYScale,\n } as IYValueHover);\n });\n });\n\n barData.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 = [\n ...Object.values(legendToBarPoint),\n ...(linePointsByX[point.name] ?? []),\n ];\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n visitedX.add(point.name);\n });\n\n Object.keys(linePointsByX).forEach(xPoint => {\n if (!visitedX.has(xPoint)) {\n datasetForBars.push({\n xAxisPoint: xPoint,\n groupSeries: linePointsByX[xPoint],\n });\n }\n });\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._barLegends)\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 = (): JSXElement => {\n const actions: ILegend[] = [];\n\n const addLegendButton = (legendTitle: string, isLineLegendInBarChart?: boolean) => {\n const legend: ILegend = {\n title: legendTitle,\n color: this._legendColorMap[legendTitle][0],\n isLineLegendInBarChart,\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n };\n\n this._lineLegends.forEach(legendTitle => addLegendButton(legendTitle, true));\n this._barLegends.forEach(legendTitle => addLegendButton(legendTitle));\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 = calcTotalWidth(containerWidth, this.margins, MIN_DOMAIN_MARGIN);\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 = calcRequiredWidth(this._barWidth, this._barLegends.length, X1_INNER_PADDING);\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = calcRequiredWidth(groupWidth, this._xAxisLabels.length, this._xAxisInnerPadding);\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 = calcBandwidth(totalWidth, this._xAxisLabels.length, this._xAxisInnerPadding);\n const barBandwidth = calcBandwidth(groupBandwidth, this._barLegends.length, X1_INNER_PADDING);\n const barWidth = getBarWidth(this.props.barwidth, this.props.maxBarWidth, barBandwidth);\n const groupWidth = calcRequiredWidth(barWidth, this._barLegends.length, X1_INNER_PADDING);\n let reqWidth = calcRequiredWidth(groupWidth, this._xAxisLabels.length, this._xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\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 const margin2 = (totalWidth - reqWidth) / 2;\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(barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]): boolean {\n return !(\n (barData &&\n barData.length > 0 &&\n barData.filter((item: IGroupedVerticalBarChartData) => item.series.length).length > 0) ||\n (lineData && lineData.length > 0 && lineData.some(series => series.data.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 + calcTotalBandUnits(this._barLegends.length, X1_INNER_PADDING)),\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._barLegends.length} grouped bar series` +\n (this._lineLegends.length > 0 ? ` and ${this._lineLegends.length} line series. ` : '. ')\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 _prepareChartData = () => {\n let barData = this.props.data;\n let lineData: IGVBCLineSeries[] | undefined;\n\n if (Array.isArray(this.props.dataV2) && this.props.dataV2.length > 0) {\n ({ barData, lineData } = this._processDataV2(this.props.dataV2));\n }\n\n this._legendColorMap = {};\n let colorIndex = 0;\n\n return {\n barData:\n barData?.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 lineData:\n lineData?.map(series => {\n let color: string;\n if (typeof series.color === 'undefined') {\n color = getNextColor(colorIndex, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(series.color, this.props.theme?.isInverted);\n }\n\n if (!this._legendColorMap[series.legend]) {\n this._legendColorMap[series.legend] = [color, color];\n }\n colorIndex += 1;\n\n return {\n ...series,\n color: this._legendColorMap[series.legend][0],\n };\n }) ?? [],\n };\n };\n\n private _getOrderedXAxisLabels = (barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) => {\n if (this._xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(this._mapCategoryToValues(barData, lineData), this.props.xAxisCategoryOrder);\n };\n\n private _mapCategoryToValues = (barData: IGroupedVerticalBarChartData[], lineData: IGVBCLineSeries[]) => {\n const categoryToValues: Record<string, number[]> = {};\n barData.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 lineData.forEach(series => {\n series.data.forEach(point => {\n if (!categoryToValues[point.x]) {\n categoryToValues[point.x] = [];\n }\n categoryToValues[point.x].push(point.y);\n });\n });\n return categoryToValues;\n };\n\n private _createLines = (\n lineData: IGVBCLineSeries[],\n xScale: StringScale,\n yScalePrimary: NumericScale,\n yScaleSecondary?: NumericScale,\n ): React.ReactNode => {\n const lineBorders: React.ReactNode[] = [];\n const lines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n\n const scaleLineX = (x: string) => xScale(x)! + xScale.bandwidth() / 2;\n\n lineData.forEach((series, seriesIdx) => {\n const lineBorderGroup: React.ReactNode[] = [];\n const lineGroup: React.ReactNode[] = [];\n const dotGroup: React.ReactNode[] = [];\n const lineBorderWidth = series.lineOptions?.lineBorderWidth\n ? Number.parseFloat(series.lineOptions.lineBorderWidth.toString())\n : 0;\n const yScale = series.useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n const shouldHighlight = this._legendHighlighted(series.legend) || this._noLegendHighlighted();\n\n series.data.forEach((point, pointIdx) => {\n const x2 = scaleLineX(point.x);\n const y2 = yScale(point.y);\n\n if (pointIdx > 0) {\n const x1 = scaleLineX(series.data[pointIdx - 1].x);\n const y1 = yScale(series.data[pointIdx - 1].y);\n\n if (lineBorderWidth > 0) {\n lineBorderGroup.push(\n <line\n key={`lineBorder-${seriesIdx}-${pointIdx}`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n fill=\"transparent\"\n stroke={series.lineOptions?.lineBorderColor ?? this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3 + lineBorderWidth * 2}\n strokeLinecap=\"round\"\n opacity={shouldHighlight ? 1 : 0.1}\n />,\n );\n }\n\n lineGroup.push(\n <line\n key={`line-${seriesIdx}-${pointIdx}`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n stroke={series.color}\n strokeWidth={series.lineOptions?.strokeWidth ?? 3}\n strokeLinecap={series.lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={series.lineOptions?.strokeDasharray}\n opacity={shouldHighlight ? 1 : 0.1}\n onMouseOver={e => this._onLineHover(e, series, seriesIdx, pointIdx, scaleLineX)}\n onMouseLeave={this._onBarLeave}\n />,\n );\n }\n\n const dotId = this._getDotId(seriesIdx, pointIdx);\n const { activeLinePoint } = this.state;\n const isLinePointActive = activeLinePoint === point.x || activeLinePoint === dotId;\n\n dotGroup.push(\n <circle\n key={dotId}\n id={dotId}\n cx={x2}\n cy={y2}\n r={shouldHighlight && isLinePointActive ? 8 : 0.3}\n fill={this.props.theme!.semanticColors.bodyBackground}\n stroke={series.color}\n strokeWidth={3}\n opacity={shouldHighlight ? 1 : 0.1}\n onMouseOver={e => this._onLineHover(e, series, seriesIdx, pointIdx, scaleLineX)}\n onMouseLeave={this._onBarLeave}\n data-is-focusable={shouldHighlight}\n onFocus={e => this._onLineFocus(e, series, seriesIdx, pointIdx)}\n onBlur={this._onBarLeave}\n role=\"img\"\n aria-label={this._getAriaLabel(\n {\n xAxisCalloutData: point.xAxisCalloutData,\n legend: series.legend,\n yAxisCalloutData: point.yAxisCalloutData,\n data: point.y,\n callOutAccessibilityData: point.callOutAccessibilityData,\n } as IGVBarChartSeriesPoint,\n point.x,\n )}\n />,\n );\n });\n\n lineBorders.push(<g key={`lineBorderGroup-${seriesIdx}`}>{lineBorderGroup}</g>);\n lines.push(<g key={`lineGroup-${seriesIdx}`}>{lineGroup}</g>);\n dots.push(<g key={`dotGroup-${seriesIdx}`}>{dotGroup}</g>);\n });\n\n return dots.length > 0 ? (\n <g>\n {lineBorders.length > 0 ? <g>{lineBorders}</g> : null}\n {lines.length > 0 ? <g>{lines}</g> : null}\n <g>{dots}</g>\n </g>\n ) : null;\n };\n\n private _onLineHover = (\n event: React.MouseEvent<SVGElement>,\n series: IGVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n scaleLineX: (x: string) => number,\n ) => {\n const pointerX = d3Pointer(event, this._rectRef.current)[0];\n\n let closestPointIdx = pointIdx;\n if (pointIdx > 0) {\n const currPointPos = scaleLineX(series.data[pointIdx].x);\n const prevPointPos = scaleLineX(series.data[pointIdx - 1].x);\n\n if (Math.abs(prevPointPos - pointerX) < Math.abs(currPointPos - pointerX)) {\n closestPointIdx = pointIdx - 1;\n }\n }\n\n event.persist();\n this._showCalloutForLines(event, series, seriesIdx, closestPointIdx);\n };\n\n private _onLineFocus = (\n event: React.FocusEvent<SVGElement>,\n series: IGVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n ) => {\n this._showCalloutForLines(event.currentTarget, series, seriesIdx, pointIdx);\n };\n\n private _showCalloutForLines = (\n target: React.MouseEvent<SVGElement> | SVGElement,\n series: IGVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n ) => {\n const point = series.data[pointIdx];\n const pointData = {\n ...point,\n legend: series.legend,\n color: series.color!,\n key: series.legend,\n data: point.y,\n yAxisCalloutData: point.yAxisCalloutData as string | undefined,\n };\n const groupData = this._datasetForBars.find(\n (singleSet: { xAxisPoint: string }) => singleSet.xAxisPoint === point.x,\n );\n\n this._showCallout(target, pointData, groupData, this._getDotId(seriesIdx, pointIdx));\n };\n\n private _showCallout = (\n target: React.MouseEvent<SVGElement> | SVGElement,\n pointData: IGVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n activeLinePoint = '',\n ) => {\n this.setState({\n refSelected: target,\n isCalloutVisible: this._noLegendHighlighted() || this._legendHighlighted(pointData.legend),\n calloutLegend: pointData.legend,\n dataForHoverCard: pointData.data,\n color: pointData.color,\n xCalloutValue: pointData.xAxisCalloutData ?? groupData.xAxisPoint,\n yCalloutValue: pointData.yAxisCalloutData,\n dataPointCalloutProps: pointData,\n callOutAccessibilityData: this.props.isCalloutForStack\n ? groupData.stackCallOutAccessibilityData\n : pointData.callOutAccessibilityData,\n YValueHover: groupData.groupSeries.filter(\n (item: IYValueHover) => this._noLegendHighlighted() || this._legendHighlighted(item.legend!),\n ),\n hoverXValue: pointData.xAxisCalloutData ?? groupData.xAxisPoint,\n activeLinePoint: this.props.isCalloutForStack ? groupData.xAxisPoint : activeLinePoint,\n });\n };\n\n private _getDotId = (seriesIdx: number, pointIdx: number) => {\n return this._uniqDotId + `-${seriesIdx}-${pointIdx}`;\n };\n\n private _processDataV2 = (dataV2: (IBarSeries<string, number> | ILineSeries<string, number>)[]) => {\n const barPointsByX: Record<string, IGroupedVerticalBarChartData> = {};\n const lineData: IGVBCLineSeries[] = [];\n\n dataV2.forEach(series => {\n if (series.type === 'bar') {\n series.data.forEach(point => {\n if (!barPointsByX[point.x]) {\n barPointsByX[point.x] = { name: point.x, series: [] };\n }\n\n barPointsByX[point.x].series.push({\n key: series.key ?? series.legend,\n data: point.y,\n color: point.color ?? series.color,\n gradient: series.gradient,\n legend: series.legend,\n xAxisCalloutData: point.xAxisCalloutData,\n yAxisCalloutData: point.yAxisCalloutData,\n onClick: point.onClick,\n useSecondaryYScale: series.useSecondaryYScale,\n });\n });\n } else if (series.type === 'line') {\n lineData!.push(series);\n }\n });\n\n return { barData: Object.values(barPointsByX), lineData };\n };\n}\n"]}
@@ -10,16 +10,18 @@ export interface ILegendOverflowData {
10
10
  overflow?: ILegend[];
11
11
  }
12
12
  /**
13
- * @public
14
13
  * {@docCategory Legends}
14
+ *
15
+ * @public
15
16
  */
16
17
  export interface ILegendSubComponentStyles {
17
18
  hoverCardStyles: IStyleFunctionOrObject<IHoverCardStyleProps, IHoverCardStyles>;
18
19
  }
19
20
  /**
20
- * @public
21
21
  * Legends styles
22
22
  * {@docCategory Legends}
23
+ *
24
+ * @public
23
25
  */
24
26
  export interface ILegendsStyles {
25
27
  /**
@@ -64,9 +66,10 @@ export interface ILegendsStyles {
64
66
  subComponentStyles: ILegendSubComponentStyles;
65
67
  }
66
68
  /**
67
- * @public
68
69
  * ILegend interface
69
70
  * {@docCategory Legends}
71
+ *
72
+ * @public
70
73
  */
71
74
  export interface ILegend {
72
75
  /**
@@ -108,9 +111,10 @@ export interface ILegend {
108
111
  nativeButtonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;
109
112
  }
110
113
  /**
111
- * @public
112
114
  * Legend style properties
113
115
  * {@docCategory Legends}
116
+ *
117
+ * @public
114
118
  */
115
119
  export interface ILegendStyleProps {
116
120
  theme?: ITheme;
@@ -123,9 +127,10 @@ export interface ILegendStyleProps {
123
127
  isLineLegendInBarChart?: boolean;
124
128
  }
125
129
  /**
126
- * @public
127
130
  * Legend properties
128
131
  * {@docCategory Legends}
132
+ *
133
+ * @public
129
134
  */
130
135
  export interface ILegendsProps {
131
136
  /**
@@ -240,11 +245,12 @@ export interface ILegendsProps {
240
245
  ref?: IRefObject<ILegendContainer>;
241
246
  }
242
247
  /**
243
- * @public
244
248
  * The shape for the legend
245
249
  * default: show the rect legend
246
250
  * triangle: show the triangle legend
247
251
  * {@docCategory Legends}
252
+ *
253
+ * @public
248
254
  */
249
255
  export type LegendShape = 'default' | 'triangle' | keyof typeof Points | keyof typeof CustomPoints;
250
256
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Legends.types.js","sourceRoot":"../src/","sources":["components/Legends/Legends.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { ITheme, IStyle } from '@fluentui/react/lib/Styling';\nimport { IRefObject, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { IHoverCardStyleProps, IHoverCardStyles } from '@fluentui/react/lib/HoverCard';\nimport { IOverflowSetProps } from '@fluentui/react/lib/OverflowSet';\nimport { IFocusZoneProps } from '@fluentui/react-focus';\nimport { CustomPoints, Points } from '../../utilities/utilities';\n\nexport interface ILegendOverflowData {\n primary: ILegend[];\n\n overflow?: ILegend[];\n}\n\n/**\n * @public\n * {@docCategory Legends}\n */\nexport interface ILegendSubComponentStyles {\n hoverCardStyles: IStyleFunctionOrObject<IHoverCardStyleProps, IHoverCardStyles>;\n}\n\n/**\n * @public\n * Legends styles\n * {@docCategory Legends}\n */\nexport interface ILegendsStyles {\n /**\n * Style set for the root of the legend component\n */\n root: IStyle;\n\n /**\n * Style set for Legend. This is a wrapping class for text of legend and the rectange box that represents a legend\n */\n legend: IStyle;\n\n /**\n * Style set for the rectangle that represents a legend\n */\n rect: IStyle;\n\n /**\n * styles set for the shape that represents a legend\n */\n shape: IStyle;\n\n /**\n * Style set for the triangle that represents a legend\n */\n triangle: IStyle;\n\n /**\n * Style for the legend text\n */\n text: IStyle;\n\n /**\n * Style for the legend text\n */\n hoverChange: IStyle;\n\n /**\n * Style for the text that indicates the no.of legends that are in hovercard due to lack of space\n */\n overflowIndicationTextStyle: IStyle;\n\n /**\n * Style for the overflow container\n */\n hoverCardRoot: IStyle;\n\n /**\n * sub component styles\n */\n subComponentStyles: ILegendSubComponentStyles;\n}\n\n/**\n * @public\n * ILegend interface\n * {@docCategory Legends}\n */\nexport interface ILegend {\n /**\n * Defines the title of the legend\n */\n title: string;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n action?: VoidFunction;\n\n /**\n * Defines the function that is executed upon hovering over the legend\n */\n hoverAction?: VoidFunction;\n\n /**\n * Defines the function that is executed upon moving the mouse away from the legend\n */\n onMouseOutAction?: (isLegendFocused?: boolean) => void;\n\n /**\n * The color for the legend\n */\n color: string;\n\n /**\n * The opacity of the legend color\n */\n opacity?: number;\n\n /**\n * The shape for the legend\n */\n shape?: LegendShape;\n\n /**\n * Indicated whether or not to apply stripe pattern\n */\n stripePattern?: boolean;\n\n /**\n * Indicates if the legend belongs to a line in the Bar Chart\n */\n isLineLegendInBarChart?: boolean;\n\n /*\n * native button props for the legend button\n */\n nativeButtonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n}\n\n/**\n * @public\n * Legend style properties\n * {@docCategory Legends}\n */\nexport interface ILegendStyleProps {\n theme?: ITheme;\n className?: string;\n colorOnSelectedState?: string;\n borderColor?: string;\n opacity?: number;\n overflow?: boolean;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\n/**\n * @public\n * Legend properties\n * {@docCategory Legends}\n */\nexport interface ILegendsProps {\n /**\n * Prop that takes list of legends\n */\n legends: ILegend[];\n\n /**\n * Additional CSS class(es) to apply to the legneds component.\n */\n className?: string;\n\n /**\n * Theme (provided through customization.)\n */\n theme?: ITheme;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ILegendStyleProps, ILegendsStyles>;\n\n /**\n * This prop makes the legends component align itself to the center in the container it is sitting in\n */\n centerLegends?: boolean;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledWrapLines?: boolean;\n\n /**\n * props for the overflow set component\n */\n overflowProps?: Partial<IOverflowSetProps>;\n\n /**\n * focus zone props in hover card\n */\n focusZonePropsInHoverCard?: IFocusZoneProps;\n\n /**\n * text for overflow legends string\n */\n overflowText?: string;\n\n /**\n * prop that decides if legends are focusable\n * @default true\n */\n allowFocusOnLegends?: boolean;\n\n /**\n * prop that decide if we can select multiple legends or single legend at a time\n * @default false\n */\n canSelectMultipleLegends?: boolean;\n\n /**\n * Defines the function that is executed upon hiding of hover card\n * make sure to send prop when the prop is canSelectMultipleLegends is set to true\n * and empty the selected state legends\n */\n onLegendHoverCardLeave?: VoidFunction;\n\n /**\n * Callback issued when the selected option changes.\n */\n onChange?: (selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: ILegend) => void;\n\n /**\n * Keys (title) that will be initially used to set selected items. This prop is used for multi-select scenarios when\n * canSelectMultipleLegends is true; for single-select, use defaultSelectedLegend.\n *\n * Updating this prop does not change the selection after the component has been initialized. For controlled\n * selections, use selectedLegends instead.\n *\n * @see selectedLegends for setting the selected legends in controlled mode.\n * @see defaultSelectedLegend for setting the initially selected legend when canSelectMultipleLegends is false.\n */\n defaultSelectedLegends?: string[];\n\n /**\n * Key that will be initially used to set selected item. This prop is used for single-select scenarios when\n * canSelectMultipleLegends is false or unspecified; for multi-select, use defaultSelectedLegends.\n *\n * Updating this prop does not change the selection after the component has been initialized. For controlled\n * selections, use selectedLegend instead.\n *\n * @see selectedLegend for setting the selected legend in controlled mode.\n * @see defaultSelectedLegends for setting the initially selected legends when canSelectMultipleLegends is true.\n */\n defaultSelectedLegend?: string;\n\n /**\n * Keys (title) that will be used to set selected items in multi-select scenarios when canSelectMultipleLegends is\n * true. For single-select, use selectedLegend.\n *\n * When this prop is provided, the component is controlled and does not automatically update the selection based on\n * user interactions; the parent component must update the value passed to this property by handling the onChange\n * event.\n *\n * @see defaultSelectedLegends for setting the initially-selected legends in uncontrolled mode.\n * @see selectedLegends for setting the selected legends when `canSelectMultipleLegends` is `true`.\n */\n selectedLegends?: string[];\n\n /**\n * Key (title) that will be used to set the selected item in single-select scenarios when canSelectMultipleLegends is\n * false or unspecified. For multi-select, use selectedLegends.\n *\n * When this prop is provided, the component is controlled and does not automatically update the selection based on\n * user interactions; the parent component must update the value passed to this property by handling the onChange\n * event.\n *\n * @see defaultSelectedLegend for setting the initially-selected legend in uncontrolled mode.\n * @see selectedLegend for setting the selected legend when `canSelectMultipleLegends` is `false`.\n */\n selectedLegend?: string;\n\n /**\n * The shape for the legend.\n */\n shape?: LegendShape;\n\n /**\n * Callback to access the public methods and properties of the component.\n */\n ref?: IRefObject<ILegendContainer>;\n}\n\n/**\n * @public\n * The shape for the legend\n * default: show the rect legend\n * triangle: show the triangle legend\n * {@docCategory Legends}\n */\nexport type LegendShape = 'default' | 'triangle' | keyof typeof Points | keyof typeof CustomPoints;\n\n/**\n * {@docCategory Legends}\n */\nexport interface ILegendContainer {\n toSVG: (\n svgWidth: number,\n isRTL?: boolean,\n ) => {\n node: SVGSVGElement | null;\n width: number;\n height: number;\n };\n}\n"]}
1
+ {"version":3,"file":"Legends.types.js","sourceRoot":"../src/","sources":["components/Legends/Legends.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { ITheme, IStyle } from '@fluentui/react/lib/Styling';\nimport { IRefObject, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { IHoverCardStyleProps, IHoverCardStyles } from '@fluentui/react/lib/HoverCard';\nimport { IOverflowSetProps } from '@fluentui/react/lib/OverflowSet';\nimport { IFocusZoneProps } from '@fluentui/react-focus';\nimport { CustomPoints, Points } from '../../utilities/utilities';\n\nexport interface ILegendOverflowData {\n primary: ILegend[];\n\n overflow?: ILegend[];\n}\n\n/**\n * {@docCategory Legends}\n *\n * @public\n */\nexport interface ILegendSubComponentStyles {\n hoverCardStyles: IStyleFunctionOrObject<IHoverCardStyleProps, IHoverCardStyles>;\n}\n\n/**\n * Legends styles\n * {@docCategory Legends}\n *\n * @public\n */\nexport interface ILegendsStyles {\n /**\n * Style set for the root of the legend component\n */\n root: IStyle;\n\n /**\n * Style set for Legend. This is a wrapping class for text of legend and the rectange box that represents a legend\n */\n legend: IStyle;\n\n /**\n * Style set for the rectangle that represents a legend\n */\n rect: IStyle;\n\n /**\n * styles set for the shape that represents a legend\n */\n shape: IStyle;\n\n /**\n * Style set for the triangle that represents a legend\n */\n triangle: IStyle;\n\n /**\n * Style for the legend text\n */\n text: IStyle;\n\n /**\n * Style for the legend text\n */\n hoverChange: IStyle;\n\n /**\n * Style for the text that indicates the no.of legends that are in hovercard due to lack of space\n */\n overflowIndicationTextStyle: IStyle;\n\n /**\n * Style for the overflow container\n */\n hoverCardRoot: IStyle;\n\n /**\n * sub component styles\n */\n subComponentStyles: ILegendSubComponentStyles;\n}\n\n/**\n * ILegend interface\n * {@docCategory Legends}\n *\n * @public\n */\nexport interface ILegend {\n /**\n * Defines the title of the legend\n */\n title: string;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n action?: VoidFunction;\n\n /**\n * Defines the function that is executed upon hovering over the legend\n */\n hoverAction?: VoidFunction;\n\n /**\n * Defines the function that is executed upon moving the mouse away from the legend\n */\n onMouseOutAction?: (isLegendFocused?: boolean) => void;\n\n /**\n * The color for the legend\n */\n color: string;\n\n /**\n * The opacity of the legend color\n */\n opacity?: number;\n\n /**\n * The shape for the legend\n */\n shape?: LegendShape;\n\n /**\n * Indicated whether or not to apply stripe pattern\n */\n stripePattern?: boolean;\n\n /**\n * Indicates if the legend belongs to a line in the Bar Chart\n */\n isLineLegendInBarChart?: boolean;\n\n /*\n * native button props for the legend button\n */\n nativeButtonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n}\n\n/**\n * Legend style properties\n * {@docCategory Legends}\n *\n * @public\n */\nexport interface ILegendStyleProps {\n theme?: ITheme;\n className?: string;\n colorOnSelectedState?: string;\n borderColor?: string;\n opacity?: number;\n overflow?: boolean;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\n/**\n * Legend properties\n * {@docCategory Legends}\n *\n * @public\n */\nexport interface ILegendsProps {\n /**\n * Prop that takes list of legends\n */\n legends: ILegend[];\n\n /**\n * Additional CSS class(es) to apply to the legneds component.\n */\n className?: string;\n\n /**\n * Theme (provided through customization.)\n */\n theme?: ITheme;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ILegendStyleProps, ILegendsStyles>;\n\n /**\n * This prop makes the legends component align itself to the center in the container it is sitting in\n */\n centerLegends?: boolean;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledWrapLines?: boolean;\n\n /**\n * props for the overflow set component\n */\n overflowProps?: Partial<IOverflowSetProps>;\n\n /**\n * focus zone props in hover card\n */\n focusZonePropsInHoverCard?: IFocusZoneProps;\n\n /**\n * text for overflow legends string\n */\n overflowText?: string;\n\n /**\n * prop that decides if legends are focusable\n * @default true\n */\n allowFocusOnLegends?: boolean;\n\n /**\n * prop that decide if we can select multiple legends or single legend at a time\n * @default false\n */\n canSelectMultipleLegends?: boolean;\n\n /**\n * Defines the function that is executed upon hiding of hover card\n * make sure to send prop when the prop is canSelectMultipleLegends is set to true\n * and empty the selected state legends\n */\n onLegendHoverCardLeave?: VoidFunction;\n\n /**\n * Callback issued when the selected option changes.\n */\n onChange?: (selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: ILegend) => void;\n\n /**\n * Keys (title) that will be initially used to set selected items. This prop is used for multi-select scenarios when\n * canSelectMultipleLegends is true; for single-select, use defaultSelectedLegend.\n *\n * Updating this prop does not change the selection after the component has been initialized. For controlled\n * selections, use selectedLegends instead.\n *\n * @see selectedLegends for setting the selected legends in controlled mode.\n * @see defaultSelectedLegend for setting the initially selected legend when canSelectMultipleLegends is false.\n */\n defaultSelectedLegends?: string[];\n\n /**\n * Key that will be initially used to set selected item. This prop is used for single-select scenarios when\n * canSelectMultipleLegends is false or unspecified; for multi-select, use defaultSelectedLegends.\n *\n * Updating this prop does not change the selection after the component has been initialized. For controlled\n * selections, use selectedLegend instead.\n *\n * @see selectedLegend for setting the selected legend in controlled mode.\n * @see defaultSelectedLegends for setting the initially selected legends when canSelectMultipleLegends is true.\n */\n defaultSelectedLegend?: string;\n\n /**\n * Keys (title) that will be used to set selected items in multi-select scenarios when canSelectMultipleLegends is\n * true. For single-select, use selectedLegend.\n *\n * When this prop is provided, the component is controlled and does not automatically update the selection based on\n * user interactions; the parent component must update the value passed to this property by handling the onChange\n * event.\n *\n * @see defaultSelectedLegends for setting the initially-selected legends in uncontrolled mode.\n * @see selectedLegends for setting the selected legends when `canSelectMultipleLegends` is `true`.\n */\n selectedLegends?: string[];\n\n /**\n * Key (title) that will be used to set the selected item in single-select scenarios when canSelectMultipleLegends is\n * false or unspecified. For multi-select, use selectedLegends.\n *\n * When this prop is provided, the component is controlled and does not automatically update the selection based on\n * user interactions; the parent component must update the value passed to this property by handling the onChange\n * event.\n *\n * @see defaultSelectedLegend for setting the initially-selected legend in uncontrolled mode.\n * @see selectedLegend for setting the selected legend when `canSelectMultipleLegends` is `false`.\n */\n selectedLegend?: string;\n\n /**\n * The shape for the legend.\n */\n shape?: LegendShape;\n\n /**\n * Callback to access the public methods and properties of the component.\n */\n ref?: IRefObject<ILegendContainer>;\n}\n\n/**\n * The shape for the legend\n * default: show the rect legend\n * triangle: show the triangle legend\n * {@docCategory Legends}\n *\n * @public\n */\nexport type LegendShape = 'default' | 'triangle' | keyof typeof Points | keyof typeof CustomPoints;\n\n/**\n * {@docCategory Legends}\n */\nexport interface ILegendContainer {\n toSVG: (\n svgWidth: number,\n isRTL?: boolean,\n ) => {\n node: SVGSVGElement | null;\n width: number;\n height: number;\n };\n}\n"]}
@@ -422,7 +422,9 @@ var MultiStackedBarChartBase = /** @class */ (function (_super) {
422
422
  /**/
423
423
  };
424
424
  MultiStackedBarChartBase.prototype._redirectToUrl = function (href) {
425
- href ? (window.location.href = href) : '';
425
+ if (href && (0, index_3.isSafeUrl)(href)) {
426
+ window.location.href = href;
427
+ }
426
428
  };
427
429
  MultiStackedBarChartBase.prototype._isChartEmpty = function () {
428
430
  return !(this.props.data &&