@fluentui/react-charting 5.19.21 → 5.19.23

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 (98) hide show
  1. package/CHANGELOG.json +49 -1
  2. package/CHANGELOG.md +23 -2
  3. package/dist/react-charting.d.ts +14 -1
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +10 -1
  7. package/lib/components/AreaChart/AreaChart.base.js +1 -1
  8. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  9. package/lib/components/DonutChart/Arc/Arc.styles.js +2 -2
  10. package/lib/components/DonutChart/Arc/Arc.styles.js.map +1 -1
  11. package/lib/components/GaugeChart/GaugeChart.base.d.ts +10 -3
  12. package/lib/components/GaugeChart/GaugeChart.base.js +74 -37
  13. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  14. package/lib/components/GaugeChart/GaugeChart.styles.js +1 -1
  15. package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  16. package/lib/components/GaugeChart/GaugeChart.types.d.ts +13 -1
  17. package/lib/components/GaugeChart/GaugeChart.types.js +8 -0
  18. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  19. package/lib/components/Legends/Legends.base.js +2 -3
  20. package/lib/components/Legends/Legends.base.js.map +1 -1
  21. package/lib/components/Legends/Legends.styles.js +8 -4
  22. package/lib/components/Legends/Legends.styles.js.map +1 -1
  23. package/lib/components/LineChart/LineChart.base.js +7 -7
  24. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  25. package/lib/components/LineChart/eventAnnotation/LabelLink.js +1 -1
  26. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  27. package/lib/components/Sparkline/Sparkline.styles.js +1 -1
  28. package/lib/components/Sparkline/Sparkline.styles.js.map +1 -1
  29. package/lib/components/TreeChart/TreeChart.styles.js +5 -5
  30. package/lib/components/TreeChart/TreeChart.styles.js.map +1 -1
  31. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +2 -2
  32. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  33. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  34. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  35. package/lib/version.js +1 -1
  36. package/lib/version.js.map +1 -1
  37. package/lib-amd/components/AreaChart/AreaChart.base.js +1 -1
  38. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  39. package/lib-amd/components/DonutChart/Arc/Arc.styles.js +1 -1
  40. package/lib-amd/components/DonutChart/Arc/Arc.styles.js.map +1 -1
  41. package/lib-amd/components/GaugeChart/GaugeChart.base.d.ts +10 -3
  42. package/lib-amd/components/GaugeChart/GaugeChart.base.js +77 -37
  43. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  44. package/lib-amd/components/GaugeChart/GaugeChart.styles.js +1 -1
  45. package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  46. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +13 -1
  47. package/lib-amd/components/GaugeChart/GaugeChart.types.js +9 -1
  48. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  49. package/lib-amd/components/Legends/Legends.base.js +2 -3
  50. package/lib-amd/components/Legends/Legends.base.js.map +1 -1
  51. package/lib-amd/components/Legends/Legends.styles.js +8 -4
  52. package/lib-amd/components/Legends/Legends.styles.js.map +1 -1
  53. package/lib-amd/components/LineChart/LineChart.base.js +7 -7
  54. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  55. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js +1 -1
  56. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  57. package/lib-amd/components/Sparkline/Sparkline.styles.js +1 -1
  58. package/lib-amd/components/Sparkline/Sparkline.styles.js.map +1 -1
  59. package/lib-amd/components/TreeChart/TreeChart.styles.js +5 -5
  60. package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -1
  61. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +2 -2
  62. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  63. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  64. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  65. package/lib-amd/version.js +1 -1
  66. package/lib-amd/version.js.map +1 -1
  67. package/lib-commonjs/components/AreaChart/AreaChart.base.js +1 -1
  68. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  69. package/lib-commonjs/components/DonutChart/Arc/Arc.styles.js +1 -1
  70. package/lib-commonjs/components/DonutChart/Arc/Arc.styles.js.map +1 -1
  71. package/lib-commonjs/components/GaugeChart/GaugeChart.base.d.ts +10 -3
  72. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +77 -37
  73. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  74. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js +1 -1
  75. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  76. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +13 -1
  77. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +9 -1
  78. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  79. package/lib-commonjs/components/Legends/Legends.base.js +2 -3
  80. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  81. package/lib-commonjs/components/Legends/Legends.styles.js +8 -4
  82. package/lib-commonjs/components/Legends/Legends.styles.js.map +1 -1
  83. package/lib-commonjs/components/LineChart/LineChart.base.js +7 -7
  84. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  85. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +1 -1
  86. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  87. package/lib-commonjs/components/Sparkline/Sparkline.styles.js +1 -1
  88. package/lib-commonjs/components/Sparkline/Sparkline.styles.js.map +1 -1
  89. package/lib-commonjs/components/TreeChart/TreeChart.styles.js +5 -5
  90. package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -1
  91. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +2 -2
  92. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  93. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  94. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  95. package/lib-commonjs/version.js +1 -1
  96. package/lib-commonjs/version.js.map +1 -1
  97. package/package.json +3 -3
  98. package/src/components/GaugeChart/GaugeChart.types.ts +15 -1
@@ -94,6 +94,14 @@ export const DonutChart: React_2.FunctionComponent<IDonutChartProps>;
94
94
  // @public
95
95
  export const GaugeChart: React_2.FunctionComponent<IGaugeChartProps>;
96
96
 
97
+ // @public (undocumented)
98
+ export enum GaugeChartVariant {
99
+ // (undocumented)
100
+ MultipleSegments = "multiple-segments",
101
+ // (undocumented)
102
+ SingleSegment = "single-segment"
103
+ }
104
+
97
105
  // @public (undocumented)
