@fluentui/react-charting 5.23.84 → 5.23.85

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 (50) hide show
  1. package/CHANGELOG.json +34 -1
  2. package/CHANGELOG.md +14 -2
  3. package/dist/react-charting.d.ts +7 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +2 -0
  7. package/lib/components/CommonComponents/CartesianChart.base.js +1 -1
  8. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  9. package/lib/components/CommonComponents/CartesianChart.types.d.ts +2 -0
  10. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  11. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +8 -3
  12. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  13. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +5 -0
  14. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +78 -16
  15. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  16. package/lib/types/IDataPoint.d.ts +5 -0
  17. package/lib/types/IDataPoint.js.map +1 -1
  18. package/lib/utilities/utilities.d.ts +1 -0
  19. package/lib/utilities/utilities.js +114 -40
  20. package/lib/utilities/utilities.js.map +1 -1
  21. package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -1
  22. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  23. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +2 -0
  24. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  25. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +8 -3
  26. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  27. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +5 -0
  28. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +77 -16
  29. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  30. package/lib-amd/types/IDataPoint.d.ts +5 -0
  31. package/lib-amd/types/IDataPoint.js.map +1 -1
  32. package/lib-amd/utilities/utilities.d.ts +1 -0
  33. package/lib-amd/utilities/utilities.js +115 -41
  34. package/lib-amd/utilities/utilities.js.map +1 -1
  35. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -1
  36. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  37. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +2 -0
  38. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  39. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +8 -3
  40. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  41. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +5 -0
  42. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +77 -15
  43. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  44. package/lib-commonjs/types/IDataPoint.d.ts +5 -0
  45. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  46. package/lib-commonjs/utilities/utilities.d.ts +1 -0
  47. package/lib-commonjs/utilities/utilities.js +116 -42
  48. package/lib-commonjs/utilities/utilities.js.map +1 -1
  49. package/package.json +2 -2
  50. package/src/components/CommonComponents/CartesianChart.types.ts +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalBarChartWithAxis.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.tsx"],"names":[],"mappings":";;;;IAiDA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4E,CAAC;IAkBrH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,IAAI,CAAC,KAAK,CAAC,mBAAmB;oBAChC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC;oBAClC,CAAC,CAAC,EAAE,CAAC;QACT,CAAC;QAEO,iEAAwB,GAAhC,UACE,eAAyB,EACzB,KAA0C,EAC1C,aAAuB;;YAEvB,IAAI,MAAA,IAAI,CAAC,KAAK,CAAC,WAAW,0CAAE,wBAAwB,EAAE,CAAC;gBACrD,IAAI,CAAC,QAAQ,CAAC;oBACZ,eAAe,iBAAA;oBACf,mBAAmB,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAM;iBAC3C,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,QAAQ,CAAC;oBACZ,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC1C,mBAAmB,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAM;iBAC3C,CAAC,CAAC;YACL,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC;gBACZ,gBAAgB,EAAE,eAAe,CAAC,MAAM,GAAG,CAAC;aAC7C,CAAC,CAAC;YACH,IAAI,MAAA,IAAI,CAAC,KAAK,CAAC,WAAW,0CAAE,QAAQ,EAAE,CAAC;gBACrC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;QAmBH,qCAAC;IAAD,CAAC,AAh6BD,CACU,KAAK,CAAC,SAAS,GA+5BxB;IAh6BY,wEAA8B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend, ILegendContainer } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport {\n IAccessibilityProps,\n IBasestate,\n IHorizontalBarChartWithAxisDataPoint,\n IRefArrayData,\n IMargins,\n IChart,\n IImageExportOptions,\n} from '../../types/IDataPoint';\nimport { IChildProps, IYValueHover } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis.types';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartHoverCard,\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n findHBCWANumericMinMaxOfY,\n createYAxisForHorizontalBarChartWithAxis,\n IDomainNRange,\n domainRangeOfNumericForHorizontalBarChartWithAxis,\n createStringYAxisForHorizontalBarChartWithAxis,\n getNextGradient,\n areArraysEqual,\n computeLongestBars,\n groupChartDataByYValue,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartWithAxisStyleProps, IHorizontalBarChartWithAxisStyles>();\nexport interface IHorizontalBarChartWithAxisState extends IBasestate {\n selectedLegendTitle: string;\n dataPointCalloutProps?: IHorizontalBarChartWithAxisDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tooltipElement?: any;\n selectedLegends: string[];\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class HorizontalBarChartWithAxisBase\n extends React.Component<IHorizontalBarChartWithAxisProps, IHorizontalBarChartWithAxisState>\n implements IChart\n{\n private _points: IHorizontalBarChartWithAxisDataPoint[];\n private _barHeight: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IHorizontalBarChartWithAxisStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _yAxisLabels: string[];\n private _xMax: number;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _yAxisType: YAxisType;\n private _calloutAnchorPoint: IHorizontalBarChartWithAxisDataPoint | null;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n private _longestBarPositiveTotalValue: number;\n private _longestBarNegativeTotalValue: number;\n private readonly X_ORIGIN: number = 0;\n\n public constructor(props: IHorizontalBarChartWithAxisProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n isLegendSelected:\n (props.legendProps?.selectedLegends && props.legendProps.selectedLegends.length > 0) ||\n props.legendProps?.selectedLegend !== undefined,\n isLegendHovered: false,\n refSelected: null,\n selectedLegendTitle: props.legendProps?.selectedLegend ?? '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n };\n this._calloutId = getId('callout');\n this._tooltipId = getId('HBCWATooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n this._yAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IHorizontalBarChartWithAxisProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n const reversedBars = [...this._points].reverse();\n this._yAxisLabels = reversedBars.map((point: IHorizontalBarChartWithAxisDataPoint) => point.y as string);\n this._xMax = Math.max(\n d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x)!,\n this.props.xMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.selectedLegendTitle,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={this._points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={this._xAxisType}\n yAxisType={this._yAxisType}\n stringDatasetForYAxisDomain={this._yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n createYAxis={createYAxisForHorizontalBarChartWithAxis}\n getDomainNRangeValues={this._getDomainNRangeValues}\n createStringYAxis={createStringYAxisForHorizontalBarChartWithAxis}\n getMinMaxOfYAxis={findHBCWANumericMinMaxOfY}\n barwidth={this._barHeight}\n focusZoneDirection={FocusZoneDirection.vertical}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n ref={this._cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n </>\n );\n }}\n />\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, this._isRtl, opts);\n };\n\n private _getDomainNRangeValues = (\n points: IHorizontalBarChartWithAxisDataPoint[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForHorizontalBarChartWithAxis(\n points,\n margins,\n width,\n isRTL,\n shiftX,\n this.X_ORIGIN,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barHeight = this.props.barHeight || 32;\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForOnlyBars = (point: IHorizontalBarChartWithAxisDataPoint): JSX.Element => {\n const { useSingleColor = false, enableGradient = false } = this.props;\n let selectedPointIndex = 0;\n this.props.data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n if (enableGradient) {\n color = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n }\n } else {\n color = point.color\n ? point.color\n : this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n return (\n <>\n <ChartHoverCard\n XValue={point.xAxisCalloutData || point.x.toString()}\n Legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IHorizontalBarChartWithAxisDataPoint): JSX.Element | null => {\n return props ? this._renderContentForOnlyBars(props) : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) => {\n const stackedChartData = groupChartDataByYValue(this._points);\n const longestBars = computeLongestBars(stackedChartData, this.X_ORIGIN);\n this._longestBarPositiveTotalValue = longestBars.longestPositiveBar;\n this._longestBarNegativeTotalValue = longestBars.longestNegativeBar;\n const { xBarScale, yBarScale } =\n this._yAxisType === YAxisType.NumericAxis\n ? this._getScales(containerHeight, containerWidth, true)\n : this._getScales(containerHeight, containerWidth, false);\n const allBars = stackedChartData\n .map(singleBarData =>\n this._yAxisType === YAxisType.NumericAxis\n ? this._createNumericBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n )\n : this._createStringBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n ),\n )\n .flat();\n\n return (this._bars = allBars);\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForBar = (\n point: IHorizontalBarChartWithAxisDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { useSingleColor = false, enableGradient = false } = this.props;\n const { data } = this.props;\n const selectedPoint = data!.filter((yDataPoint: IHorizontalBarChartWithAxisDataPoint) => yDataPoint.y === point.y);\n let selectedPointIndex = 0;\n data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n if (enableGradient) {\n color = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n }\n } else {\n color = selectedPoint[0].color\n ? selectedPoint[0].color\n : this.props.colors\n ? this._createColors()(selectedPoint[0].x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n // For HBCWA x and y Values are swapped\n y: selectedPoint[0].x,\n color,\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n return { YValueHover, hoverXValue: point.yAxisCalloutData || point.y.toString() };\n };\n\n private _onBarHover(\n point: IHorizontalBarChartWithAxisDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n if (\n (this.state.isLegendSelected === false || this._isLegendHighlighted(point.legend)) &&\n this._calloutAnchorPoint !== point\n ) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n dataForHoverCard: point.x,\n selectedLegendTitle: point.legend!,\n color: this.props.useSingleColor || this.props.enableGradient ? color : point.color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue: point.yAxisCalloutData! || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (\n point: IHorizontalBarChartWithAxisDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void => {\n if (\n (this.state.isLegendSelected === false || this._isLegendHighlighted(point.legend)) &&\n this._calloutAnchorPoint !== point\n ) {\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n isCalloutVisible: true,\n selectedLegendTitle: point.legend!,\n dataForHoverCard: point.x,\n color: this.props.useSingleColor ? color : point.color,\n xCalloutValue: point.yAxisCalloutData || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData! || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n }\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n const xMax = this._longestBarPositiveTotalValue;\n const xMin = this._longestBarNegativeTotalValue;\n const xDomain = [Math.min(this.X_ORIGIN, xMin), Math.max(this.X_ORIGIN, xMax)];\n if (isNumericScale) {\n const yMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yMin = d3Min(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yDomainMax = Math.max(yMax, this.props.yMaxValue || 0);\n const yMinProp = this.props.yMinValue || 0;\n const yDomainMin = yMin < yMinProp ? Math.min(0, yMin) : yMinProp;\n\n const yDomainPadding = Math.abs((yMax - yMin) * 0.1);\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([yDomainMin - yDomainPadding, yDomainMax + yDomainPadding])\n .range([containerHeight - this.margins.bottom!, this.margins.top!]);\n return { xBarScale, yBarScale };\n } else {\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(this._yAxisLabels)\n .range([containerHeight - this.margins.bottom! - this._barHeight / 2, this.margins.top! + this._barHeight / 2])\n .padding(this.props.yAxisPadding || 0);\n\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n return { xBarScale, yBarScale };\n }\n };\n\n private _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: IHorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const sortedBars: IHorizontalBarChartWithAxisDataPoint[] = [...singleBarData];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n const totalPositiveBars = singleBarData.filter(\n (point: IHorizontalBarChartWithAxisDataPoint) => point.x >= this.X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n const bars = sortedBars.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this._isLegendHighlighted(point.legend);\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n if (point.x >= this.X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < this.X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = this._isRtl\n ? containerWidth -\n (this.margins.right! +\n Math.max(xBarScale(point.x + this.X_ORIGIN), xBarScale(this.X_ORIGIN)) -\n this.margins.left!)\n : Math.min(xBarScale(point.x + this.X_ORIGIN), xBarScale(this.X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n startColor = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(\n this._points.findIndex(item => item === point),\n 0,\n );\n startColor = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[1];\n if (useSingleColor) {\n startColor = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n endColor = getNextGradient(0, 0, this.props.theme?.isInverted)[1];\n }\n this._points[pointIndex].color = startColor;\n }\n\n const gradientId = getId('HBCWA_Gradient') + `_${index}_${point.x}`;\n const prevBarWidth = Math.abs(xBarScale(prevPoint + this.X_ORIGIN) - xBarScale(this.X_ORIGIN));\n prevPoint > this.X_ORIGIN ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + this.X_ORIGIN) - xBarScale(this.X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > this.X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < this.X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > this.X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < this.X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n let xStart = this.X_ORIGIN;\n if (this._isRtl) {\n xStart = point.x > this.X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > this.X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n prevPoint = point.x;\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n key={point.y}\n x={xStart}\n className={this._classNames.opacityChangeOnHover}\n y={yBarScale(point.y) - this._barHeight / 2}\n data-is-focusable={shouldHighlight}\n width={currentWidth - (this._isRtl ? gapWidthRTL : gapWidthLTR)}\n height={this._barHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n rx={this.props.roundCorners ? 3 : 0}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, startColor)}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${this._calloutId}`}\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, startColor)}\n onBlur={this._onBarLeave}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _tooltipOfYAxislabels(ytooltipProps: any) {\n const { tooltipCls, yAxis, id } = ytooltipProps;\n if (yAxis === null) {\n return null;\n }\n const div = d3Select('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);\n const aa = yAxis!.selectAll('#BaseSpan')._groups[0];\n const baseSpanLength = aa && Object.keys(aa)!.length;\n const originalDataArray: string[] = [];\n for (let i = 0; i < baseSpanLength; i++) {\n const originalData = aa[i].dataset && (Object.values(aa[i].dataset)[0] as string);\n originalDataArray.push(originalData);\n }\n const tickObject = yAxis!.selectAll('.tick')._groups[0];\n const tickObjectLength = tickObject && Object.keys(tickObject)!.length;\n for (let i = 0; i < tickObjectLength; i++) {\n const d1 = tickObject[i];\n d3Select(d1)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .on('mouseover', (event: any, d) => {\n if (!this.state.tooltipElement) {\n div.style('opacity', 0.9);\n div\n .text(originalDataArray[i])\n .style('left', event.pageX + 'px')\n .style('top', event.pageY - 28 + 'px');\n }\n })\n .on('mouseout', d => {\n div.style('opacity', 0);\n });\n }\n }\n\n private _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: IHorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n const totalPositiveBars = singleBarData.filter(\n (point: IHorizontalBarChartWithAxisDataPoint) => point.x >= this.X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n const bars = singleBarData.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this._isLegendHighlighted(point.legend);\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n if (point.x >= this.X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < this.X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = this._isRtl\n ? containerWidth -\n (this.margins.right! +\n Math.max(xBarScale(point.x + this.X_ORIGIN), xBarScale(this.X_ORIGIN)) -\n this.margins.left!)\n : Math.min(xBarScale(point.x + this.X_ORIGIN), xBarScale(this.X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n startColor = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n const pointIndex = this._points.findIndex(item => item === point);\n startColor = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[1];\n if (useSingleColor) {\n startColor = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n endColor = getNextGradient(0, 0, this.props.theme?.isInverted)[1];\n }\n this._points[pointIndex].color = startColor;\n }\n\n const gradientId = getId('HBCWA_Gradient') + `_${index}_${point.x}`;\n const prevBarWidth = Math.abs(xBarScale(prevPoint + this.X_ORIGIN) - xBarScale(this.X_ORIGIN));\n prevPoint > 0 ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + this.X_ORIGIN) - xBarScale(this.X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > this.X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < this.X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > this.X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < this.X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n prevPoint = point.x;\n let xStart = this.X_ORIGIN;\n if (this._isRtl) {\n xStart = point.x > this.X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > this.X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - this._barHeight)})`}\n key={point.x}\n className={this._classNames.opacityChangeOnHover}\n x={xStart}\n y={yBarScale(point.y)}\n rx={this.props.roundCorners ? 3 : 0}\n width={currentWidth - (this._isRtl ? gapWidthRTL : gapWidthLTR)}\n height={this._barHeight}\n aria-labelledby={`toolTip${this._calloutId}`}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, startColor)}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={shouldHighlight}\n onFocus={this._onBarFocus.bind(this, point, index, startColor)}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n />\n </React.Fragment>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)\n if (!this.props.showYAxisLablesTooltip) {\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 y axis labels.\n if (this.props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(yElement).call(yBarScale);\n if (!this.state.tooltipElement) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n const ytooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n yAxis: yAxisElement,\n };\n yAxisElement && this._tooltipOfYAxislabels(ytooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendHover(customMessage: string): void {\n if (!this._isLegendSelected()) {\n this.setState({\n isLegendHovered: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || !this._isLegendSelected()) {\n this.setState({\n isLegendHovered: false,\n selectedLegendTitle: '',\n isLegendSelected: isLegendFocused ? false : this._isLegendSelected(),\n });\n }\n }\n\n private _getLegendData = (data: IHorizontalBarChartWithAxisDataPoint[], palette: IPalette): JSX.Element => {\n const { useSingleColor } = this.props;\n const actions: ILegend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n\n data.forEach((point: IHorizontalBarChartWithAxisDataPoint, _index: number) => {\n let color: string = useSingleColor\n ? this.props.colors\n ? this._createColors()(1)\n : getNextColor(1, 0, this.props.theme?.isInverted)\n : point.color!;\n\n if (this.props.enableGradient) {\n color = point.gradient?.[0] || getNextGradient(_index, 0, this.props.theme?.isInverted)[0];\n if (useSingleColor) {\n color = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n }\n }\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(legendTitle);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n return legends;\n };\n\n private _isLegendSelected = (): boolean => {\n return this.state.isLegendSelected!;\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 _isLegendHighlighted = (legend?: string) => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.selectedLegendTitle\n ? [this.state.selectedLegendTitle]\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({\n selectedLegends,\n selectedLegendTitle: currentLegend?.title!,\n });\n } else {\n this.setState({\n selectedLegends: selectedLegends.slice(-1),\n selectedLegendTitle: currentLegend?.title!,\n });\n }\n this.setState({\n isLegendSelected: selectedLegends.length > 0,\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 // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._xMax = Math.max(domainValue[domainValue.length - 1], this.props.xMaxValue || 0);\n }\n };\n private _getAriaLabel = (point: IHorizontalBarChartWithAxisDataPoint): string => {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n };\n\n private _getChartTitle = (): string => {\n const { chartTitle, data } = this.props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Horizontal bar chart with ${data?.length || 0} bars. `;\n };\n}\n"]}