98
106
  export enum GaugeValueFormat {
99
107
  // (undocumented)
@@ -474,7 +482,7 @@ export interface IGaugeChartProps {
474
482
  calloutProps?: Partial<ICalloutProps>;
475
483
  chartTitle?: string;
476
484
  chartValue: number;
477
- chartValueFormat?: GaugeValueFormat | ((sweepFraction: number[]) => string);
485
+ chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string);
478
486
  className?: string;
479
487
  culture?: string;
480
488
  height?: number;
@@ -489,6 +497,7 @@ export interface IGaugeChartProps {
489
497
  styles?: IStyleFunctionOrObject<IGaugeChartStyleProps, IGaugeChartStyles>;
490
498
  sublabel?: string;
491
499
  theme?: ITheme;
500
+ variant?: GaugeChartVariant;
492
501
  width?: number;
493
502
  }
494
503
 
@@ -345,7 +345,7 @@ var AreaChartBase = /** @class */ (function (_super) {
345
345
  if (_this.state.nearestCircleToHighlight === xDataPoint || _this.state.activePoint === circleId) {
346
346
  _this._highlightedCircleId = circleId;
347
347
  if (!_this.state.isCircleClicked) {
348
- fillColor = _this.props.theme.palette.white;
348
+ fillColor = _this.props.theme.semanticColors.bodyBackground;
349
349
  }
350
350
  }
351
351
  return fillColor;
@@ -1 +1 @@
1
- {"version":3,"file":"AreaChart.base.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,KAAK,IAAI,OAAO,EAAE,cAAc,IAAI,YAAY,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAEL,cAAc,GAUf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAW,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,IAAM,aAAa,GAAG,kBAAkB,EAA0C,CAAC;AAEnF,8DAA8D;AAC9D,IAAM,MAAM,GAAG,QAAQ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IAAM,aAAa,GAAG,KAAK,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACnF,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,aAAa,CAAC;QACvD,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,CAAC,CAAC;QACjD,OAAO,CAAA,MAAA,KAAK,CAAC,wBAAwB,0CAAE,SAAS,KAAI,UAAG,MAAM,eAAK,MAAM,eAAK,MAAM,MAAG,CAAC;IACzF,CAAC;IAEO,qCAAa,GAArB;QACE,OAAO,CAAC,CACN,CACE,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa;YAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;YACxC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAtB,CAAsB,CAAC,CAAC,MAAM,KAAK,CAAC,CAClF;QACD,oCAAoC;QACpC,+FAA+F;QAC/F,iCAAiC;SAClC,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAv0BD,CAAmC,KAAK,CAAC,SAAS,GAu0BjD","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, bisector } from 'd3-array';\nimport { clientPoint } from 'd3-selection';\nimport { select as d3Select } from 'd3-selection';\nimport { area as d3Area, stack as d3Stack, curveMonotoneX as d3CurveBasis, line as d3Line } from 'd3-shape';\nimport { classNamesFunction, find, getId, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ICustomizedCalloutData,\n IAreaChartProps,\n IBasestate,\n ILineChartDataPoint,\n ILineChartPoints,\n IChildProps,\n IMargins,\n IAreaChartStyleProps,\n IAreaChartStyles,\n} from '../../index';\nimport { warnDeprecations } from '@fluentui/react/lib/Utilities';\nimport {\n calloutData,\n getXAxisType,\n ChartTypes,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n getNextColor,\n getColorFromToken,\n} from '../../utilities/index';\nimport { ILegend, Legends } from '../Legends/index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\n\nconst getClassNames = classNamesFunction<IAreaChartStyleProps, IAreaChartStyles>();\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst COMPONENT_NAME = 'AREA CHART';\n\nenum InterceptVisibility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nexport interface IAreaChartAreaPoint {\n xVal: string | number;\n values: IAreaChartDataSetPoint;\n}\nexport interface IAreaChartDataSetPoint {\n [key: string]: number | string;\n}\nexport interface IDPointType {\n values: { 0: number; 1: number; data: {} };\n xVal: number | Date;\n}\nexport interface IMapXToDataSet {\n [key: string]: ILineChartDataPoint[];\n [key: number]: ILineChartDataPoint[];\n}\n\n//by default d3-shape 3.2.0 limits the< path> data point precision to 3 digits(d3/d3-path#10)\n\nexport interface IAreaChartState extends IBasestate {\n lineXValue: number;\n displayOfLine: InterceptVisibility;\n isCircleClicked: boolean;\n dataPointCalloutProps?: ICustomizedCalloutData;\n stackCalloutProps?: ICustomizedCalloutData;\n nearestCircleToHighlight: number | string | Date | null;\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n isShowCalloutPending: boolean;\n /** focused point */\n activePoint: string;\n}\n\nexport class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartState> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any;\n private _createSet: (data: ILineChartPoints[]) => {\n colors: string[];\n opacity: number[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedInfo: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPoints: any;\n };\n private _colors: string[];\n private _opacity: number[];\n private _uniqueIdForGraph: string;\n private _verticalLineId: string;\n private _circleId: string;\n private _uniqueCallOutID: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _stackedData: any;\n private _chart: JSX.Element[];\n private margins: IMargins;\n private _rectId: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisRectScale: any;\n // determines if the given area chart has multiple stacked bar charts\n private _isMultiStackChart: boolean;\n private _tooltipId: string;\n private _highlightedCircleId: string;\n //enableComputationOptimization is used for optimized code to group data points by x value\n //from O(n^2) to O(n) using a map.\n private _enableComputationOptimization: boolean;\n private _firstRenderOptimization: boolean;\n private _emptyChartId: string;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n this._createSet = memoizeFunction(this._createDataSet);\n this.state = {\n selectedLegend: '',\n activeLegend: '',\n hoverXValue: '',\n isCalloutVisible: false,\n refSelected: null,\n YValueHover: [],\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n nearestCircleToHighlight: null,\n isShowCalloutPending: false,\n activePoint: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n });\n this._uniqueIdForGraph = getId('areaChart_');\n this._verticalLineId = getId('verticalLine_');\n this._circleId = getId('circle');\n this._rectId = getId('rectangle');\n this._tooltipId = getId('AreaChartTooltipID');\n this._enableComputationOptimization = true;\n this._firstRenderOptimization = true;\n this._emptyChartId = getId('_AreaChart_empty');\n }\n\n public componentDidUpdate() {\n if (this.state.isShowCalloutPending) {\n this.setState({\n refSelected: `#${this._highlightedCircleId}`,\n isCalloutVisible: true,\n isShowCalloutPending: false,\n });\n }\n }\n\n public render(): JSX.Element {\n if (!this._isChartEmpty()) {\n const { lineChartData, chartTitle } = this.props.data;\n const points = this._addDefaultColors(lineChartData);\n const { colors, opacity, stackedInfo, calloutPoints } = this._createSet(points);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n this._colors = colors;\n this._opacity = opacity;\n this._stackedData = stackedInfo.stackedData;\n const legends: JSX.Element = this._getLegendData(points);\n\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n gapSpace: 15,\n isBeakVisible: false,\n onDismiss: this._closeCallout,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n return (\n <CartesianChart\n {...this.props}\n chartTitle={chartTitle}\n points={points}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n isCalloutForStack\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={stackedInfo.maxOfYVal}\n getGraphData={this._getGraphData}\n getmargins={this._getMargins}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n enableFirstRenderOptimization={this.props.enablePerfOptimization && this._firstRenderOptimization}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisRectScale = props.xScale;\n const ticks = this._xAxisRectScale.ticks();\n const width1 = this._xAxisRectScale(ticks[ticks.length - 1]);\n const rectHeight = props.containerHeight! - this.margins.top!;\n return (\n <>\n <g>\n <rect\n id={this._rectId}\n width={width1}\n height={rectHeight}\n fill={'transparent'}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n </g>\n <g>{this._chart}</g>\n </>\n );\n }}\n />\n );\n }\n return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _onRectMouseMove = (mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>) => {\n mouseEvent.persist();\n const { data } = this.props;\n const { lineChartData } = data;\n // This will get the value of the X when mouse is on the chart\n const xOffset = this._xAxisRectScale.invert(clientPoint(document.getElementById(this._rectId)!, mouseEvent)[0]);\n const i = bisect(lineChartData![0].data, xOffset);\n const d0 = lineChartData![0].data[i - 1] as ILineChartDataPoint;\n const d1 = lineChartData![0].data[i] as ILineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n pointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n pointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData, xAxisCalloutAccessibilityData } = lineChartData![0].data[index as number];\n const formattedDate = pointToHighlight instanceof Date ? pointToHighlight.toLocaleString() : pointToHighlight;\n const modifiedXVal = pointToHighlight instanceof Date ? pointToHighlight.getTime() : pointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(this._calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const nearestCircleToHighlight =\n axisType === XAxisTypes.DateAxis ? (pointToHighlight as Date).getTime() : pointToHighlight;\n const pointToHighlightUpdated = this.state.nearestCircleToHighlight !== nearestCircleToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated && !this.state.isShowCalloutPending) {\n this.setState({\n nearestCircleToHighlight: nearestCircleToHighlight,\n isCalloutVisible: false,\n isShowCalloutPending: true,\n lineXValue: this._xAxisRectScale(pointToHighlight),\n displayOfLine: InterceptVisibility.show,\n isCircleClicked: false,\n stackCalloutProps: found!,\n YValueHover: found.values,\n dataPointCalloutProps: found!,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n xAxisCalloutAccessibilityData,\n activePoint: '',\n });\n } else {\n /*\n When above if condition is false but found=true, it means either\n\n 1). pointToHighlightUpdated is false.\n For this case we dont need to do anything.\n\n 2). isShowCalloutPending is true.\n For this case there will be no callout updation for the event.\n This condition has been added to prevent repeated callout flashing.\n Currently there is a fraction of second delay between hover event and subsequent callout refresh.\n In the meantime if another event is received, the callout continues to flash for the set of\n intermediate hover events.\n\n This does not cause any issue as the user interaction takes atleast a fraction of second and the final\n callout state is ultimately achieved.\n If a user performs very swift mouse maneuver, the intermediate events will be lost but the callout experience\n remains smooth.\n */\n }\n if (!found) {\n this.setState({\n isCalloutVisible: false,\n nearestCircleToHighlight: nearestCircleToHighlight,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n });\n }\n };\n /**\n * just cleaning up the state which we have set in the mouse move event\n */\n private _onRectMouseOut = () => {\n /**/\n };\n\n private _handleChartMouseLeave = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n nearestCircleToHighlight: null,\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n hoverXValue: undefined,\n YValueHover: [],\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getStackedData = (keys: string[], dataSet: any) => {\n const stackedValues = d3Stack().keys(keys)(dataSet);\n const maxOfYVal = d3Max(stackedValues[stackedValues.length - 1], dp => dp[1])!;\n const stackedData: Array<IAreaChartDataSetPoint[]> = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedValues.forEach((layer: any) => {\n const currentStack: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentStack.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n stackedData.push(currentStack);\n });\n this._isMultiStackChart = stackedData && stackedData.length > 1 ? true : false;\n return {\n stackedData,\n maxOfYVal,\n };\n };\n\n private _createDataSet = (points: ILineChartPoints[]) => {\n if (this.props.enablePerfOptimization && this._enableComputationOptimization) {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n const mapOfXvalToListOfDataPoints: IMapXToDataSet = {};\n allChartPoints.forEach((dataPoint: ILineChartDataPoint) => {\n const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;\n // map of x value to the list of data points which share the same x value .\n if (mapOfXvalToListOfDataPoints[xValue]) {\n mapOfXvalToListOfDataPoints[xValue].push(dataPoint);\n } else {\n mapOfXvalToListOfDataPoints[xValue] = [dataPoint];\n }\n });\n\n Object.keys(mapOfXvalToListOfDataPoints).forEach((key: number | string) => {\n const value: ILineChartDataPoint[] = mapOfXvalToListOfDataPoints[key];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n value.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n });\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n } else {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n let tempArr = allChartPoints;\n while (tempArr.length) {\n const valToCheck = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n const filteredChartPoints: ILineChartDataPoint[] = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) === valToCheck,\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n filteredChartPoints.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n // removing compared objects from array\n const val = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n tempArr = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) !== val,\n );\n }\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n }\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xAxis: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxis: any,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._chart = this._drawGraph(containerHeight, xAxis, yAxis, xElement!);\n };\n\n private _onLegendClick(legend: string): void {\n if (this.state.selectedLegend === legend) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legend,\n });\n }\n }\n\n private _onLegendHover(legend: string): void {\n this.setState({\n activeLegend: legend,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (points: ILineChartPoints[]): JSX.Element => {\n const data = points;\n const actions: ILegend[] = [];\n\n data.forEach((singleChartData: ILineChartPoints) => {\n const color: string = singleChartData.color!;\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === singleChartData.legend && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: singleChartData.legend,\n color: color,\n action: () => {\n this._onLegendClick(singleChartData.legend);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n />\n );\n };\n\n private _onDataPointClick = (func: (() => void) | undefined) => {\n if (func) {\n func();\n }\n this.setState({ isCircleClicked: true });\n };\n\n private _getOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 0.7;\n } else {\n const opacity = this._legendHighlighted(legend) || this._noLegendHighlighted() ? 0.7 : 0.1;\n return opacity;\n }\n };\n\n private _getLineOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 1;\n } else {\n let opacity = 0.3;\n if (this.state.isCalloutVisible) {\n opacity = 1;\n }\n if (!this._noLegendHighlighted()) {\n opacity = this._legendHighlighted(legend) ? 0 : 0.1;\n }\n return opacity;\n }\n };\n\n private _updateCircleFillColor = (xDataPoint: number | Date, lineColor: string, circleId: string): string => {\n let fillColor = lineColor;\n if (this.state.nearestCircleToHighlight === xDataPoint || this.state.activePoint === circleId) {\n this._highlightedCircleId = circleId;\n if (!this.state.isCircleClicked) {\n fillColor = this.props.theme!.palette.white;\n }\n }\n\n return fillColor;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _drawGraph = (containerHeight: number, xScale: any, yScale: any, xElement: SVGElement): JSX.Element[] => {\n const points = this._addDefaultColors(this.props.data.lineChartData);\n const { pointOptions, pointLineOptions } = this.props.data;\n const area = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((d: any) => yScale(d.values[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n graph.push(\n <React.Fragment key={`${index}-graph-${this._uniqueIdForGraph}`}>\n <path\n id={`${index}-line-${this._uniqueIdForGraph}`}\n d={line(singleStackedData)!}\n fill={'transparent'}\n strokeWidth={3}\n stroke={this._colors[index]}\n opacity={this._getLineOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...points[index]!.lineOptions}\n />\n {singleStackedData.length === 1 ? (\n <circle\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n cx={xScale(singleStackedData[0].xVal)}\n cy={yScale(singleStackedData[0].values[1])}\n r={6}\n stroke={this._colors[index]}\n strokeWidth={3}\n fill={this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n ) : (\n <path\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...(this.props.optimizeLargeData && {\n 'data-is-focusable': this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted(),\n role: 'img',\n 'aria-label': `${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`,\n })}\n />\n )}\n </React.Fragment>,\n );\n });\n\n const circleRadius = pointOptions && pointOptions.r ? Number(pointOptions.r) : 8;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n if (points.length === index) {\n return;\n }\n\n if (!this.props.optimizeLargeData || singleStackedData.length === 1) {\n // Render circles for all data points\n graph.push(\n <g key={`${index}-dots-${this._uniqueIdForGraph}`} d={area(singleStackedData)!} clipPath=\"url(#clip)\">\n {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color!;\n return (\n <circle\n key={circleId}\n id={circleId}\n data-is-focusable={this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted()}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n onFocus={() => this._handleFocus(index, pointIndex, circleId)}\n onBlur={this._handleBlur}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n role=\"img\"\n aria-label={this._getAriaLabel(index, pointIndex)}\n />\n );\n })}\n </g>,\n );\n } else {\n // Render circles for data points close to the mouse pointer only\n singleStackedData.forEach((singlePoint: IDPointType, pointIndex: number) => {\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n if (this.state.nearestCircleToHighlight === xDataPoint) {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n graph.push(\n <circle\n key={circleId}\n id={circleId}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n />,\n );\n }\n });\n }\n });\n graph.push(\n <line\n id={this._verticalLineId}\n key={this._verticalLineId}\n x1={this.state.lineXValue}\n y1={0}\n x2={this.state.lineXValue}\n y2={containerHeight}\n strokeWidth={1}\n strokeDasharray={5.5}\n stroke={lineColor!}\n opacity={0.5}\n visibility={this.state.displayOfLine}\n {...pointLineOptions}\n />,\n );\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return graph;\n };\n\n private _getCircleRadius = (xDataPoint: number, circleRadius: number, circleId: string): number => {\n const { isCircleClicked, nearestCircleToHighlight, activePoint } = this.state;\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {\n return circleRadius;\n } else {\n return 0;\n }\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\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 = (legend: string) => {\n return (\n this.state.selectedLegend === legend || (this.state.selectedLegend === '' && this.state.activeLegend === legend)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _addDefaultColors = (lineChartData?: ILineChartPoints[]): ILineChartPoints[] => {\n return lineChartData\n ? lineChartData.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n\n private _handleFocus = (lineIndex: number, pointIndex: number, circleId: string) => {\n const { x, y, xAxisCalloutData } = this.props.data.lineChartData![lineIndex].data[pointIndex];\n const formattedDate = x instanceof Date ? x.toLocaleString() : x;\n const modifiedXVal = x instanceof Date ? x.getTime() : x;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = this._calloutPoints.find((e: { x: string | number }) => e.x === modifiedXVal);\n // Show details in the callout for the focused point only\n found.values = found.values.filter((e: { y: number }) => e.y === y);\n\n this.setState({\n refSelected: `#${circleId}`,\n isCalloutVisible: true,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n YValueHover: found.values,\n stackCalloutProps: found,\n dataPointCalloutProps: found,\n activePoint: circleId,\n });\n };\n\n private _handleBlur = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n hoverXValue: undefined,\n YValueHover: [],\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n activePoint: '',\n });\n };\n\n private _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = this.props.data.lineChartData![lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? point.x.toLocaleString() : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n private _isChartEmpty(): boolean {\n return !(\n (\n this.props.data &&\n this.props.data.lineChartData &&\n this.props.data.lineChartData.length > 0 &&\n this.props.data.lineChartData.filter(item => item.data.length === 0).length === 0\n )\n // if all the data sets have no data\n // filtering all items which have no data and checking if the length of the filtered array is 0\n // which means chart is not empty\n );\n }\n}\n"]}
1
+ {"version":3,"file":"AreaChart.base.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,KAAK,IAAI,OAAO,EAAE,cAAc,IAAI,YAAY,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAEL,cAAc,GAUf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAW,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,IAAM,aAAa,GAAG,kBAAkB,EAA0C,CAAC;AAEnF,8DAA8D;AAC9D,IAAM,MAAM,GAAG,QAAQ,CAAC,UAAC,CAAM,IAAK,OAAA,CAAC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AAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACnF,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,aAAa,CAAC;QACvD,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,CAAC,CAAC;QACjD,OAAO,CAAA,MAAA,KAAK,CAAC,wBAAwB,0CAAE,SAAS,KAAI,UAAG,MAAM,eAAK,MAAM,eAAK,MAAM,MAAG,CAAC;IACzF,CAAC;IAEO,qCAAa,GAArB;QACE,OAAO,CAAC,CACN,CACE,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa;YAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;YACxC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAtB,CAAsB,CAAC,CAAC,MAAM,KAAK,CAAC,CAClF;QACD,oCAAoC;QACpC,+FAA+F;QAC/F,iCAAiC;SAClC,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAv0BD,CAAmC,KAAK,CAAC,SAAS,GAu0BjD","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, bisector } from 'd3-array';\nimport { clientPoint } from 'd3-selection';\nimport { select as d3Select } from 'd3-selection';\nimport { area as d3Area, stack as d3Stack, curveMonotoneX as d3CurveBasis, line as d3Line } from 'd3-shape';\nimport { classNamesFunction, find, getId, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ICustomizedCalloutData,\n IAreaChartProps,\n IBasestate,\n ILineChartDataPoint,\n ILineChartPoints,\n IChildProps,\n IMargins,\n IAreaChartStyleProps,\n IAreaChartStyles,\n} from '../../index';\nimport { warnDeprecations } from '@fluentui/react/lib/Utilities';\nimport {\n calloutData,\n getXAxisType,\n ChartTypes,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n getNextColor,\n getColorFromToken,\n} from '../../utilities/index';\nimport { ILegend, Legends } from '../Legends/index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\n\nconst getClassNames = classNamesFunction<IAreaChartStyleProps, IAreaChartStyles>();\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst COMPONENT_NAME = 'AREA CHART';\n\nenum InterceptVisibility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nexport interface IAreaChartAreaPoint {\n xVal: string | number;\n values: IAreaChartDataSetPoint;\n}\nexport interface IAreaChartDataSetPoint {\n [key: string]: number | string;\n}\nexport interface IDPointType {\n values: { 0: number; 1: number; data: {} };\n xVal: number | Date;\n}\nexport interface IMapXToDataSet {\n [key: string]: ILineChartDataPoint[];\n [key: number]: ILineChartDataPoint[];\n}\n\n//by default d3-shape 3.2.0 limits the< path> data point precision to 3 digits(d3/d3-path#10)\n\nexport interface IAreaChartState extends IBasestate {\n lineXValue: number;\n displayOfLine: InterceptVisibility;\n isCircleClicked: boolean;\n dataPointCalloutProps?: ICustomizedCalloutData;\n stackCalloutProps?: ICustomizedCalloutData;\n nearestCircleToHighlight: number | string | Date | null;\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n isShowCalloutPending: boolean;\n /** focused point */\n activePoint: string;\n}\n\nexport class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartState> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any;\n private _createSet: (data: ILineChartPoints[]) => {\n colors: string[];\n opacity: number[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedInfo: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPoints: any;\n };\n private _colors: string[];\n private _opacity: number[];\n private _uniqueIdForGraph: string;\n private _verticalLineId: string;\n private _circleId: string;\n private _uniqueCallOutID: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _stackedData: any;\n private _chart: JSX.Element[];\n private margins: IMargins;\n private _rectId: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisRectScale: any;\n // determines if the given area chart has multiple stacked bar charts\n private _isMultiStackChart: boolean;\n private _tooltipId: string;\n private _highlightedCircleId: string;\n //enableComputationOptimization is used for optimized code to group data points by x value\n //from O(n^2) to O(n) using a map.\n private _enableComputationOptimization: boolean;\n private _firstRenderOptimization: boolean;\n private _emptyChartId: string;\n\n public constructor(props: IAreaChartProps) {\n super(props);\n this._createSet = memoizeFunction(this._createDataSet);\n this.state = {\n selectedLegend: '',\n activeLegend: '',\n hoverXValue: '',\n isCalloutVisible: false,\n refSelected: null,\n YValueHover: [],\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n nearestCircleToHighlight: null,\n isShowCalloutPending: false,\n activePoint: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n showYAxisGridLines: 'Dont use this property. Lines are drawn by default',\n });\n this._uniqueIdForGraph = getId('areaChart_');\n this._verticalLineId = getId('verticalLine_');\n this._circleId = getId('circle');\n this._rectId = getId('rectangle');\n this._tooltipId = getId('AreaChartTooltipID');\n this._enableComputationOptimization = true;\n this._firstRenderOptimization = true;\n this._emptyChartId = getId('_AreaChart_empty');\n }\n\n public componentDidUpdate() {\n if (this.state.isShowCalloutPending) {\n this.setState({\n refSelected: `#${this._highlightedCircleId}`,\n isCalloutVisible: true,\n isShowCalloutPending: false,\n });\n }\n }\n\n public render(): JSX.Element {\n if (!this._isChartEmpty()) {\n const { lineChartData, chartTitle } = this.props.data;\n const points = this._addDefaultColors(lineChartData);\n const { colors, opacity, stackedInfo, calloutPoints } = this._createSet(points);\n this._calloutPoints = calloutPoints;\n const isXAxisDateType = getXAxisType(points);\n this._colors = colors;\n this._opacity = opacity;\n this._stackedData = stackedInfo.stackedData;\n const legends: JSX.Element = this._getLegendData(points);\n\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n\n const calloutProps = {\n target: this.state.refSelected,\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n gapSpace: 15,\n isBeakVisible: false,\n onDismiss: this._closeCallout,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n return (\n <CartesianChart\n {...this.props}\n chartTitle={chartTitle}\n points={points}\n chartType={ChartTypes.AreaChart}\n calloutProps={calloutProps}\n legendBars={legends}\n isCalloutForStack\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n tickParams={tickParams}\n maxOfYVal={stackedInfo.maxOfYVal}\n getGraphData={this._getGraphData}\n getmargins={this._getMargins}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n enableFirstRenderOptimization={this.props.enablePerfOptimization && this._firstRenderOptimization}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisRectScale = props.xScale;\n const ticks = this._xAxisRectScale.ticks();\n const width1 = this._xAxisRectScale(ticks[ticks.length - 1]);\n const rectHeight = props.containerHeight! - this.margins.top!;\n return (\n <>\n <g>\n <rect\n id={this._rectId}\n width={width1}\n height={rectHeight}\n fill={'transparent'}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n </g>\n <g>{this._chart}</g>\n </>\n );\n }}\n />\n );\n }\n return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _onRectMouseMove = (mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>) => {\n mouseEvent.persist();\n const { data } = this.props;\n const { lineChartData } = data;\n // This will get the value of the X when mouse is on the chart\n const xOffset = this._xAxisRectScale.invert(clientPoint(document.getElementById(this._rectId)!, mouseEvent)[0]);\n const i = bisect(lineChartData![0].data, xOffset);\n const d0 = lineChartData![0].data[i - 1] as ILineChartDataPoint;\n const d1 = lineChartData![0].data[i] as ILineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let pointToHighlight: string | Date | number | null = null;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n pointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n pointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n pointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData, xAxisCalloutAccessibilityData } = lineChartData![0].data[index as number];\n const formattedDate = pointToHighlight instanceof Date ? pointToHighlight.toLocaleString() : pointToHighlight;\n const modifiedXVal = pointToHighlight instanceof Date ? pointToHighlight.getTime() : pointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(this._calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const nearestCircleToHighlight =\n axisType === XAxisTypes.DateAxis ? (pointToHighlight as Date).getTime() : pointToHighlight;\n const pointToHighlightUpdated = this.state.nearestCircleToHighlight !== nearestCircleToHighlight;\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated && !this.state.isShowCalloutPending) {\n this.setState({\n nearestCircleToHighlight: nearestCircleToHighlight,\n isCalloutVisible: false,\n isShowCalloutPending: true,\n lineXValue: this._xAxisRectScale(pointToHighlight),\n displayOfLine: InterceptVisibility.show,\n isCircleClicked: false,\n stackCalloutProps: found!,\n YValueHover: found.values,\n dataPointCalloutProps: found!,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n xAxisCalloutAccessibilityData,\n activePoint: '',\n });\n } else {\n /*\n When above if condition is false but found=true, it means either\n\n 1). pointToHighlightUpdated is false.\n For this case we dont need to do anything.\n\n 2). isShowCalloutPending is true.\n For this case there will be no callout updation for the event.\n This condition has been added to prevent repeated callout flashing.\n Currently there is a fraction of second delay between hover event and subsequent callout refresh.\n In the meantime if another event is received, the callout continues to flash for the set of\n intermediate hover events.\n\n This does not cause any issue as the user interaction takes atleast a fraction of second and the final\n callout state is ultimately achieved.\n If a user performs very swift mouse maneuver, the intermediate events will be lost but the callout experience\n remains smooth.\n */\n }\n if (!found) {\n this.setState({\n isCalloutVisible: false,\n nearestCircleToHighlight: nearestCircleToHighlight,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n });\n }\n };\n /**\n * just cleaning up the state which we have set in the mouse move event\n */\n private _onRectMouseOut = () => {\n /**/\n };\n\n private _handleChartMouseLeave = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n nearestCircleToHighlight: null,\n lineXValue: 0,\n displayOfLine: InterceptVisibility.hide,\n isCircleClicked: false,\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n hoverXValue: undefined,\n YValueHover: [],\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getStackedData = (keys: string[], dataSet: any) => {\n const stackedValues = d3Stack().keys(keys)(dataSet);\n const maxOfYVal = d3Max(stackedValues[stackedValues.length - 1], dp => dp[1])!;\n const stackedData: Array<IAreaChartDataSetPoint[]> = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stackedValues.forEach((layer: any) => {\n const currentStack: IAreaChartDataSetPoint[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n layer.forEach((d: any) => {\n currentStack.push({\n values: d,\n xVal: d.data.xVal,\n });\n });\n stackedData.push(currentStack);\n });\n this._isMultiStackChart = stackedData && stackedData.length > 1 ? true : false;\n return {\n stackedData,\n maxOfYVal,\n };\n };\n\n private _createDataSet = (points: ILineChartPoints[]) => {\n if (this.props.enablePerfOptimization && this._enableComputationOptimization) {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n const mapOfXvalToListOfDataPoints: IMapXToDataSet = {};\n allChartPoints.forEach((dataPoint: ILineChartDataPoint) => {\n const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;\n // map of x value to the list of data points which share the same x value .\n if (mapOfXvalToListOfDataPoints[xValue]) {\n mapOfXvalToListOfDataPoints[xValue].push(dataPoint);\n } else {\n mapOfXvalToListOfDataPoints[xValue] = [dataPoint];\n }\n });\n\n Object.keys(mapOfXvalToListOfDataPoints).forEach((key: number | string) => {\n const value: ILineChartDataPoint[] = mapOfXvalToListOfDataPoints[key];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n value.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n });\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n } else {\n const allChartPoints: ILineChartDataPoint[] = [];\n const dataSet: IAreaChartDataSetPoint[] = [];\n const colors: string[] = [];\n const opacity: number[] = [];\n const calloutPoints = calloutData(points!);\n\n points &&\n points.length &&\n points.forEach((singleChartPoint: ILineChartPoints) => {\n colors.push(singleChartPoint.color!);\n opacity.push(singleChartPoint.opacity || 1);\n allChartPoints.push(...singleChartPoint.data);\n });\n\n let tempArr = allChartPoints;\n while (tempArr.length) {\n const valToCheck = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n const filteredChartPoints: ILineChartDataPoint[] = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) === valToCheck,\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDataset: any = {};\n filteredChartPoints.forEach((singleDataPoint: ILineChartDataPoint, index: number) => {\n singleDataset.xVal = singleDataPoint.x;\n singleDataset[`chart${index}`] = singleDataPoint.y;\n });\n dataSet.push(singleDataset);\n // removing compared objects from array\n const val = tempArr[0].x instanceof Date ? tempArr[0].x.toLocaleString() : tempArr[0].x;\n tempArr = tempArr.filter(\n (point: ILineChartDataPoint) => (point.x instanceof Date ? point.x.toLocaleString() : point.x) !== val,\n );\n }\n\n // get keys from dataset, used to create stacked data\n const keysLength: number = dataSet && Object.keys(dataSet[0])!.length;\n const keys: string[] = [];\n for (let i = 0; i < keysLength - 1; i++) {\n const keyVal = `chart${i}`;\n keys.push(keyVal);\n }\n\n // Stacked Info used to draw graph\n const stackedInfo = this._getStackedData(keys, dataSet);\n\n return {\n colors,\n opacity,\n keys,\n stackedInfo,\n calloutPoints,\n };\n }\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xAxis: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxis: any,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._chart = this._drawGraph(containerHeight, xAxis, yAxis, xElement!);\n };\n\n private _onLegendClick(legend: string): void {\n if (this.state.selectedLegend === legend) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legend,\n });\n }\n }\n\n private _onLegendHover(legend: string): void {\n this.setState({\n activeLegend: legend,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (points: ILineChartPoints[]): JSX.Element => {\n const data = points;\n const actions: ILegend[] = [];\n\n data.forEach((singleChartData: ILineChartPoints) => {\n const color: string = singleChartData.color!;\n const checkSimilarLegends = actions.filter(\n (leg: ILegend) => leg.title === singleChartData.legend && leg.color === color,\n );\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: singleChartData.legend,\n color: color,\n action: () => {\n this._onLegendClick(singleChartData.legend);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(singleChartData.legend);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n {...this.props.legendProps}\n />\n );\n };\n\n private _onDataPointClick = (func: (() => void) | undefined) => {\n if (func) {\n func();\n }\n this.setState({ isCircleClicked: true });\n };\n\n private _getOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 0.7;\n } else {\n const opacity = this._legendHighlighted(legend) || this._noLegendHighlighted() ? 0.7 : 0.1;\n return opacity;\n }\n };\n\n private _getLineOpacity = (legend: string): number => {\n if (!this._isMultiStackChart) {\n return 1;\n } else {\n let opacity = 0.3;\n if (this.state.isCalloutVisible) {\n opacity = 1;\n }\n if (!this._noLegendHighlighted()) {\n opacity = this._legendHighlighted(legend) ? 0 : 0.1;\n }\n return opacity;\n }\n };\n\n private _updateCircleFillColor = (xDataPoint: number | Date, lineColor: string, circleId: string): string => {\n let fillColor = lineColor;\n if (this.state.nearestCircleToHighlight === xDataPoint || this.state.activePoint === circleId) {\n this._highlightedCircleId = circleId;\n if (!this.state.isCircleClicked) {\n fillColor = this.props.theme!.semanticColors.bodyBackground;\n }\n }\n\n return fillColor;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _drawGraph = (containerHeight: number, xScale: any, yScale: any, xElement: SVGElement): JSX.Element[] => {\n const points = this._addDefaultColors(this.props.data.lineChartData);\n const { pointOptions, pointLineOptions } = this.props.data;\n const area = d3Area()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y0((d: any) => yScale(d.values[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y1((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => xScale(d.xVal))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.values[1]))\n .curve(d3CurveBasis);\n\n const graph: JSX.Element[] = [];\n let lineColor: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n graph.push(\n <React.Fragment key={`${index}-graph-${this._uniqueIdForGraph}`}>\n <path\n id={`${index}-line-${this._uniqueIdForGraph}`}\n d={line(singleStackedData)!}\n fill={'transparent'}\n strokeWidth={3}\n stroke={this._colors[index]}\n opacity={this._getLineOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...points[index]!.lineOptions}\n />\n {singleStackedData.length === 1 ? (\n <circle\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n cx={xScale(singleStackedData[0].xVal)}\n cy={yScale(singleStackedData[0].values[1])}\n r={6}\n stroke={this._colors[index]}\n strokeWidth={3}\n fill={this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n />\n ) : (\n <path\n id={`${index}-graph-${this._uniqueIdForGraph}`}\n d={area(singleStackedData)!}\n fill={this._colors[index]}\n opacity={this._opacity[index]}\n fillOpacity={this._getOpacity(points[index]!.legend)}\n onMouseMove={this._onRectMouseMove}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n {...(this.props.optimizeLargeData && {\n 'data-is-focusable': this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted(),\n role: 'img',\n 'aria-label': `${points[index].legend}, series ${index + 1} of ${points.length} with ${\n points[index].data.length\n } data points.`,\n })}\n />\n )}\n </React.Fragment>,\n );\n });\n\n const circleRadius = pointOptions && pointOptions.r ? Number(pointOptions.r) : 8;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._stackedData.forEach((singleStackedData: Array<any>, index: number) => {\n if (points.length === index) {\n return;\n }\n\n if (!this.props.optimizeLargeData || singleStackedData.length === 1) {\n // Render circles for all data points\n graph.push(\n <g key={`${index}-dots-${this._uniqueIdForGraph}`} d={area(singleStackedData)!} clipPath=\"url(#clip)\">\n {singleStackedData.map((singlePoint: IDPointType, pointIndex: number) => {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n lineColor = points[index]!.color!;\n return (\n <circle\n key={circleId}\n id={circleId}\n data-is-focusable={this._legendHighlighted(points[index]!.legend) || this._noLegendHighlighted()}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n onFocus={() => this._handleFocus(index, pointIndex, circleId)}\n onBlur={this._handleBlur}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n role=\"img\"\n aria-label={this._getAriaLabel(index, pointIndex)}\n />\n );\n })}\n </g>,\n );\n } else {\n // Render circles for data points close to the mouse pointer only\n singleStackedData.forEach((singlePoint: IDPointType, pointIndex: number) => {\n const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;\n if (this.state.nearestCircleToHighlight === xDataPoint) {\n const circleId = `${this._circleId}_${index * this._stackedData[0].length + pointIndex}`;\n lineColor = points[index]!.color!;\n graph.push(\n <circle\n key={circleId}\n id={circleId}\n cx={xScale(singlePoint.xVal)}\n cy={yScale(singlePoint.values[1])}\n stroke={lineColor}\n strokeWidth={3}\n fill={this._updateCircleFillColor(xDataPoint, lineColor, circleId)}\n onMouseOut={this._onRectMouseOut}\n onMouseOver={this._onRectMouseMove}\n onClick={this._onDataPointClick.bind(this, points[index]!.data[pointIndex].onDataPointClick!)}\n {...pointOptions}\n r={this._getCircleRadius(xDataPoint, circleRadius, circleId)}\n />,\n );\n }\n });\n }\n });\n graph.push(\n <line\n id={this._verticalLineId}\n key={this._verticalLineId}\n x1={this.state.lineXValue}\n y1={0}\n x2={this.state.lineXValue}\n y2={containerHeight}\n strokeWidth={1}\n strokeDasharray={5.5}\n stroke={lineColor!}\n opacity={0.5}\n visibility={this.state.displayOfLine}\n {...pointLineOptions}\n />,\n );\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return graph;\n };\n\n private _getCircleRadius = (xDataPoint: number, circleRadius: number, circleId: string): number => {\n const { isCircleClicked, nearestCircleToHighlight, activePoint } = this.state;\n if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {\n return 1;\n } else if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {\n return circleRadius;\n } else {\n return 0;\n }\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\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 = (legend: string) => {\n return (\n this.state.selectedLegend === legend || (this.state.selectedLegend === '' && this.state.activeLegend === legend)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _addDefaultColors = (lineChartData?: ILineChartPoints[]): ILineChartPoints[] => {\n return lineChartData\n ? lineChartData.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n\n private _handleFocus = (lineIndex: number, pointIndex: number, circleId: string) => {\n const { x, y, xAxisCalloutData } = this.props.data.lineChartData![lineIndex].data[pointIndex];\n const formattedDate = x instanceof Date ? x.toLocaleString() : x;\n const modifiedXVal = x instanceof Date ? x.getTime() : x;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = this._calloutPoints.find((e: { x: string | number }) => e.x === modifiedXVal);\n // Show details in the callout for the focused point only\n found.values = found.values.filter((e: { y: number }) => e.y === y);\n\n this.setState({\n refSelected: `#${circleId}`,\n isCalloutVisible: true,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : formattedDate,\n YValueHover: found.values,\n stackCalloutProps: found,\n dataPointCalloutProps: found,\n activePoint: circleId,\n });\n };\n\n private _handleBlur = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n hoverXValue: undefined,\n YValueHover: [],\n stackCalloutProps: undefined,\n dataPointCalloutProps: undefined,\n activePoint: '',\n });\n };\n\n private _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = this.props.data.lineChartData![lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? point.x.toLocaleString() : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n private _isChartEmpty(): boolean {\n return !(\n (\n this.props.data &&\n this.props.data.lineChartData &&\n this.props.data.lineChartData.length > 0 &&\n this.props.data.lineChartData.filter(item => item.data.length === 0).length === 0\n )\n // if all the data sets have no data\n // filtering all items which have no data and checking if the length of the filtered array is 0\n // which means chart is not empty\n );\n }\n}\n"]}
@@ -1,11 +1,11 @@
1
- import { DefaultPalette, FontSizes, FontWeights } from '@fluentui/react/lib/Styling';
1
+ import { FontSizes, FontWeights } from '@fluentui/react/lib/Styling';
2
2
  export var getStyles = function (props) {
3
3
  var color = props.color, href = props.href, theme = props.theme;
4
4
  return {
5
5
  root: {
6
6
  fill: color,
7
7
  cursor: href ? 'pointer' : 'default',
8
- stroke: DefaultPalette.white,
8
+ stroke: theme.semanticColors.bodyBackground,
9
9
  outline: 'transparent',
10
10
  selectors: {
11
11
  '::-moz-focus-inner': {
@@ -1 +1 @@
1
- {"version":3,"file":"Arc.styles.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAErF,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAgB;IAChC,IAAA,KAAK,GAAkB,KAAK,MAAvB,EAAE,IAAI,GAAY,KAAK,KAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;IACrC,OAAO;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACpC,MAAM,EAAE,cAAc,CAAC,KAAK;YAC5B,OAAO,EAAE,aAAa;YACtB,SAAS,EAAE;gBACT,oBAAoB,EAAE;oBACpB,MAAM,EAAE,GAAG;iBACZ;aACF;SACF;QACD,SAAS,EAAE;YACT,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW;YACxC,WAAW,EAAE,CAAC;YACd,IAAI,EAAE,aAAa;SACpB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,SAAS,CAAC,KAAK;YACzB,UAAU,EAAE,WAAW,CAAC,QAAQ;YAChC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;SACnC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { IArcProps, IArcStyles } from './Arc.types';\nimport { DefaultPalette, FontSizes, FontWeights } from '@fluentui/react/lib/Styling';\n\nexport const getStyles = (props: IArcProps): IArcStyles => {\n const { color, href, theme } = props;\n return {\n root: {\n fill: color,\n cursor: href ? 'pointer' : 'default',\n stroke: DefaultPalette.white,\n outline: 'transparent',\n selectors: {\n '::-moz-focus-inner': {\n border: '0',\n },\n },\n },\n focusRing: {\n stroke: theme.semanticColors.focusBorder,\n strokeWidth: 4,\n fill: 'transparent',\n },\n arcLabel: {\n fontSize: FontSizes.small,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n },\n };\n};\n"]}
1
+ {"version":3,"file":"Arc.styles.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAgB;IAChC,IAAA,KAAK,GAAkB,KAAK,MAAvB,EAAE,IAAI,GAAY,KAAK,KAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;IACrC,OAAO;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACpC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc;YAC3C,OAAO,EAAE,aAAa;YACtB,SAAS,EAAE;gBACT,oBAAoB,EAAE;oBACpB,MAAM,EAAE,GAAG;iBACZ;aACF;SACF;QACD,SAAS,EAAE;YACT,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW;YACxC,WAAW,EAAE,CAAC;YACd,IAAI,EAAE,aAAa;SACpB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,SAAS,CAAC,KAAK;YACzB,UAAU,EAAE,WAAW,CAAC,QAAQ;YAChC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;SACnC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { IArcProps, IArcStyles } from './Arc.types';\nimport { FontSizes, FontWeights } from '@fluentui/react/lib/Styling';\n\nexport const getStyles = (props: IArcProps): IArcStyles => {\n const { color, href, theme } = props;\n return {\n root: {\n fill: color,\n cursor: href ? 'pointer' : 'default',\n stroke: theme.semanticColors.bodyBackground,\n outline: 'transparent',\n selectors: {\n '::-moz-focus-inner': {\n border: '0',\n },\n },\n },\n focusRing: {\n stroke: theme.semanticColors.focusBorder,\n strokeWidth: 4,\n fill: 'transparent',\n },\n arcLabel: {\n fontSize: FontSizes.small,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n },\n };\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { IGaugeChartProps } from './GaugeChart.types';
2
+ import { IGaugeChartProps, IGaugeChartSegment, GaugeValueFormat, GaugeChartVariant } from './GaugeChart.types';
3
3
  import { IYValueHover } from '../../index';
4
4
  export declare const ARC_PADDING = 2;
5
5
  export declare const BREAKPOINTS: {
@@ -7,6 +7,9 @@ export declare const BREAKPOINTS: {
7
7
  arcWidth: number;
8
8
  fontSize: number;
9
9
  }[];
10
+ export declare const calcNeedleRotation: (chartValue: number, minValue: number, maxValue: number) => number;
11
+ export declare const getSegmentLabel: (segment: IExtendedSegment, minValue: number, maxValue: number, variant?: GaugeChartVariant, isAriaLabel?: boolean) => string;
12
+ export declare const getChartValueLabel: (chartValue: number, minValue: number, maxValue: number, chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string) | undefined, forCallout?: boolean) => string;
10
13
  interface IYValue extends Omit<IYValueHover, 'y'> {
11
14
  y?: string | number;
12
15
  }
@@ -21,14 +24,18 @@ export interface IGaugeChartState {
21
24
  width: number;
22
25
  height: number;
23
26
  }
27
+ export interface IExtendedSegment extends IGaugeChartSegment {
28
+ start: number;
29
+ end: number;
30
+ }
24
31
  export declare class GaugeChartBase extends React.Component<IGaugeChartProps, IGaugeChartState> {
25
32
  private _classNames;
26
33
  private _isRTL;
27
34
  private _innerRadius;
28
35
  private _outerRadius;
29
36
  private _minValue;
37
+ private _maxValue;
30
38
  private _segments;
31
- private _sweepFraction;
32
39
  private _calloutAnchor;
33
40
  private _rootElem;
34
41
  private _margins;
@@ -38,7 +45,7 @@ export declare class GaugeChartBase extends React.Component<IGaugeChartProps, IG
38
45
  render(): React.ReactNode;
39
46
  private _getMargins;
40
47
  private _getStylesBasedOnBreakpoint;
41
- private _initProps;
48
+ private _processProps;
42
49
  private _renderNeedle;
43
50
  private _renderLegends;
44
51
  /**
@@ -2,7 +2,7 @@ import { __assign, __extends } from "tslib";
2
2
  import * as React from 'react';
3
3
  import { arc as d3Arc } from 'd3-shape';
4
4
  import { classNamesFunction, getRTL } from '@fluentui/react/lib/Utilities';
5
- import { GaugeValueFormat, } from './GaugeChart.types';
5
+ import { GaugeValueFormat, GaugeChartVariant, } from './GaugeChart.types';
6
6
  import { Points, convertToLocaleString, formatValueWithSIPrefix, getAccessibleDataObject, getColorFromToken, getNextColor, pointTypes, } from '../../utilities/index';
7
7
  import { Legends, Shape } from '../Legends/index';
8
8
  import { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';
@@ -25,6 +25,46 @@ export var BREAKPOINTS = [
25
25
  { minRadius: 142, arcWidth: 32, fontSize: 40 },
26
26
  ];
27
27
  var getClassNames = classNamesFunction();
28
+ export var calcNeedleRotation = function (chartValue, minValue, maxValue) {
29
+ var needleRotation = ((chartValue - minValue) / (maxValue - minValue)) * 180;
30
+ if (needleRotation < 0) {
31
+ needleRotation = 0;
32
+ }
33
+ else if (needleRotation > 180) {
34
+ needleRotation = 180;
35
+ }
36
+ return needleRotation;
37
+ };
38
+ export var getSegmentLabel = function (segment, minValue, maxValue, variant, isAriaLabel) {
39
+ if (isAriaLabel === void 0) { isAriaLabel = false; }
40
+ if (isAriaLabel) {
41
+ return minValue === 0 && variant === GaugeChartVariant.SingleSegment
42
+ ? "".concat(segment.legend, ", ").concat(segment.size, " out of ").concat(maxValue, " or ").concat(((segment.size / maxValue) * 100).toFixed(), "%")
43
+ : "".concat(segment.legend, ", ").concat(segment.start, " to ").concat(segment.end);
44
+ }
45
+ return minValue === 0 && variant === GaugeChartVariant.SingleSegment
46
+ ? "".concat(segment.size, " (").concat(((segment.size / maxValue) * 100).toFixed(), "%)")
47
+ : "".concat(segment.start, " - ").concat(segment.end);
48
+ };
49
+ export var getChartValueLabel = function (chartValue, minValue, maxValue, chartValueFormat, forCallout) {
50
+ if (forCallout === void 0) { forCallout = false; }
51
+ if (forCallout) {
52
+ // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.
53
+ // This helps clarify the actual value and avoid repetition.
54
+ return minValue !== 0
55
+ ? chartValue.toString()
56
+ : chartValueFormat === GaugeValueFormat.Fraction
57
+ ? "".concat(((chartValue / maxValue) * 100).toFixed(), "%")
58
+ : "".concat(chartValue, "/").concat(maxValue);
59
+ }
60
+ return typeof chartValueFormat === 'function'
61
+ ? chartValueFormat([chartValue - minValue, maxValue - minValue])
62
+ : minValue !== 0
63
+ ? chartValue.toString()
64
+ : chartValueFormat === GaugeValueFormat.Fraction
65
+ ? "".concat(chartValue, "/").concat(maxValue)
66
+ : "".concat(((chartValue / maxValue) * 100).toFixed(), "%");
67
+ };
28
68
  var GaugeChartBase = /** @class */ (function (_super) {
29
69
  __extends(GaugeChartBase, _super);
30
70
  function GaugeChartBase(props) {
@@ -52,22 +92,30 @@ var GaugeChartBase = /** @class */ (function (_super) {
52
92
  chartValueSize: BREAKPOINTS[0].fontSize,
53
93
  };
54
94
  };
55
- _this._initProps = function () {
95
+ _this._processProps = function () {
56
96
  var _a = _this.props, _b = _a.minValue, minValue = _b === void 0 ? 0 : _b, maxValue = _a.maxValue, theme = _a.theme;
57
- var segments = Array.from(_this.props.segments);
58
97
  var total = minValue;
59
- segments.forEach(function (segment, index) {
60
- total += segment.size;
61
- segment.color =
62
- typeof segment.color !== 'undefined'
98
+ var segments = _this.props.segments.map(function (segment, index) {
99
+ var size = Math.max(segment.size, 0);
100
+ total += size;
101
+ return {
102
+ legend: segment.legend,
103
+ size: size,
104
+ color: typeof segment.color !== 'undefined'
63
105
  ? getColorFromToken(segment.color, theme.isInverted)
64
- : getNextColor(index, 0, theme.isInverted);
106
+ : getNextColor(index, 0, theme.isInverted),
107
+ accessibilityData: segment.accessibilityData,
108
+ start: total - size,
109
+ end: total,
110
+ };
65
111
  });
66
112
  if (typeof maxValue !== 'undefined' && total < maxValue) {
67
113
  segments.push({
68
114
  legend: 'Unknown',
69
115
  size: maxValue - total,
70
116
  color: theme.palette.neutralLight,
117
+ start: total,
118
+ end: maxValue,
71
119
  });
72
120
  total = maxValue;
73
121
  }
@@ -90,15 +138,15 @@ var GaugeChartBase = /** @class */ (function (_super) {
90
138
  segmentIndex: _this._isRTL ? segments.length - 1 - index : index,
91
139
  };
92
140
  });
141
+ _this._minValue = minValue;
142
+ _this._maxValue = total;
143
+ _this._segments = segments;
93
144
  return {
94
- minValue: minValue,
95
- maxValue: total,
96
- segments: segments,
97
145
  arcs: arcs,
98
146
  };
99
147
  };
100
148
  _this._renderNeedle = function () {
101
- var needleRotation = (_this._sweepFraction[0] / _this._sweepFraction[1]) * 180;
149
+ var needleRotation = calcNeedleRotation(_this.props.chartValue, _this._minValue, _this._maxValue);
102
150
  var rtlSafeNeedleRotation = _this._isRTL ? 180 - needleRotation : needleRotation;
103
151
  var strokeWidth = 2;
104
152
  var halfStrokeWidth = strokeWidth / 2;
@@ -170,17 +218,13 @@ var GaugeChartBase = /** @class */ (function (_super) {
170
218
  }
171
219
  _this._calloutAnchor = legend;
172
220
  var hoverXValue = 'Current value is ' +
173
- (_this.props.chartValueFormat === GaugeValueFormat.Fraction
174
- ? "".concat(((_this._sweepFraction[0] / _this._sweepFraction[1]) * 100).toFixed(), "%")
175
- : "".concat(_this._sweepFraction[0], "/").concat(_this._sweepFraction[1]));
176
- var total = _this._minValue;
177
- var hoverYValues = _this._segments.map(function (segment, index) {
221
+ getChartValueLabel(_this.props.chartValue, _this._minValue, _this._maxValue, _this.props.chartValueFormat, true);
222
+ var hoverYValues = _this._segments.map(function (segment) {
178
223
  var yValue = {
179
224
  legend: segment.legend,
180
- y: "".concat(total + (index > 0 ? 1 : 0), " - ").concat(total + segment.size),
225
+ y: getSegmentLabel(segment, _this._minValue, _this._maxValue, _this.props.variant),
181
226
  color: segment.color,
182
227
  };
183
- total += segment.size;
184
228
  return yValue;
185
229
  });
186
230
  _this.setState(__assign({ calloutTarget: target,
@@ -233,7 +277,7 @@ var GaugeChartBase = /** @class */ (function (_super) {
233
277
  !!calloutProps.descriptionMessage && (React.createElement("div", { className: _this._classNames.descriptionMessage }, calloutProps.descriptionMessage)))));
234
278
  };
235
279
  _this._margins = _this._getMargins();
236
- _this._legendsHeight = !_this.props.hideLegend ? 24 : 0;
280
+ _this._legendsHeight = !props.hideLegend ? 24 : 0;
237
281
  _this.state = {
238
282
  hoveredLegend: '',
239
283
  selectedLegend: '',
@@ -245,7 +289,7 @@ var GaugeChartBase = /** @class */ (function (_super) {
245
289
  width: 140 + _this._margins.left + _this._margins.right,
246
290
  height: 70 + _this._margins.top + _this._margins.bottom + _this._legendsHeight,
247
291
  };
248
- _this._isRTL = getRTL();
292
+ _this._isRTL = getRTL(props.theme);
249
293
  _this._calloutAnchor = '';
250
294
  return _this;
251
295
  }
@@ -266,10 +310,7 @@ var GaugeChartBase = /** @class */ (function (_super) {
266
310
  this._outerRadius = Math.min((width - (this._margins.left + this._margins.right)) / 2, height - (this._margins.top + this._margins.bottom + this._legendsHeight));
267
311
  var _a = this._getStylesBasedOnBreakpoint(), arcWidth = _a.arcWidth, chartValueSize = _a.chartValueSize;
268
312
  this._innerRadius = this._outerRadius - arcWidth;
269
- var _b = this._initProps(), minValue = _b.minValue, maxValue = _b.maxValue, segments = _b.segments, arcs = _b.arcs;
270
- this._minValue = minValue;
271
- this._segments = segments;
272
- this._sweepFraction = [this.props.chartValue - this._minValue, maxValue - this._minValue];
313
+ var arcs = this._processProps().arcs;
273
314
  this._classNames = getClassNames(this.props.styles, {
274
315
  theme: this.props.theme,
275
316
  className: this.props.className,
@@ -284,25 +325,21 @@ var GaugeChartBase = /** @class */ (function (_super) {
284
325
  this.props.chartTitle && (React.createElement("text", { x: 0, y: -(this._outerRadius + TITLE_OFFSET), textAnchor: "middle", className: this._classNames.chartTitle }, this.props.chartTitle)),
285
326
  !this.props.hideMinMax && (React.createElement(React.Fragment, null,
286
327
  React.createElement("text", { x: (this._isRTL ? 1 : -1) * (this._outerRadius + LABEL_OFFSET), y: 0, textAnchor: "end", className: this._classNames.limits, role: "img", "aria-label": "Min value: ".concat(this._minValue) }, formatValueWithSIPrefix(this._minValue)),
287
- React.createElement("text", { x: (this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET), y: 0, textAnchor: "start", className: this._classNames.limits, role: "img", "aria-label": "Max value: ".concat(maxValue) }, formatValueWithSIPrefix(maxValue)))),
288
- arcs.map(function (arc, index) { return (React.createElement("path", __assign({ key: index, d: arc.d, fill: _this._segments[arc.segmentIndex].color, fillOpacity: _this._legendHighlighted(_this._segments[arc.segmentIndex].legend) || _this._noLegendHighlighted()
289
- ? 1
290
- : 0.1, strokeWidth: _this.state.focusedElement === _this._segments[arc.segmentIndex].legend ? ARC_PADDING : 0, className: _this._classNames.segment }, getAccessibleDataObject(__assign({ ariaLabel: "".concat(_this._segments[arc.segmentIndex].legend, ", ").concat(_this._segments[arc.segmentIndex].size, " out of ").concat(maxValue - _this._minValue, " or ").concat(((_this._segments[arc.segmentIndex].size / (maxValue - _this._minValue)) *
291
- 100).toFixed(), "%") }, _this._segments[arc.segmentIndex].accessibilityData), 'img', true), { onFocus: function (e) { return _this._handleFocus(e, _this._segments[arc.segmentIndex].legend); }, onBlur: _this._handleBlur, onMouseEnter: function (e) { return _this._handleMouseOver(e, _this._segments[arc.segmentIndex].legend); }, onMouseMove: function (e) { return _this._handleMouseOver(e, _this._segments[arc.segmentIndex].legend); } }))); }),
328
+ React.createElement("text", { x: (this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET), y: 0, textAnchor: "start", className: this._classNames.limits, role: "img", "aria-label": "Max value: ".concat(this._maxValue) }, formatValueWithSIPrefix(this._maxValue)))),
329
+ arcs.map(function (arc, index) {
330
+ var segment = _this._segments[arc.segmentIndex];
331
+ return (React.createElement("path", __assign({ key: index, d: arc.d, fill: segment.color, fillOpacity: _this._legendHighlighted(segment.legend) || _this._noLegendHighlighted() ? 1 : 0.1, strokeWidth: _this.state.focusedElement === segment.legend ? ARC_PADDING : 0, className: _this._classNames.segment }, getAccessibleDataObject(__assign({ ariaLabel: getSegmentLabel(segment, _this._minValue, _this._maxValue, _this.props.variant, true) }, segment.accessibilityData), 'img', true), { onFocus: function (e) { return _this._handleFocus(e, segment.legend); }, onBlur: _this._handleBlur, onMouseEnter: function (e) { return _this._handleMouseOver(e, segment.legend); }, onMouseMove: function (e) { return _this._handleMouseOver(e, segment.legend); } })));
332
+ }),
292
333
  this._renderNeedle(),
293
334
  React.createElement("g", { onMouseEnter: function (e) { return _this._handleMouseOver(e, 'Chart value'); }, onMouseMove: function (e) { return _this._handleMouseOver(e, 'Chart value'); } },
294
- React.createElement(SVGTooltipText, { content: typeof this.props.chartValueFormat === 'function'
295
- ? this.props.chartValueFormat(this._sweepFraction)
296
- : this.props.chartValueFormat === GaugeValueFormat.Fraction
297
- ? "".concat(this._sweepFraction[0], "/").concat(this._sweepFraction[1])
298
- : "".concat(((this._sweepFraction[0] / this._sweepFraction[1]) * 100).toFixed(), "%"), textProps: {
335
+ React.createElement(SVGTooltipText, { content: getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat), textProps: {
299
336
  x: 0,
300
337
  y: 0,
301
338
  textAnchor: 'middle',
302
339
  className: this._classNames.chartValue,
303
340
  role: 'img',
304
- 'aria-label': "Current value: ".concat(this._sweepFraction[0], " out of ").concat(this._sweepFraction[1], ", or ").concat(((this._sweepFraction[0] / this._sweepFraction[1]) *
305
- 100).toFixed(), "%"),
341
+ 'aria-label': 'Current value: ' +
342
+ getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat),
306
343
  }, maxWidth: this._innerRadius * 2 - 24, wrapContent: this._wrapContent })),
307
344
  this.props.sublabel && (React.createElement(SVGTooltipText, { content: this.props.sublabel, textProps: {
308
345
  x: 0,