1
+ {"version":3,"file":"HorizontalBarChartWithAxis.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.tsx"],"names":[],"mappings":";;;;IAmDA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4E,CAAC;IAkBrH;QACU,0DAAmF;QA0B3F,wCAAmB,KAAuC;;YACxD,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAjBP,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAYlB,cAAQ,GAAW,CAAC,CAAC;YA8H/B,aAAO,GAAG,UAAC,IAA0B;;gBAC1C,OAAO,IAAA,4BAAO,EAAC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,CAAC;gBACrC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;QAmBH,qCAAC;IAAD,CAAC,AA1+BD,CACU,KAAK,CAAC,SAAS,GAy+BxB;IA1+BY,wEAA8B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend, ILegendContainer } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport {\n IAccessibilityProps,\n IBasestate,\n IHorizontalBarChartWithAxisDataPoint,\n IRefArrayData,\n IMargins,\n IChart,\n IImageExportOptions,\n} from '../../types/IDataPoint';\nimport { IChildProps, IYValueHover } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis.types';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartHoverCard,\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n findHBCWANumericMinMaxOfY,\n createYAxisForHorizontalBarChartWithAxis,\n IDomainNRange,\n domainRangeOfNumericForHorizontalBarChartWithAxis,\n createStringYAxisForHorizontalBarChartWithAxis,\n getNextGradient,\n areArraysEqual,\n computeLongestBars,\n groupChartDataByYValue,\n MIN_DOMAIN_MARGIN,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { getClosestPairDiffAndRange } from '../../utilities/vbc-utils';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartWithAxisStyleProps, IHorizontalBarChartWithAxisStyles>();\nexport interface IHorizontalBarChartWithAxisState extends IBasestate {\n selectedLegendTitle: string;\n dataPointCalloutProps?: IHorizontalBarChartWithAxisDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tooltipElement?: any;\n selectedLegends: string[];\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class HorizontalBarChartWithAxisBase\n extends React.Component<IHorizontalBarChartWithAxisProps, IHorizontalBarChartWithAxisState>\n implements IChart\n{\n private _points: IHorizontalBarChartWithAxisDataPoint[];\n private _barHeight: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IHorizontalBarChartWithAxisStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _yAxisLabels: string[];\n private _xMax: number;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _yAxisType: YAxisType;\n private _calloutAnchorPoint: IHorizontalBarChartWithAxisDataPoint | null;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n private _longestBarPositiveTotalValue: number;\n private _longestBarNegativeTotalValue: number;\n private readonly X_ORIGIN: number = 0;\n private _domainMargin: number;\n private _yAxisPadding: number;\n\n public constructor(props: IHorizontalBarChartWithAxisProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n isLegendSelected:\n (props.legendProps?.selectedLegends && props.legendProps.selectedLegends.length > 0) ||\n props.legendProps?.selectedLegend !== undefined,\n isLegendHovered: false,\n refSelected: null,\n selectedLegendTitle: props.legendProps?.selectedLegend ?? '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n };\n this._calloutId = getId('callout');\n this._tooltipId = getId('HBCWATooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n this._yAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._yAxisPadding = this.props.yAxisPadding ?? 0.5;\n }\n\n public componentDidUpdate(prevProps: IHorizontalBarChartWithAxisProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n const reversedBars = [...this._points].reverse();\n this._yAxisLabels = reversedBars.map((point: IHorizontalBarChartWithAxisDataPoint) => point.y as string);\n this._xMax = Math.max(\n d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.x)!,\n this.props.xMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.selectedLegendTitle,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return (\n <CartesianChart\n {...this.props}\n yAxisPadding={this._yAxisPadding}\n chartTitle={this._getChartTitle()}\n points={this._points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={this._xAxisType}\n yAxisType={this._yAxisType}\n stringDatasetForYAxisDomain={this._yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n createYAxis={createYAxisForHorizontalBarChartWithAxis}\n getDomainNRangeValues={this._getDomainNRangeValues}\n createStringYAxis={createStringYAxisForHorizontalBarChartWithAxis}\n getMinMaxOfYAxis={findHBCWANumericMinMaxOfY}\n barwidth={this._barHeight}\n focusZoneDirection={FocusZoneDirection.vertical}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getYDomainMargins={this._getDomainMarginsForHorizontalBarChart}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n ref={this._cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n </>\n );\n }}\n />\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, this._isRtl, opts);\n };\n\n private _getDomainNRangeValues = (\n points: IHorizontalBarChartWithAxisDataPoint[],\n margins: IMargins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) => {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForHorizontalBarChartWithAxis(\n points,\n margins,\n width,\n isRTL,\n shiftX,\n this.X_ORIGIN,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barHeight = this.props.barHeight || 32;\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForOnlyBars = (point: IHorizontalBarChartWithAxisDataPoint): JSX.Element => {\n const { useSingleColor = false, enableGradient = false } = this.props;\n let selectedPointIndex = 0;\n this.props.data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n if (enableGradient) {\n color = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n }\n } else {\n color = point.color\n ? point.color\n : this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n return (\n <>\n <ChartHoverCard\n XValue={point.xAxisCalloutData || point.x.toString()}\n Legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IHorizontalBarChartWithAxisDataPoint): JSX.Element | null => {\n return props ? this._renderContentForOnlyBars(props) : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) => {\n const stackedChartData = groupChartDataByYValue(this._points);\n const longestBars = computeLongestBars(stackedChartData, this.X_ORIGIN);\n this._longestBarPositiveTotalValue = longestBars.longestPositiveBar;\n this._longestBarNegativeTotalValue = longestBars.longestNegativeBar;\n const { xBarScale, yBarScale } =\n this._yAxisType === YAxisType.NumericAxis\n ? this._getScales(containerHeight, containerWidth, true)\n : this._getScales(containerHeight, containerWidth, false);\n const xRange = xBarScale.range();\n let allBars: JSX.Element[] = [];\n // when the chart mounts, the xRange[1] is sometimes seen to be < 0 (like -40) while xRange[0] > 0.\n if (xRange[0] < xRange[1]) {\n allBars = stackedChartData\n .map(singleBarData =>\n this._yAxisType === YAxisType.NumericAxis\n ? this._createNumericBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n )\n : this._createStringBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n ),\n )\n .flat();\n }\n\n return (this._bars = allBars);\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForBar = (\n point: IHorizontalBarChartWithAxisDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { useSingleColor = false, enableGradient = false } = this.props;\n const { data } = this.props;\n const selectedPoint = data!.filter((yDataPoint: IHorizontalBarChartWithAxisDataPoint) => yDataPoint.y === point.y);\n let selectedPointIndex = 0;\n data!.forEach((yDataPoint: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n if (enableGradient) {\n color = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n }\n } else {\n color = selectedPoint[0].color\n ? selectedPoint[0].color\n : this.props.colors\n ? this._createColors()(selectedPoint[0].x)\n : getNextColor(selectedPointIndex, 0, this.props.theme?.isInverted);\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n // For HBCWA x and y Values are swapped\n y: selectedPoint[0].x,\n color,\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n return { YValueHover, hoverXValue: point.yAxisCalloutData || point.y.toString() };\n };\n\n private _onBarHover(\n point: IHorizontalBarChartWithAxisDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n if (\n (this.state.isLegendSelected === false || this._isLegendHighlighted(point.legend)) &&\n this._calloutAnchorPoint !== point\n ) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n dataForHoverCard: point.x,\n selectedLegendTitle: point.legend!,\n color: this.props.useSingleColor || this.props.enableGradient ? color : point.color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue: point.yAxisCalloutData! || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (\n point: IHorizontalBarChartWithAxisDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void => {\n if (\n (this.state.isLegendSelected === false || this._isLegendHighlighted(point.legend)) &&\n this._calloutAnchorPoint !== point\n ) {\n const { YValueHover, hoverXValue } = this._getCalloutContentForBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n isCalloutVisible: true,\n selectedLegendTitle: point.legend!,\n dataForHoverCard: point.x,\n color: this.props.useSingleColor ? color : point.color,\n xCalloutValue: point.yAxisCalloutData || point.y.toString(),\n yCalloutValue: point.xAxisCalloutData! || point.x.toString(),\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n }\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n const xMax = this._longestBarPositiveTotalValue;\n const xMin = this._longestBarNegativeTotalValue;\n const xDomain = [Math.min(this.X_ORIGIN, xMin), Math.max(this.X_ORIGIN, xMax)];\n if (isNumericScale) {\n const yMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yMin = d3Min(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yDomainMax = Math.max(yMax, this.props.yMaxValue || 0);\n // Default to 0 if yMinValue is not provided.\n const yMinProp = this.props.yMinValue || 0;\n const yDomainMin = Math.min(yMin, yMinProp);\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([yDomainMin, yDomainMax])\n .range([containerHeight - (this.margins.bottom! + this._domainMargin), this.margins.top! + this._domainMargin]);\n return { xBarScale, yBarScale };\n } else {\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(this._yAxisLabels)\n .range([containerHeight - (this.margins.bottom! + this._domainMargin), this.margins.top! + this._domainMargin])\n .padding(this._yAxisPadding);\n\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([this.margins.left!, containerWidth - this.margins.right!]);\n return { xBarScale, yBarScale };\n }\n };\n\n private _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: IHorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const sortedBars: IHorizontalBarChartWithAxisDataPoint[] = [...singleBarData];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n const totalPositiveBars = singleBarData.filter(\n (point: IHorizontalBarChartWithAxisDataPoint) => point.x >= this.X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n const bars = sortedBars.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this._isLegendHighlighted(point.legend);\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n if (point.x >= this.X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < this.X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = this._isRtl\n ? containerWidth -\n (this.margins.right! +\n Math.max(xBarScale(point.x + this.X_ORIGIN), xBarScale(this.X_ORIGIN)) -\n this.margins.left!)\n : Math.min(xBarScale(point.x + this.X_ORIGIN), xBarScale(this.X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n startColor = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(\n this._points.findIndex(item => item === point),\n 0,\n );\n startColor = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[1];\n if (useSingleColor) {\n startColor = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n endColor = getNextGradient(0, 0, this.props.theme?.isInverted)[1];\n }\n this._points[pointIndex].color = startColor;\n }\n\n const gradientId = getId('HBCWA_Gradient') + `_${index}_${point.x}`;\n const prevBarWidth = Math.abs(xBarScale(prevPoint + this.X_ORIGIN) - xBarScale(this.X_ORIGIN));\n prevPoint > this.X_ORIGIN ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + this.X_ORIGIN) - xBarScale(this.X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > this.X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < this.X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > this.X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < this.X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n let xStart = this.X_ORIGIN;\n if (this._isRtl) {\n xStart = point.x > this.X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > this.X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n prevPoint = point.x;\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n key={point.y}\n x={xStart}\n className={this._classNames.opacityChangeOnHover}\n y={yBarScale(point.y) - this._barHeight / 2}\n data-is-focusable={shouldHighlight}\n width={currentWidth - (this._isRtl ? gapWidthRTL : gapWidthLTR)}\n height={this._barHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n rx={this.props.roundCorners ? 3 : 0}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, startColor)}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${this._calloutId}`}\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, startColor)}\n onBlur={this._onBarLeave}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n private _getUniqueYValues() {\n const mapY: Record<string, number | string> = {};\n this.props.data?.forEach((point: IHorizontalBarChartWithAxisDataPoint) => {\n mapY[point.y] = point.y;\n });\n const uniqueY = Object.values(mapY);\n return uniqueY;\n }\n\n private _calculateAppropriateBarHeight = (data: number[] | Date[], totalWidth: number, innerPadding: number) => {\n const result = getClosestPairDiffAndRange(data);\n if (!result || result[1] === 0) {\n return 16;\n }\n const closestPairDiff = result[0];\n let range = result[1];\n const yMax = d3Max(this._points, (point: IHorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n // Since we are always rendering from 0 to yMax, we need to ensure that the range is at least yMax\n // to calculate the bar height correctly.\n range = Math.max(range, yMax);\n // Refer to https://microsoft.github.io/fluentui-charting-contrib/docs/rfcs/fix-overlapping-bars-on-continuous-axes\n // for the derivation of the following formula.\n const barWidth = Math.floor(\n (totalWidth * closestPairDiff * (1 - innerPadding)) / (range + closestPairDiff * (1 - innerPadding)),\n );\n return barWidth;\n };\n\n private _getDomainMarginsForHorizontalBarChart = (containerHeight: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n const uniqueY = this._getUniqueYValues();\n /** Rate at which the space between the bars changes wrt the bar height */\n this._yAxisPadding = this._yAxisPadding === 1 ? 0.99 : this._yAxisPadding;\n const barGapRate = this._yAxisPadding / (1 - this._yAxisPadding);\n const numBars = uniqueY.length + (uniqueY.length - 1) * barGapRate;\n // Total height available to render the bars\n const totalHeight =\n containerHeight - (this.margins.top! + MIN_DOMAIN_MARGIN) - (this.margins.bottom! + MIN_DOMAIN_MARGIN);\n if (this._yAxisType !== YAxisType.StringAxis) {\n // Calculate bar height dynamically\n this._barHeight =\n this.props.barHeight ||\n this._calculateAppropriateBarHeight(uniqueY as number[] | Date[], totalHeight, this._yAxisPadding);\n this._barHeight = Math.max(this._barHeight, 1);\n this._domainMargin += this._barHeight / 2;\n } else {\n // Calculate the appropriate bar height\n this._barHeight = this.props.barHeight || totalHeight / numBars;\n /** Total height required to render the bars. Directly proportional to bar height */\n const reqHeight = numBars * this._barHeight;\n if (totalHeight >= reqHeight) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin = MIN_DOMAIN_MARGIN + (totalHeight - reqHeight) / 2;\n }\n }\n\n return {\n ...this.margins,\n top: this.margins.top! + this._domainMargin,\n bottom: this.margins.bottom! + this._domainMargin,\n };\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _tooltipOfYAxislabels(ytooltipProps: any) {\n const { tooltipCls, yAxis, id } = ytooltipProps;\n if (yAxis === null) {\n return null;\n }\n const div = d3Select('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);\n const aa = yAxis!.selectAll('#BaseSpan')._groups[0];\n const baseSpanLength = aa && Object.keys(aa)!.length;\n const originalDataArray: string[] = [];\n for (let i = 0; i < baseSpanLength; i++) {\n const originalData = aa[i].dataset && (Object.values(aa[i].dataset)[0] as string);\n originalDataArray.push(originalData);\n }\n const tickObject = yAxis!.selectAll('.tick')._groups[0];\n const tickObjectLength = tickObject && Object.keys(tickObject)!.length;\n for (let i = 0; i < tickObjectLength; i++) {\n const d1 = tickObject[i];\n d3Select(d1)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .on('mouseover', (event: any, d) => {\n if (!this.state.tooltipElement) {\n div.style('opacity', 0.9);\n div\n .text(originalDataArray[i])\n .style('left', event.pageX + 'px')\n .style('top', event.pageY - 28 + 'px');\n }\n })\n .on('mouseout', d => {\n div.style('opacity', 0);\n });\n }\n }\n\n private _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: IHorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n const totalPositiveBars = singleBarData.filter(\n (point: IHorizontalBarChartWithAxisDataPoint) => point.x >= this.X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n const bars = singleBarData.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this._isLegendHighlighted(point.legend);\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n if (point.x >= this.X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < this.X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = this._isRtl\n ? containerWidth -\n (this.margins.right! +\n Math.max(xBarScale(point.x + this.X_ORIGIN), xBarScale(this.X_ORIGIN)) -\n this.margins.left!)\n : Math.min(xBarScale(point.x + this.X_ORIGIN), xBarScale(this.X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = this.props.colors ? this._createColors()(1) : getNextColor(1, 0, this.props.theme?.isInverted);\n } else {\n startColor = this.props.colors\n ? this._createColors()(point.x)\n : getNextColor(index, 0, this.props.theme?.isInverted);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n const pointIndex = this._points.findIndex(item => item === point);\n startColor = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[1];\n if (useSingleColor) {\n startColor = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n endColor = getNextGradient(0, 0, this.props.theme?.isInverted)[1];\n }\n this._points[pointIndex].color = startColor;\n }\n\n const gradientId = getId('HBCWA_Gradient') + `_${index}_${point.x}`;\n const prevBarWidth = Math.abs(xBarScale(prevPoint + this.X_ORIGIN) - xBarScale(this.X_ORIGIN));\n prevPoint > 0 ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + this.X_ORIGIN) - xBarScale(this.X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > this.X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < this.X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > this.X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < this.X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n prevPoint = point.x;\n let xStart = this.X_ORIGIN;\n if (this._isRtl) {\n xStart = point.x > this.X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > this.X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - this._barHeight)})`}\n key={point.x}\n className={this._classNames.opacityChangeOnHover}\n x={xStart}\n y={yBarScale(point.y)}\n rx={this.props.roundCorners ? 3 : 0}\n width={currentWidth - (this._isRtl ? gapWidthRTL : gapWidthLTR)}\n height={this._barHeight}\n aria-labelledby={`toolTip${this._calloutId}`}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, startColor)}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={shouldHighlight}\n onFocus={this._onBarFocus.bind(this, point, index, startColor)}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n />\n </React.Fragment>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)\n if (!this.props.showYAxisLablesTooltip) {\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 y axis labels.\n if (this.props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(yElement).call(yBarScale);\n if (!this.state.tooltipElement) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n const ytooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n yAxis: yAxisElement,\n };\n yAxisElement && this._tooltipOfYAxislabels(ytooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendHover(customMessage: string): void {\n if (!this._isLegendSelected()) {\n this.setState({\n isLegendHovered: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || !this._isLegendSelected()) {\n this.setState({\n isLegendHovered: false,\n selectedLegendTitle: '',\n isLegendSelected: isLegendFocused ? false : this._isLegendSelected(),\n });\n }\n }\n\n private _getLegendData = (data: IHorizontalBarChartWithAxisDataPoint[], palette: IPalette): JSX.Element => {\n const { useSingleColor } = this.props;\n const actions: ILegend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n\n data.forEach((point: IHorizontalBarChartWithAxisDataPoint, _index: number) => {\n let color: string = useSingleColor\n ? this.props.colors\n ? this._createColors()(1)\n : getNextColor(1, 0, this.props.theme?.isInverted)\n : point.color!;\n\n if (this.props.enableGradient) {\n color = point.gradient?.[0] || getNextGradient(_index, 0, this.props.theme?.isInverted)[0];\n if (useSingleColor) {\n color = getNextGradient(0, 0, this.props.theme?.isInverted)[0];\n }\n }\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(legendTitle);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n return legends;\n };\n\n private _isLegendSelected = (): boolean => {\n return this.state.isLegendSelected!;\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 _isLegendHighlighted = (legend?: string) => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.selectedLegendTitle\n ? [this.state.selectedLegendTitle]\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({\n selectedLegends,\n selectedLegendTitle: currentLegend?.title!,\n });\n } else {\n this.setState({\n selectedLegends: selectedLegends.slice(-1),\n selectedLegendTitle: currentLegend?.title!,\n });\n }\n this.setState({\n isLegendSelected: selectedLegends.length > 0,\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 // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._xMax = Math.max(domainValue[domainValue.length - 1], this.props.xMaxValue || 0);\n }\n };\n private _getAriaLabel = (point: IHorizontalBarChartWithAxisDataPoint): string => {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n };\n\n private _getChartTitle = (): string => {\n const { chartTitle, data } = this.props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Horizontal bar chart with ${data?.length || 0} bars. `;\n };\n}\n"]}
@@ -568,6 +568,11 @@ export interface ILineDataInVerticalStackedBarChart {
568
568
  y: number;
569
569
  color: string;
570
570
  legend: string;
571
+ /**
572
+ * The shape for the legend
573
+ * default: show the rect legend
574
+ */
575
+ legendShape?: LegendShape;
571
576
  /**
572
577
  * Data to show in callout
573
578
  */
@@ -1 +1 @@
1
- {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalStackedBarDataPoint extends Omit<IDataPoint, 'x'> {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n * If data type on x is Date, then the data is spaced evenly by d3-scale.\n */\n x: number | string | Date;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Marker size of the points\n */\n markerSize?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends React.SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n\n /**\n * Defines the type of interpolation used to render the line.\n * @default 'linear'\n */\n curve?: 'linear' | 'natural' | 'step' | 'stepAfter' | 'stepBefore' | CurveFactory;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: React.SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: React.SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n /**\n * A unique identifier for this node.\n */\n nodeId: number | string;\n /**\n * The display name for this node in the UX.\n */\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n /**\n * The index within `ISankeyChartData.nodes` of the source node.\n */\n source: number;\n /**\n * The index within `ISankeyChartData.nodes` of the target node.\n */\n target: number;\n /**\n * The weight of this link between the two nodes.\n */\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string | Date;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number;\n color: string;\n legend: string;\n /**\n * Data to show in callout\n */\n data?: number;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IChart {\n chartContainer: HTMLElement | null;\n toImage?: (opts?: IImageExportOptions) => Promise<string>;\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IImageExportOptions {\n width?: number;\n height?: number;\n scale?: number;\n background?: string;\n}\n"]}
1
+ {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalStackedBarDataPoint extends Omit<IDataPoint, 'x'> {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n * If data type on x is Date, then the data is spaced evenly by d3-scale.\n */\n x: number | string | Date;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Marker size of the points\n */\n markerSize?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends React.SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n\n /**\n * Defines the type of interpolation used to render the line.\n * @default 'linear'\n */\n curve?: 'linear' | 'natural' | 'step' | 'stepAfter' | 'stepBefore' | CurveFactory;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: React.SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: React.SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n /**\n * A unique identifier for this node.\n */\n nodeId: number | string;\n /**\n * The display name for this node in the UX.\n */\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n /**\n * The index within `ISankeyChartData.nodes` of the source node.\n */\n source: number;\n /**\n * The index within `ISankeyChartData.nodes` of the target node.\n */\n target: number;\n /**\n * The weight of this link between the two nodes.\n */\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string | Date;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number;\n color: string;\n legend: string;\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n /**\n * Data to show in callout\n */\n data?: number;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IChart {\n chartContainer: HTMLElement | null;\n toImage?: (opts?: IImageExportOptions) => Promise<string>;\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IImageExportOptions {\n width?: number;\n height?: number;\n scale?: number;\n background?: string;\n}\n"]}
@@ -2,6 +2,7 @@ import { Axis as D3Axis } from 'd3-axis';
2
2
  import { TimeLocaleDefinition as d3TimeLocaleDefinition } from 'd3-time-format';
3
3
  import { IAccessibilityProps, IEventsAnnotationProps, ILineChartPoints, IDataPoint, IVerticalStackedBarDataPoint, IVerticalBarChartDataPoint, IHorizontalBarChartWithAxisDataPoint, ILineChartLineOptions } from '../index';
4
4
  import { CurveFactory } from 'd3-shape';
5
+ export declare const MIN_DOMAIN_MARGIN = 8;
5
6
  export type NumericAxis = D3Axis<number | {
6
7
  valueOf(): number;
7
8
  }>;