@fluentui/react-charting 5.6.6 → 5.6.10

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 (62) hide show
  1. package/CHANGELOG.json +79 -1
  2. package/CHANGELOG.md +41 -2
  3. package/dist/react-charting.js +1 -1
  4. package/dist/react-charting.min.js +1 -1
  5. package/lib/components/CommonComponents/CartesianChart.base.js +1 -2
  6. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  7. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  8. package/lib/components/DonutChart/DonutChart.base.js +2 -1
  9. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  10. package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -2
  11. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  12. package/lib/components/Legends/Legends.base.js +3 -3
  13. package/lib/components/Legends/Legends.base.js.map +1 -1
  14. package/lib/components/LineChart/LineChart.base.js +10 -9
  15. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  16. package/lib/components/PieChart/Arc/Arc.js.map +1 -1
  17. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  18. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  19. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  20. package/lib/utilities/utilities.js +4 -4
  21. package/lib/utilities/utilities.js.map +1 -1
  22. package/lib/version.js +1 -1
  23. package/lib/version.js.map +1 -1
  24. package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -2
  25. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  26. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  27. package/lib-amd/components/DonutChart/DonutChart.base.js +2 -1
  28. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  29. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +1 -1
  30. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  31. package/lib-amd/components/Legends/Legends.base.js +2 -2
  32. package/lib-amd/components/Legends/Legends.base.js.map +1 -1
  33. package/lib-amd/components/LineChart/LineChart.base.js +9 -8
  34. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  35. package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
  36. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  37. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  38. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  39. package/lib-amd/utilities/utilities.js +3 -3
  40. package/lib-amd/utilities/utilities.js.map +1 -1
  41. package/lib-amd/version.js +1 -1
  42. package/lib-amd/version.js.map +1 -1
  43. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -2
  44. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  45. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  46. package/lib-commonjs/components/DonutChart/DonutChart.base.js +2 -1
  47. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  48. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -1
  49. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  50. package/lib-commonjs/components/Legends/Legends.base.js +2 -2
  51. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  52. package/lib-commonjs/components/LineChart/LineChart.base.js +9 -8
  53. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  54. package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
  55. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  56. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  57. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  58. package/lib-commonjs/utilities/utilities.js +3 -3
  59. package/lib-commonjs/utilities/utilities.js.map +1 -1
  60. package/lib-commonjs/version.js +1 -1
  61. package/lib-commonjs/version.js.map +1 -1
  62. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"Legends.base.js","sourceRoot":"../src/","sources":["components/Legends/Legends.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAuB,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAyB,MAAM,iCAAiC,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAStE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,IAAM,aAAa,GAAG,kBAAkB,EAAqC,CAAC;AAyB9E;IAAiC,+BAA4C;IAI3E,qBAAmB,KAAoB;QAAvC,YACE,kBAAM,KAAK,CAAC,SASb;QA6DO,mBAAa,GAAG,UAAC,IAAiD;YAClE,IAAA,KAAgD,KAAI,CAAC,KAAK,EAAxD,aAAa,mBAAA,EAAE,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAe,CAAC;YACjE,OAAO,CACL,oBAAC,WAAW,eACN,CAAC,mBAAmB,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,EACrE,aAAa,IACjB,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,aAAa,EAAE,IAAI,CAAC,QAAQ,EAC5B,YAAY,EAAE,KAAI,CAAC,aAAa,EAChC,sBAAsB,EAAE,KAAI,CAAC,oBAAoB,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AC,wBAAwB,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;YACjH,WAAW,GAAG,KAAK,CAAC;SACrB,CAAC,mFAAmF;QACrF,2CAA2C;aACtC,IACH,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,MAAM,CAAC;YACnE,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,KAAK;YACnC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,IAAI,CAAC,EACtC;YACA,WAAW,GAAG,KAAK,CAAC;SACrB;aAAM;YACL,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;SAC7B;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IACH,kBAAC;AAAD,CAAC,AAtZD,CAAiC,KAAK,CAAC,SAAS,GAsZ/C","sourcesContent":["import * as React from 'react';\n\nimport { IContextualMenuItem } from '@fluentui/react/lib/ContextualMenu';\nimport { HoverCard, HoverCardType, IExpandingCardProps } from '@fluentui/react/lib/HoverCard';\nimport { classNamesFunction, find, getNativeProps, buttonProperties } from '@fluentui/react/lib/Utilities';\nimport { ResizeGroup } from '@fluentui/react/lib/ResizeGroup';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { OverflowSet, IOverflowSetItemProps } from '@fluentui/react/lib/OverflowSet';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ILegend,\n ILegendsProps,\n LegendShape,\n ILegendsStyles,\n ILegendStyleProps,\n ILegendOverflowData,\n} from './Legends.types';\nimport { Shape } from './shape';\n\nimport { silceOrAppendToArray } from '../../utilities/utilities';\n\nconst getClassNames = classNamesFunction<ILegendStyleProps, ILegendsStyles>();\n\n// This is an internal interface used for rendering the legends with unique key\ninterface ILegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\nexport interface ILegendState {\n selectedLegend: string;\n selecetedLegendInHoverCard: string;\n selectedState: boolean;\n hoverState: boolean;\n isHoverCardVisible: boolean;\n selectedLegends: string[];\n}\nexport class LegendsBase extends React.Component<ILegendsProps, ILegendState> {\n private _hoverCardRef: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ILegendsStyles>;\n\n public constructor(props: ILegendsProps) {\n super(props);\n this.state = {\n selectedLegend: 'none',\n selectedState: false,\n hoverState: false,\n isHoverCardVisible: false,\n selecetedLegendInHoverCard: 'none',\n selectedLegends: [],\n };\n }\n\n public componentDidUpdate(prevProps: ILegendsProps) {\n if (prevProps.selectedLegend !== this.props.selectedLegend) {\n this.setState({ selectedLegend: this.props.selectedLegend! });\n }\n }\n\n public render(): JSX.Element {\n const { theme, className, styles } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const dataToRender = this._generateData();\n return (\n <div className={this._classNames.root}>\n {this.props.enabledWrapLines ? (\n this._onRenderData(dataToRender)\n ) : (\n <ResizeGroup\n data={dataToRender}\n onReduceData={this._onReduceData}\n onRenderData={this._onRenderData}\n onGrowData={this._onGrowData}\n />\n )}\n </div>\n );\n }\n\n private _generateData(): ILegendOverflowData {\n const { allowFocusOnLegends = true } = this.props;\n const dataItems: ILegendItem[] = this.props.legends.map((legend: ILegend, index: number) => {\n return {\n ...(allowFocusOnLegends && {\n nativeButtonProps: getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(legend, buttonProperties, [\n 'title',\n ]),\n 'aria-setsize': this.props.legends.length,\n 'aria-posinset': index + 1,\n }),\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n const result: ILegendOverflowData = {\n primary: dataItems,\n overflow: [],\n };\n return result;\n }\n\n private _onRenderData = (data: IOverflowSetItemProps | ILegendOverflowData): JSX.Element => {\n const { overflowProps, allowFocusOnLegends = true } = this.props;\n return (\n <OverflowSet\n {...(allowFocusOnLegends && { role: 'listbox', 'aria-label': 'Legends' })}\n {...overflowProps}\n items={data.primary}\n overflowItems={data.overflow}\n onRenderItem={this._renderButton}\n onRenderOverflowButton={this._renderOverflowItems}\n styles={{\n root: {\n justifyContent: this.props.centerLegends ? 'center' : 'unset',\n flexWrap: 'wrap',\n },\n }}\n />\n );\n };\n\n private _onReduceData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.primary.length === 0) {\n return;\n }\n const overflow = [...currentdata.primary.slice(-1), ...currentdata.overflow];\n const primary = currentdata.primary.slice(0, -1);\n return { primary, overflow };\n };\n\n private _onGrowData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.overflow.length === 0) {\n return;\n }\n const overflow = currentdata.overflow.slice(1);\n const primary = [...currentdata.primary, ...currentdata.overflow.slice(0, 1)];\n return { primary, overflow };\n };\n\n /**\n * This function will get called when there is an ability to\n * select multiple legends\n * @param legend ILegend\n */\n private _canSelectMultipleLegends = (legend: ILegend): void => {\n const selectedLegends = silceOrAppendToArray(this.state.selectedLegends, legend.title);\n this.setState({\n //check if user selected all legends then empty it get the default behaviour\n selectedLegends: selectedLegends.length === this.props.legends.length ? [] : selectedLegends,\n // make selectedState to false if none or all the legends selected\n selectedState:\n selectedLegends.length === 0 || selectedLegends.length === this.props.legends.length ? false : true,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n selectedLegend: 'none',\n hoverState: false,\n });\n };\n\n /**\n * This function will get called when there is\n * ability to select only single legend\n * @param legend ILegend\n */\n\n private _canSelectOnlySingleLegend = (legend: ILegend): void => {\n if (this.state.selectedState === true && this.state.selectedLegend === legend.title) {\n this.setState({\n selectedLegend: 'none',\n selectedState: false,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n });\n } else {\n this.setState({\n hoverState: true,\n selectedState: true,\n selectedLegend: legend.title,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n });\n }\n };\n\n private _onClick = (legend: ILegend): void => {\n if (legend.action) {\n const { canSelectMultipleLegends = false } = this.props;\n if (canSelectMultipleLegends) {\n this._canSelectMultipleLegends(legend);\n } else {\n this._canSelectOnlySingleLegend(legend);\n }\n legend.action();\n }\n };\n\n private _onRenderCompactCard = (expandingCard: IExpandingCardProps): JSX.Element => {\n const { allowFocusOnLegends = true, className, styles, theme } = this.props;\n const overflowHoverCardLegends: JSX.Element[] = [];\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n expandingCard.renderData.forEach((legend: IOverflowSetItemProps, index: number) => {\n const hoverCardElement = this._renderButton(legend, index, true);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const hoverCardData = (\n <FocusZone\n {...(allowFocusOnLegends && { role: 'listbox' })}\n direction={FocusZoneDirection.vertical}\n {...this.props.focusZonePropsInHoverCard}\n className={classNames.hoverCardRoot}\n >\n {overflowHoverCardLegends}\n </FocusZone>\n );\n return hoverCardData;\n };\n\n private _renderOverflowItems = (legends: ILegend[]) => {\n const { allowFocusOnLegends = true } = this.props;\n const items: IContextualMenuItem[] = [];\n legends.forEach((legend: ILegend, i: number) => {\n items.push({ key: i.toString(), name: legend.title, onClick: legend.action });\n });\n const renderOverflowData: IExpandingCardProps = { renderData: legends };\n const { theme, className, styles, overflowText } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const plainCardProps = {\n onRenderPlainCard: this._onRenderCompactCard,\n renderData: renderOverflowData,\n };\n\n const overflowString = overflowText ? overflowText : 'more';\n // execute similar to \"_onClick\" and \"_onLeave\" logic at HoverCard onCardHide event\n const onHoverCardHideHandler = () => {\n const { canSelectMultipleLegends = false } = this.props;\n const selectedOverflowItem = find(\n legends,\n (legend: ILegend) =>\n legend.title === this.state.selecetedLegendInHoverCard || legend.title === this.state.selectedLegend,\n );\n this.setState(\n {\n isHoverCardVisible: false,\n selecetedLegendInHoverCard: 'none',\n selectedLegends: [],\n },\n () => {\n if (selectedOverflowItem) {\n this.setState({ selectedLegend: 'none', selectedState: false }, () => {\n if (selectedOverflowItem.action && !canSelectMultipleLegends) {\n selectedOverflowItem.action();\n }\n if (this.props.onLegendHoverCardLeave && canSelectMultipleLegends) {\n this.props.onLegendHoverCardLeave();\n }\n this.setState({ hoverState: false }, () => {\n if (selectedOverflowItem.onMouseOutAction) {\n selectedOverflowItem.onMouseOutAction(true);\n }\n });\n });\n }\n },\n );\n };\n return (\n <HoverCard\n type={HoverCardType.plain}\n plainCardProps={plainCardProps}\n instantOpenOnClick={true}\n // eslint-disable-next-line react/jsx-no-bind\n onCardHide={onHoverCardHideHandler}\n setInitialFocus={true}\n trapFocus={true}\n onCardVisible={this._hoverCardVisible}\n styles={classNames.subComponentStyles.hoverCardStyles}\n cardDismissDelay={300}\n target={this._hoverCardRef}\n >\n <div\n className={classNames.overflowIndicationTextStyle}\n ref={(rootElem: HTMLDivElement) => (this._hoverCardRef = rootElem)}\n {...(allowFocusOnLegends && {\n role: 'link',\n 'aria-expanded': this.state.isHoverCardVisible,\n 'aria-label': `${items.length} ${overflowString}`,\n })}\n data-is-focusable={allowFocusOnLegends}\n >\n {items.length} {overflowString}\n </div>\n </HoverCard>\n );\n };\n\n private _hoverCardVisible = () => {\n this.setState({ isHoverCardVisible: true });\n };\n\n private _onHoverOverLegend = (legend: ILegend) => {\n if (!this.state.selectedState) {\n if (legend.hoverAction) {\n this.setState({ hoverState: true, selectedLegend: legend.title });\n legend.hoverAction();\n }\n }\n };\n\n private _onLeave = (legend: ILegend) => {\n if (!this.state.selectedState) {\n if (legend.onMouseOutAction) {\n this.setState({ hoverState: false, selectedLegend: 'none' });\n legend.onMouseOutAction();\n }\n }\n };\n\n private _renderButton = (data: IOverflowSetItemProps, index?: number, overflow?: boolean) => {\n const { allowFocusOnLegends = true } = this.props;\n const legend: ILegend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = this._getColor(legend.title, legend.color);\n const { theme, className, styles } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n colorOnSelectedState: color,\n borderColor: legend.color,\n overflow: overflow,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n });\n const onClickHandler = () => {\n this._onClick(legend);\n };\n const onHoverHandler = () => {\n this._onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n this._onLeave(legend);\n };\n const shape = this._getShape(classNames, legend, color);\n return (\n <button\n {...(allowFocusOnLegends && {\n 'aria-selected': this.state.selectedLegend === legend.title,\n role: 'option',\n 'aria-label': legend.title,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classNames.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n data-is-focusable={allowFocusOnLegends}\n /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classNames.text}>{legend.title}</div>\n </button>\n );\n };\n\n private _getShape(\n classNames: IProcessedStyleSet<ILegendsStyles>,\n legend: ILegend,\n color: string,\n ): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classNames.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classNames.rect}\n />\n );\n }\n\n private _getColor(title: string, color: string): string {\n const { theme, canSelectMultipleLegends = false } = this.props;\n const { palette } = theme!;\n let legendColor = color;\n // below if statement will get executed for the hovered legend.\n // (which is also the slected legend see fucntion:-_onHoverOverLegend)\n if (this.state.hoverState && this.state.selectedLegend === title) {\n legendColor = color;\n } // below esle if statement will get executed for the unselected-legend which is hovered\n else if (this.state.hoverState && this.state.selectedLegend !== 'none' && this.state.selectedLegend !== title) {\n legendColor = palette.white;\n } // below else if statement will get executed if the legends are in the selected state\n // this is will only get executed when we have ability to select multiple legends\n else if (!!canSelectMultipleLegends && this.state.selectedState && this.state.selectedLegends.indexOf(title) > -1) {\n legendColor = color;\n } // below else if statement will get executed when no legend is selected and hovered\n //(for example:- initial render of legends)\n else if (\n (!this.state.selectedState && this.state.selectedLegend === 'none') ||\n this.state.selectedLegend === title ||\n this.state.selectedLegends.length <= 0\n ) {\n legendColor = color;\n } else {\n legendColor = palette.white;\n }\n return legendColor;\n }\n}\n"]}
1
+ {"version":3,"file":"Legends.base.js","sourceRoot":"../src/","sources":["components/Legends/Legends.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAuB,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAyB,MAAM,iCAAiC,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAStE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,oBAA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extualMenuItem } from '@fluentui/react/lib/ContextualMenu';\nimport { HoverCard, HoverCardType, IExpandingCardProps } from '@fluentui/react/lib/HoverCard';\nimport { classNamesFunction, find, getNativeProps, buttonProperties } from '@fluentui/react/lib/Utilities';\nimport { ResizeGroup } from '@fluentui/react/lib/ResizeGroup';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { OverflowSet, IOverflowSetItemProps } from '@fluentui/react/lib/OverflowSet';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ILegend,\n ILegendsProps,\n LegendShape,\n ILegendsStyles,\n ILegendStyleProps,\n ILegendOverflowData,\n} from './Legends.types';\nimport { Shape } from './shape';\n\nimport { silceOrAppendToArray } from '../../utilities/utilities';\n\nconst getClassNames = classNamesFunction<ILegendStyleProps, ILegendsStyles>();\n\n// This is an internal interface used for rendering the legends with unique key\ninterface ILegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\nexport interface ILegendState {\n selectedLegend: string;\n selecetedLegendInHoverCard: string;\n selectedState: boolean;\n hoverState: boolean;\n isHoverCardVisible: boolean;\n selectedLegends: string[];\n}\nexport class LegendsBase extends React.Component<ILegendsProps, ILegendState> {\n private _hoverCardRef: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ILegendsStyles>;\n\n public constructor(props: ILegendsProps) {\n super(props);\n this.state = {\n selectedLegend: 'none',\n selectedState: false,\n hoverState: false,\n isHoverCardVisible: false,\n selecetedLegendInHoverCard: 'none',\n selectedLegends: [],\n };\n }\n\n public componentDidUpdate(prevProps: ILegendsProps) {\n if (prevProps.selectedLegend !== this.props.selectedLegend) {\n this.setState({ selectedLegend: this.props.selectedLegend! });\n }\n }\n\n public render(): JSX.Element {\n const { theme, className, styles } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const dataToRender = this._generateData();\n return (\n <div className={this._classNames.root}>\n {this.props.enabledWrapLines ? (\n this._onRenderData(dataToRender)\n ) : (\n <ResizeGroup\n data={dataToRender}\n onReduceData={this._onReduceData}\n onRenderData={this._onRenderData}\n onGrowData={this._onGrowData}\n />\n )}\n </div>\n );\n }\n\n private _generateData(): ILegendOverflowData {\n const { allowFocusOnLegends = true } = this.props;\n const dataItems: ILegendItem[] = this.props.legends.map((legend: ILegend, index: number) => {\n return {\n ...(allowFocusOnLegends && {\n nativeButtonProps: getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(legend, buttonProperties, [\n 'title',\n ]),\n 'aria-setsize': this.props.legends.length,\n 'aria-posinset': index + 1,\n }),\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n const result: ILegendOverflowData = {\n primary: dataItems,\n overflow: [],\n };\n return result;\n }\n\n private _onRenderData = (data: IOverflowSetItemProps | ILegendOverflowData): JSX.Element => {\n const { overflowProps, allowFocusOnLegends = true } = this.props;\n return (\n <OverflowSet\n {...(allowFocusOnLegends && { role: 'listbox', 'aria-label': 'Legends' })}\n {...overflowProps}\n items={data.primary}\n overflowItems={data.overflow}\n onRenderItem={this._renderButton}\n onRenderOverflowButton={this._renderOverflowItems}\n styles={{\n root: {\n justifyContent: this.props.centerLegends ? 'center' : 'unset',\n flexWrap: 'wrap',\n },\n }}\n />\n );\n };\n\n private _onReduceData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.primary.length === 0) {\n return;\n }\n const overflow = [...currentdata.primary.slice(-1), ...currentdata.overflow];\n const primary = currentdata.primary.slice(0, -1);\n return { primary, overflow };\n };\n\n private _onGrowData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.overflow.length === 0) {\n return;\n }\n const overflow = currentdata.overflow.slice(1);\n const primary = [...currentdata.primary, ...currentdata.overflow.slice(0, 1)];\n return { primary, overflow };\n };\n\n /**\n * This function will get called when there is an ability to\n * select multiple legends\n * @param legend ILegend\n */\n private _canSelectMultipleLegends = (legend: ILegend): void => {\n const selectedLegends = silceOrAppendToArray(this.state.selectedLegends, legend.title);\n this.setState({\n //check if user selected all legends then empty it get the default behaviour\n selectedLegends: selectedLegends.length === this.props.legends.length ? [] : selectedLegends,\n // make selectedState to false if none or all the legends selected\n selectedState:\n selectedLegends.length === 0 || selectedLegends.length === this.props.legends.length ? false : true,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n selectedLegend: 'none',\n hoverState: false,\n });\n };\n\n /**\n * This function will get called when there is\n * ability to select only single legend\n * @param legend ILegend\n */\n\n private _canSelectOnlySingleLegend = (legend: ILegend): void => {\n if (this.state.selectedState === true && this.state.selectedLegend === legend.title) {\n this.setState({\n selectedLegend: 'none',\n selectedState: false,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n });\n } else {\n this.setState({\n hoverState: true,\n selectedState: true,\n selectedLegend: legend.title,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n });\n }\n };\n\n private _onClick = (legend: ILegend): void => {\n if (legend.action) {\n const { canSelectMultipleLegends = false } = this.props;\n if (canSelectMultipleLegends) {\n this._canSelectMultipleLegends(legend);\n } else {\n this._canSelectOnlySingleLegend(legend);\n }\n legend.action();\n }\n };\n\n private _onRenderCompactCard = (expandingCard: IExpandingCardProps): JSX.Element => {\n const { allowFocusOnLegends = true, className, styles, theme } = this.props;\n const overflowHoverCardLegends: JSX.Element[] = [];\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n expandingCard.renderData.forEach((legend: IOverflowSetItemProps, index: number) => {\n const hoverCardElement = this._renderButton(legend, index, true);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const hoverCardData = (\n <FocusZone\n {...(allowFocusOnLegends && { role: 'listbox' })}\n direction={FocusZoneDirection.vertical}\n {...this.props.focusZonePropsInHoverCard}\n className={classNames.hoverCardRoot}\n >\n {overflowHoverCardLegends}\n </FocusZone>\n );\n return hoverCardData;\n };\n\n private _renderOverflowItems = (legends: ILegend[]) => {\n const { allowFocusOnLegends = true } = this.props;\n const items: IContextualMenuItem[] = [];\n legends.forEach((legend: ILegend, i: number) => {\n items.push({ key: i.toString(), name: legend.title, onClick: legend.action });\n });\n const renderOverflowData: IExpandingCardProps = { renderData: legends };\n const { theme, className, styles, overflowText } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const plainCardProps = {\n onRenderPlainCard: this._onRenderCompactCard,\n renderData: renderOverflowData,\n };\n\n const overflowString = overflowText ? overflowText : 'more';\n // execute similar to \"_onClick\" and \"_onLeave\" logic at HoverCard onCardHide event\n const onHoverCardHideHandler = () => {\n const { canSelectMultipleLegends = false } = this.props;\n const selectedOverflowItem = find(\n legends,\n (legend: ILegend) =>\n legend.title === this.state.selecetedLegendInHoverCard || legend.title === this.state.selectedLegend,\n );\n this.setState(\n {\n isHoverCardVisible: false,\n selecetedLegendInHoverCard: 'none',\n selectedLegends: [],\n },\n () => {\n if (selectedOverflowItem) {\n this.setState({ selectedLegend: 'none', selectedState: false }, () => {\n if (selectedOverflowItem.action && !canSelectMultipleLegends) {\n selectedOverflowItem.action();\n }\n if (this.props.onLegendHoverCardLeave && canSelectMultipleLegends) {\n this.props.onLegendHoverCardLeave();\n }\n this.setState({ hoverState: false }, () => {\n if (selectedOverflowItem.onMouseOutAction) {\n selectedOverflowItem.onMouseOutAction(true);\n }\n });\n });\n }\n },\n );\n };\n return (\n <HoverCard\n type={HoverCardType.plain}\n plainCardProps={plainCardProps}\n instantOpenOnClick={true}\n // eslint-disable-next-line react/jsx-no-bind\n onCardHide={onHoverCardHideHandler}\n setInitialFocus={true}\n trapFocus={true}\n onCardVisible={this._hoverCardVisible}\n styles={classNames.subComponentStyles.hoverCardStyles}\n cardDismissDelay={300}\n target={this._hoverCardRef}\n >\n <div\n className={classNames.overflowIndicationTextStyle}\n ref={(rootElem: HTMLDivElement) => (this._hoverCardRef = rootElem)}\n {...(allowFocusOnLegends && {\n role: 'link',\n 'aria-expanded': this.state.isHoverCardVisible,\n 'aria-label': `${items.length} ${overflowString}`,\n })}\n data-is-focusable={allowFocusOnLegends}\n >\n {items.length} {overflowString}\n </div>\n </HoverCard>\n );\n };\n\n private _hoverCardVisible = () => {\n this.setState({ isHoverCardVisible: true });\n };\n\n private _onHoverOverLegend = (legend: ILegend) => {\n if (!this.state.selectedState) {\n if (legend.hoverAction) {\n this.setState({ hoverState: true, selectedLegend: legend.title });\n legend.hoverAction();\n }\n }\n };\n\n private _onLeave = (legend: ILegend) => {\n if (!this.state.selectedState) {\n if (legend.onMouseOutAction) {\n this.setState({ hoverState: false, selectedLegend: 'none' });\n legend.onMouseOutAction();\n }\n }\n };\n\n private _renderButton = (data: IOverflowSetItemProps, index?: number, overflow?: boolean) => {\n const { allowFocusOnLegends = true } = this.props;\n const legend: ILegend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = this._getColor(legend.title, legend.color);\n const { theme, className, styles } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n colorOnSelectedState: color,\n borderColor: legend.color,\n overflow: overflow,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n });\n const onClickHandler = () => {\n this._onClick(legend);\n };\n const onHoverHandler = () => {\n this._onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n this._onLeave(legend);\n };\n const shape = this._getShape(classNames, legend, color);\n return (\n <button\n {...(allowFocusOnLegends && {\n 'aria-selected': this.state.selectedLegend === legend.title,\n role: 'option',\n 'aria-label': legend.title,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classNames.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n data-is-focusable={allowFocusOnLegends}\n /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classNames.text}>{legend.title}</div>\n </button>\n );\n };\n\n private _getShape(\n classNames: IProcessedStyleSet<ILegendsStyles>,\n legend: ILegend,\n color: string,\n ): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classNames.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classNames.rect}\n />\n );\n }\n\n private _getColor(title: string, color: string): string {\n const { theme, canSelectMultipleLegends = false } = this.props;\n const { palette } = theme!;\n let legendColor = color;\n // below if statement will get executed for the hovered legend.\n // (which is also the slected legend see fucntion:-_onHoverOverLegend)\n if (this.state.hoverState && this.state.selectedLegend === title) {\n legendColor = color;\n } // below esle if statement will get executed for the unselected-legend which is hovered\n else if (this.state.hoverState && this.state.selectedLegend !== 'none' && this.state.selectedLegend !== title) {\n legendColor = palette.white;\n } // below else if statement will get executed if the legends are in the selected state\n // this is will only get executed when we have ability to select multiple legends\n else if (!!canSelectMultipleLegends && this.state.selectedState && this.state.selectedLegends.indexOf(title) > -1) {\n legendColor = color;\n } // below else if statement will get executed when no legend is selected and hovered\n //(for example:- initial render of legends)\n else if (\n (!this.state.selectedState && this.state.selectedLegend === 'none') ||\n this.state.selectedLegend === title ||\n this.state.selectedLegends.length <= 0\n ) {\n legendColor = color;\n } else {\n legendColor = palette.white;\n }\n return legendColor;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { __assign, __extends, __spreadArrays } from "tslib";
1
+ import { __assign, __extends, __spreadArray } from "tslib";
2
2
  import * as React from 'react';
3
3
  import { select as d3Select } from 'd3-selection';
4
4
  import { Legends } from '../Legends/index';
@@ -302,7 +302,7 @@ var LineChartBase = /** @class */ (function (_super) {
302
302
  }, -1);
303
303
  var selectedLines;
304
304
  if (selectedLineIndex === -1) {
305
- selectedLines = __spreadArrays(_this_1.state.selectedLegendPoints, [selectedLine]);
305
+ selectedLines = __spreadArray(__spreadArray([], _this_1.state.selectedLegendPoints), [selectedLine]);
306
306
  }
307
307
  else {
308
308
  selectedLines = _this_1.state.selectedLegendPoints
@@ -342,7 +342,7 @@ var LineChartBase = /** @class */ (function (_super) {
342
342
  }, -1);
343
343
  var selectedColorFillBars;
344
344
  if (selectedColorFillBarIndex === -1) {
345
- selectedColorFillBars = __spreadArrays(_this_1.state.selectedColorBarLegend, [selectedColorFillBar]);
345
+ selectedColorFillBars = __spreadArray(__spreadArray([], _this_1.state.selectedColorBarLegend), [selectedColorFillBar]);
346
346
  }
347
347
  else {
348
348
  selectedColorFillBars = _this_1.state.selectedColorBarLegend
@@ -501,7 +501,7 @@ var LineChartBase = /** @class */ (function (_super) {
501
501
  return legend;
502
502
  })
503
503
  : [];
504
- var legends = (React.createElement(Legends, __assign({ legends: __spreadArrays(legendDataItems, colorFillBarsLegendDataItems), enabledWrapLines: this.props.enabledLegendsWrapLines, overflowProps: this.props.legendsOverflowProps, focusZonePropsInHoverCard: this.props.focusZonePropsForLegendsInHoverCard, overflowText: this.props.legendsOverflowText }, (isLegendMultiSelectEnabled && { onLegendHoverCardLeave: this._onHoverCardHide }), this.props.legendProps)));
504
+ var legends = (React.createElement(Legends, __assign({ legends: __spreadArray(__spreadArray([], legendDataItems), colorFillBarsLegendDataItems), enabledWrapLines: this.props.enabledLegendsWrapLines, overflowProps: this.props.legendsOverflowProps, focusZonePropsInHoverCard: this.props.focusZonePropsForLegendsInHoverCard, overflowText: this.props.legendsOverflowText }, (isLegendMultiSelectEnabled && { onLegendHoverCardLeave: this._onHoverCardHide }), this.props.legendProps)));
505
505
  return legends;
506
506
  };
507
507
  LineChartBase.prototype._createLines = function (xElement) {
@@ -537,8 +537,8 @@ var LineChartBase = /** @class */ (function (_super) {
537
537
  var lineId = "" + this_1._lineId + i + j;
538
538
  var borderId = "" + this_1._borderId + i + j;
539
539
  var circleId = "" + this_1._circleId + i + j;
540
- var _a = this_1._points[i].data[j - 1], x1 = _a.x, y1 = _a.y, xAxisCalloutData = _a.xAxisCalloutData, xAxisCalloutAccessibilityData = _a.xAxisCalloutAccessibilityData;
541
- var _b = this_1._points[i].data[j], x2 = _b.x, y2 = _b.y;
540
+ var _s = this_1._points[i].data[j - 1], x1 = _s.x, y1 = _s.y, xAxisCalloutData = _s.xAxisCalloutData, xAxisCalloutAccessibilityData = _s.xAxisCalloutAccessibilityData;
541
+ var _t = this_1._points[i].data[j], x2 = _t.x, y2 = _t.y;
542
542
  var path = this_1._getPath(this_1._xAxisScale(x1), this_1._yAxisScale(y1), circleId, j, false, this_1._points[i].index);
543
543
  var strokeWidth = ((_c = this_1._points[i].lineOptions) === null || _c === void 0 ? void 0 : _c.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
544
544
  var isLegendSelected = this_1.state.activeLegend === legendVal || this_1.state.activeLegend === '' || this_1.state.isSelectedLegend;
@@ -547,7 +547,7 @@ var LineChartBase = /** @class */ (function (_super) {
547
547
  if (j + 1 === this_1._points[i].data.length) {
548
548
  var lastCircleId_1 = "" + circleId + j + "L";
549
549
  path = this_1._getPath(this_1._xAxisScale(x2), this_1._yAxisScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
550
- var _c = this_1._points[i].data[j], lastCirlceXCallout_1 = _c.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _c.xAxisCalloutAccessibilityData;
550
+ var _u = this_1._points[i].data[j], lastCirlceXCallout_1 = _u.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _u.xAxisCalloutAccessibilityData;
551
551
  pointsForLine.push(React.createElement("path", { id: lastCircleId_1, key: lastCircleId_1, d: path, "data-is-focusable": i === 0 ? true : false, onMouseOver: this_1._handleHover.bind(this_1, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1), onMouseMove: this_1._handleHover.bind(this_1, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1), onMouseOut: this_1._handleMouseOut, onFocus: function () {
552
552
  return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
553
553
  }, onBlur: this_1._handleMouseOut, onClick: this_1._onDataPointClick.bind(this_1, this_1._points[i].data[j].onDataPointClick), visibility: hideNonActiveDots ? 'hidden' : 'visible', opacity: isLegendSelected ? 1 : 0.01, fill: this_1._getPointFill(lineColor, lastCircleId_1, j, true), stroke: lineColor, strokeWidth: 2 }));
@@ -556,7 +556,8 @@ var LineChartBase = /** @class */ (function (_super) {
556
556
  if (isLegendSelected) {
557
557
  // don't draw line if it is in a gap
558
558
  if (!isInGap) {
559
- var lineBorderWidth = ((_d = this_1._points[i].lineOptions) === null || _d === void 0 ? void 0 : _d.lineBorderWidth) ? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
559
+ var lineBorderWidth = ((_d = this_1._points[i].lineOptions) === null || _d === void 0 ? void 0 : _d.lineBorderWidth)
560
+ ? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
560
561
  : 0;
561
562
  if (lineBorderWidth > 0) {
562
563
  bordersForLine.push(React.createElement("line", { id: borderId, key: borderId, x1: this_1._xAxisScale(x1), y1: this_1._yAxisScale(y1), x2: this_1._xAxisScale(x2), y2: this_1._yAxisScale(y2), strokeLinecap: (_f = (_e = this_1._points[i].lineOptions) === null || _e === void 0 ? void 0 : _e.strokeLinecap) !== null && _f !== void 0 ? _f : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_g = this_1._points[i].lineOptions) === null || _g === void 0 ? void 0 : _g.lineBorderColor) || theme.palette.white, opacity: 1 }));
@@ -576,7 +577,7 @@ var LineChartBase = /** @class */ (function (_super) {
576
577
  for (var j = 1; j < this._points[i].data.length; j++) {
577
578
  _loop_1(j);
578
579
  }
579
- lines.push.apply(lines, __spreadArrays(bordersForLine, linesForLine));
580
+ lines.push.apply(lines, __spreadArray(__spreadArray([], bordersForLine), linesForLine));
580
581
  points.push.apply(points, pointsForLine);
581
582
  }
582
583
  var classNames = getClassNames(this.props.styles, {
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.base.js","sourceRoot":"../src/","sources":["components/LineChart/LineChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAW,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAEL,cAAc,GAYf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,MAAM,EACN,UAAU,GACX,MAAM,uBAAuB,CAAC;AAG/B,IAAM,aAAa,GAAG,kBAAkB,EAA0C,CAAC;AAEnF,IAAK,SAGJ;AAHD,WAAK,SAAS;IACZ,oDAAc,CAAA;IACd,2DAAiB,CAAA;AACnB,CAAC,EAHI,SAAS,KAAT,SAAS,QAGb;AAED,IA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AmC,KAAK,CAAC,SAAS,GAg2BjD","sourcesContent":["import * as React from 'react';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { ILegend, Legends } from '../Legends/index';\nimport { classNamesFunction, getId, find } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n IBasestate,\n IChildProps,\n ILineChartProps,\n ILineChartPoints,\n ICustomizedCalloutData,\n IMargins,\n IRefArrayData,\n IColorFillBarsProps,\n ILineChartStyleProps,\n ILineChartStyles,\n ILineChartGap,\n} from '../../index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfXAxislabels,\n Points,\n pointTypes,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nconst getClassNames = classNamesFunction<ILineChartStyleProps, ILineChartStyles>();\n\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\n\nconst DEFAULT_LINE_STROKE_SIZE = 4;\n// The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)\nconst PATH_MULTIPLY_SIZE = 2.5;\n\n/**\n *\n * @param x units from origin\n * @param y units from origin\n * @param w is the legnth of the each side of a shape\n * @param index index to get the shape path\n */\nconst _getPointPath = (x: number, y: number, w: number, index: number): string => {\n const allPointPaths = [\n // circle path\n `M${x - w / 2} ${y}\n A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}\n M${x - w / 2} ${y}\n A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}\n `,\n //square\n `M${x - w / 2} ${y - w / 2}\n L${x + w / 2} ${y - w / 2}\n L${x + w / 2} ${y + w / 2}\n L${x - w / 2} ${y + w / 2}\n Z`,\n //triangle\n `M${x - w / 2} ${y - 0.2886 * w}\n H ${x + w / 2}\n L${x} ${y + 0.5774 * w} Z`,\n //diamond\n `M${x} ${y - w / 2}\n L${x + w / 2} ${y}\n L${x} ${y + w / 2}\n L${x - w / 2} ${y}\n Z`,\n //pyramid\n `M${x} ${y - 0.5774 * w}\n L${x + w / 2} ${y + 0.2886 * w}\n L${x - w / 2} ${y + 0.2886 * w} Z`,\n //hexagon\n `M${x - 0.5 * w} ${y - 0.866 * w}\n L${x + 0.5 * w} ${y - 0.866 * w}\n L${x + w} ${y}\n L${x + 0.5 * w} ${y + 0.866 * w}\n L${x - 0.5 * w} ${y + 0.866 * w}\n L${x - w} ${y}\n Z`,\n //pentagon\n `M${x} ${y - 0.851 * w}\n L${x + 0.6884 * w} ${y - 0.2633 * w}\n L${x + 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.6884 * w} ${y - 0.2633 * w}\n Z`,\n //octagon\n `M${x - 0.5001 * w} ${y - 1.207 * w}\n L${x + 0.5001 * w} ${y - 1.207 * w}\n L${x + 1.207 * w} ${y - 0.5001 * w}\n L${x + 1.207 * w} ${y + 0.5001 * w}\n L${x + 0.5001 * w} ${y + 1.207 * w}\n L${x - 0.5001 * w} ${y + 1.207 * w}\n L${x - 1.207 * w} ${y + 0.5001 * w}\n L${x - 1.207 * w} ${y - 0.5001 * w}\n Z`,\n ];\n return allPointPaths[index];\n};\n\ntype LineChartDataWithIndex = ILineChartPoints & { index: number };\n\nexport interface ILineChartState extends IBasestate {\n // This array contains data of selected legends for points\n selectedLegendPoints: LineChartDataWithIndex[];\n // This array contains data of selected legends for color bars\n selectedColorBarLegend: IColorFillBarsProps[];\n // This is a boolean value which is set to true\n // when at least one legend is selected\n isSelectedLegend: boolean;\n // This value will be used as customized callout props - point callout.\n dataPointCalloutProps?: ICustomizedCalloutData;\n // This value will be used as Customized callout props - For stack callout.\n stackCalloutProps?: ICustomizedCalloutData;\n // active or hovered point\n activePoint?: string;\n // x-axis callout accessibility data\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class LineChartBase extends React.Component<ILineChartProps, ILineChartState> {\n private _points: LineChartDataWithIndex[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _yAxisScale: any = '';\n private _circleId: string;\n private _lineId: string;\n private _borderId: string;\n private _verticalLine: string;\n private _colorFillBarPatternId: string;\n private _uniqueCallOutID: string;\n private _refArray: IRefArrayData[];\n private margins: IMargins;\n private eventLabelHeight: number = 36;\n private lines: JSX.Element[];\n private _renderedColorFillBars: JSX.Element[];\n private _colorFillBars: IColorFillBarsProps[];\n private _colorFillBarsOpacity: number;\n private _tooltipId: string;\n\n constructor(props: ILineChartProps) {\n super(props);\n this.state = {\n hoverXValue: '',\n activeLegend: '',\n YValueHover: [],\n refSelected: '',\n selectedLegend: '',\n isCalloutVisible: false,\n selectedLegendPoints: [],\n selectedColorBarLegend: [],\n isSelectedLegend: false,\n activePoint: '',\n };\n this._refArray = [];\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n this._colorFillBars = [];\n this._colorFillBarsOpacity = 0.4;\n this._calloutPoints = calloutData(this._points) || [];\n this._circleId = getId('circle');\n this._lineId = getId('lineID');\n this._borderId = getId('borderID');\n this._verticalLine = getId('verticalLine');\n this._colorFillBarPatternId = getId('colorFillBarPattern');\n this._tooltipId = getId('LineChartTooltipId_');\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (this.eventLabelHeight = props.eventAnnotationProps.labelHeight);\n }\n\n public componentDidUpdate(prevProps: ILineChartProps): void {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width ||\n prevProps.data !== this.props.data\n ) {\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n this._calloutPoints = calloutData(this._points) || [];\n }\n }\n\n public render(): JSX.Element {\n const { tickValues, tickFormat, eventAnnotationProps, legendProps, data } = this.props;\n this._points = this._injectIndexPropertyInLineChartData(data.lineChartData);\n\n const isXAxisDateType = getXAxisType(this._points);\n let points = this._points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = this.state.selectedLegendPoints.length >= 1 ? this.state.selectedLegendPoints : this._points;\n this._calloutPoints = calloutData(points);\n }\n\n const legendBars = this._createLegends(this._points!);\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n onDismiss: this._closeCallout,\n preventDismissOnEvent: () => true,\n hidden: !(!this.props.hideTooltip && this.state.isCalloutVisible),\n descriptionMessage:\n this.props.getCalloutDescriptionMessage && this.state.stackCalloutProps\n ? this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n const tickParams = {\n tickValues: tickValues,\n tickFormat: tickFormat,\n };\n\n return (\n <CartesianChart\n {...this.props}\n chartTitle={data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n isCalloutForStack\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={this._getMargins}\n getGraphData={this._initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n customizedCallout={this._getCustomizedCallout()}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisScale = props.xScale!;\n this._yAxisScale = props.yScale!;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'steelblue'}\n id={this._verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n <g>\n {this._renderedColorFillBars}\n {this.lines}\n </g>\n {eventAnnotationProps && (\n <EventsAnnotation\n {...eventAnnotationProps}\n scale={props.xScale!}\n chartYTop={this.margins.top! + this.eventLabelHeight}\n chartYBottom={props.containerHeight! - 35}\n />\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n\n private _injectIndexPropertyInLineChartData = (lineChartData?: ILineChartPoints[]): LineChartDataWithIndex[] | [] => {\n const { allowMultipleShapesForPoints = false } = this.props;\n return lineChartData\n ? lineChartData.map((item: ILineChartPoints, index: number) => ({\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n }))\n : [];\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _initializeLineChartData = (\n xScale: NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._xAxisScale = xScale;\n this._yAxisScale = yScale;\n this._renderedColorFillBars = this.props.colorFillBars ? this._createColorFillBars(containerHeight) : [];\n this.lines = this._createLines(xElement!);\n };\n\n private _handleSingleLegendSelectionAction = (lineChartItem: LineChartDataWithIndex | IColorFillBarsProps) => {\n if (this.state.selectedLegend === lineChartItem.legend) {\n this.setState({ selectedLegend: '', activeLegend: lineChartItem.legend });\n this._handleLegendClick(lineChartItem, null);\n } else {\n this.setState({\n selectedLegend: lineChartItem.legend,\n activeLegend: lineChartItem.legend,\n });\n this._handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n };\n\n private _onHoverCardHide = () => {\n this.setState({\n selectedLegendPoints: [],\n selectedColorBarLegend: [],\n isSelectedLegend: false,\n });\n };\n\n private _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = this.props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: LineChartDataWithIndex) => {\n const color: string = point.color;\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color: color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n this._handleMultipleLineLegendSelectionAction(point);\n } else {\n this._handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n hoverAction: () => {\n this.setState({ activeLegend: point.legend });\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as ILegend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = this.props.colorFillBars\n ? this.props.colorFillBars.map((colorFillBar: IColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const legend: ILegend = {\n title,\n color: colorFillBar.color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n this._handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n this._handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n hoverAction: () => {\n this.setState({ activeLegend: title });\n },\n opacity: this._colorFillBarsOpacity,\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n const legends = (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: this._onHoverCardHide })}\n {...this.props.legendProps}\n />\n );\n return legends;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getBoxWidthOfShape = (pointId: string, pointIndex: number, isLastPoint: boolean) => {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = this.props;\n const { activePoint } = this.state;\n if (allowMultipleShapesForPoints) {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else if (pointIndex === 1 || isLastPoint) {\n return strokeWidth * PATH_MULTIPLY_SIZE;\n } else {\n return PointSize.invisibleSize;\n }\n } else {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else {\n return PointSize.invisibleSize;\n }\n }\n };\n\n private _getPath = (\n xPos: number,\n yPos: number,\n pointId: string,\n pointIndex: number,\n isLastPoint: boolean,\n pointOftheLine: number,\n ): string => {\n const { allowMultipleShapesForPoints = false } = this.props;\n let w = this._getBoxWidthOfShape(pointId, pointIndex, isLastPoint);\n const index: number = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(pointTypes).length : 0;\n const widthRatio = pointTypes[index].widthRatio;\n w = widthRatio > 1 ? w / widthRatio : w;\n\n return _getPointPath(xPos, yPos, w, index);\n };\n private _getPointFill = (lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) => {\n const { activePoint } = this.state;\n const { theme, allowMultipleShapesForPoints = false } = this.props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n }\n };\n private _createLines(xElement: SVGElement): JSX.Element[] {\n const lines: JSX.Element[] = [];\n const points: JSX.Element[] = [];\n if (this.state.isSelectedLegend) {\n this._points = this.state.selectedLegendPoints;\n } else {\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n }\n for (let i = 0; i < this._points.length; i++) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = this._points[i].legend;\n const lineColor: string = this._points[i].color;\n const { activePoint } = this.state;\n const { theme } = this.props;\n if (this._points[i].data.length === 1) {\n const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[0];\n const circleId = `${this._circleId}${i}`;\n pointsForLine.push(\n <circle\n id={`${this._circleId}${i}`}\n key={`${this._circleId}${i}`}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={this._xAxisScale(x1)}\n cy={this._yAxisScale(y1)}\n fill={activePoint === circleId ? theme!.palette.white : lineColor}\n onMouseOver={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseMove={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseOut={this._handleMouseOut}\n strokeWidth={activePoint === circleId ? 2 : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = this._points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n\n for (let j = 1; j < this._points[i].data.length; j++) {\n const gapResult = this._checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${this._lineId}${i}${j}`;\n const borderId = `${this._borderId}${i}${j}`;\n const circleId = `${this._circleId}${i}${j}`;\n const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[j - 1];\n const { x: x2, y: y2 } = this._points[i].data[j];\n let path = this._getPath(this._xAxisScale(x1), this._yAxisScale(y1), circleId, j, false, this._points[i].index);\n const strokeWidth =\n this._points[i].lineOptions?.strokeWidth || this.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n this.state.activeLegend === legendVal || this.state.activeLegend === '' || this.state.isSelectedLegend;\n\n const hideNonActiveDots = activePoint !== circleId && this._points[i].hideNonActiveDots;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={i === 0 ? true : false}\n onMouseOver={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseMove={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseOut={this._handleMouseOut}\n onFocus={() => this._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={this._handleMouseOut}\n onClick={this._onDataPointClick.bind(this, this._points[i].data[j - 1].onDataPointClick)}\n visibility={hideNonActiveDots ? 'hidden' : 'visible'}\n opacity={isLegendSelected ? 1 : 0.01}\n fill={this._getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={2}\n />,\n );\n if (j + 1 === this._points[i].data.length) {\n const lastCircleId = `${circleId}${j}L`;\n path = this._getPath(\n this._xAxisScale(x2),\n this._yAxisScale(y2),\n lastCircleId,\n j,\n true,\n this._points[i].index,\n );\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = this._points[i].data[j];\n pointsForLine.push(\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={i === 0 ? true : false}\n onMouseOver={this._handleHover.bind(\n this,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )}\n onMouseMove={this._handleHover.bind(\n this,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )}\n onMouseOut={this._handleMouseOut}\n onFocus={() =>\n this._handleFocus(lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData)\n }\n onBlur={this._handleMouseOut}\n onClick={this._onDataPointClick.bind(this, this._points[i].data[j].onDataPointClick)}\n visibility={hideNonActiveDots ? 'hidden' : 'visible'}\n opacity={isLegendSelected ? 1 : 0.01}\n fill={this._getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={2}\n />,\n );\n /* eslint-enable react/jsx-no-bind */\n }\n\n if (isLegendSelected) {\n // don't draw line if it is in a gap\n if (!isInGap) {\n const lineBorderWidth = this._points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(this._points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={this._points[i].lineOptions?.lineBorderColor || theme!.palette.white}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n this._refCallback(e!, lineId);\n }}\n onMouseOver={this._handleHover.bind(\n this,\n x1,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n )}\n onMouseMove={this._handleHover.bind(\n this,\n x1,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n )}\n onMouseOut={this._handleMouseOut}\n stroke={lineColor}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={this._points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={this._points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n onClick={this._onLineClick.bind(this, this._points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={this._points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={this._points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n lines.push(...bordersForLine, ...linesForLine);\n points.push(...pointsForLine);\n }\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(this._xAxisScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return lines.concat(points);\n }\n\n private _createColorFillBars = (containerHeight: number) => {\n const colorFillBars: JSX.Element[] = [];\n if (this.state.isSelectedLegend) {\n this._colorFillBars = this.state.selectedColorBarLegend;\n } else {\n this._colorFillBars = this.props.colorFillBars!;\n }\n for (let i = 0; i < this._colorFillBars.length; i++) {\n const colorFillBar = this._colorFillBars[i];\n const colorFillBarId = getId(colorFillBar.legend.replace(/\\W/g, ''));\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(this._getStripePattern(colorFillBar.color, i));\n }\n\n for (let j = 0; j < colorFillBar.data.length; j++) {\n const startX = colorFillBar.data[j].startX;\n const endX = colorFillBar.data[j].endX;\n const opacity =\n this.state.activeLegend === colorFillBar.legend ||\n this.state.activeLegend === '' ||\n this.state.isSelectedLegend\n ? this._colorFillBarsOpacity\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${this._colorFillBarPatternId}${i})` : colorFillBar.color}\n fillOpacity={opacity}\n x={this._xAxisScale(startX)}\n y={this._yAxisScale(0) - containerHeight}\n width={Math.abs(this._xAxisScale(endX) - this._xAxisScale(startX))}\n height={containerHeight}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n };\n\n private _getStripePattern = (color: string, id: number) => {\n // This describes a tile pattern that resembles diagonal stripes\n // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';\n return (\n <pattern\n id={`${this._colorFillBarPatternId}${id}`}\n width={16}\n height={16}\n key={`${this._colorFillBarPatternId}${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={2} />\n </pattern>\n );\n };\n\n private _checkInGap = (pointIndex: number, gaps: ILineChartGap[], currentGapIndex: number) => {\n let gapIndex = currentGapIndex;\n let isInGap = false;\n\n while (gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex) {\n gapIndex++;\n }\n\n if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {\n isInGap = true;\n }\n return { isInGap, gapIndex };\n };\n\n private _refCallback(element: SVGGElement, legendTitle: string): void {\n this._refArray.push({ index: legendTitle, refElement: element });\n }\n\n private _handleFocus = (\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: IAccessibilityProps,\n ) => {\n this._uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? x.toLocaleDateString() : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(this._calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n const _this = this;\n d3Select('#' + circleId).attr('aria-labelledby', `toolTip${this._uniqueCallOutID}`);\n d3Select(`#${this._verticalLine}`)\n .attr('transform', () => `translate(${_this._xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n this._refArray.forEach((obj: IRefArrayData) => {\n if (obj.index === lineId) {\n this.setState({\n isCalloutVisible: true,\n refSelected: obj.refElement,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,\n YValueHover: found.values,\n stackCalloutProps: found!,\n dataPointCalloutProps: found!,\n activePoint: circleId,\n xAxisCalloutAccessibilityData,\n });\n }\n });\n } else {\n this.setState({\n activePoint: circleId,\n });\n }\n };\n\n private _handleHover = (\n x: number | Date,\n xAxisCalloutData: string,\n circleId: string,\n xAxisCalloutAccessibilityData: IAccessibilityProps,\n mouseEvent: React.MouseEvent<SVGElement>,\n ) => {\n mouseEvent.persist();\n this._uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? x.toLocaleDateString() : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const _this = this;\n const found = find(this._calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n d3Select(`#${this._verticalLine}`)\n .attr('transform', () => `translate(${_this._xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n this.setState({\n isCalloutVisible: true,\n refSelected: mouseEvent,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,\n YValueHover: found.values,\n stackCalloutProps: found!,\n dataPointCalloutProps: found!,\n activePoint: circleId,\n xAxisCalloutAccessibilityData,\n });\n } else {\n this.setState({\n activePoint: circleId,\n });\n }\n };\n\n private _onLineClick = (func: () => void) => {\n if (func) {\n func();\n }\n };\n\n private _onDataPointClick = (func: () => void) => {\n if (func) {\n func();\n }\n };\n\n private _handleMouseOut = () => {\n d3Select(`#${this._verticalLine}`).attr('visibility', 'hidden');\n this.setState({\n isCalloutVisible: false,\n activePoint: '',\n });\n };\n\n private _handleLegendClick = (\n lineChartItem: LineChartDataWithIndex | IColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void => {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n };\n\n private _handleMultipleLineLegendSelectionAction = (selectedLine: LineChartDataWithIndex) => {\n const selectedLineIndex = this.state.selectedLegendPoints.reduce((acc, line, index) => {\n if (acc > -1 || line.legend !== selectedLine.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedLines: LineChartDataWithIndex[];\n if (selectedLineIndex === -1) {\n selectedLines = [...this.state.selectedLegendPoints, selectedLine];\n } else {\n selectedLines = this.state.selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(this.state.selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = this.props.data && selectedLines.length === this.props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((this.props.colorFillBars && this.props.colorFillBars.length === this.state.selectedColorBarLegend.length) ||\n !this.props.colorFillBars)\n ) {\n // Clear all legends if all legends including color fill bar legends are selected\n // Or clear all legends if all legends are selected and there are no color fill bars\n this._clearMultipleLegendSelections();\n } else if (!selectedLines.length && !this.state.selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n this._clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n this.setState({\n selectedLegendPoints: selectedLines,\n isSelectedLegend: true,\n });\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n this._handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n };\n\n private _handleMultipleColorFillBarLegendSelectionAction = (selectedColorFillBar: IColorFillBarsProps) => {\n const selectedColorFillBarIndex = this.state.selectedColorBarLegend.reduce((acc, colorFillBar, index) => {\n if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedColorFillBars: IColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...this.state.selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = this.state.selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(this.state.selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (this.props.colorFillBars && this.props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((this.props.data && this.props.data.lineChartData!.length === this.state.selectedLegendPoints.length) ||\n !this.props.data)\n ) {\n // Clear all legends if all legends, including line legends, are selected\n // Or clear all legends if all legends are selected and there is no line data\n this._clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !this.state.selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n this._clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n this.setState({\n selectedColorBarLegend: selectedColorFillBars,\n isSelectedLegend: true,\n });\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: IColorFillBarsProps) => colorFillBar.legend,\n );\n this._handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n };\n\n private _clearMultipleLegendSelections = () => {\n this.setState({\n selectedColorBarLegend: [],\n selectedLegendPoints: [],\n isSelectedLegend: false,\n });\n };\n}\n"]}
1
+ {"version":3,"file":"LineChart.base.js","sourceRoot":"../src/","sources":["components/LineChart/LineChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAW,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAEL,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AAC;gBAC/F,oCAAoC;aACrC;YAAC,OAAO,CAAC,EAAE,GAAE;YACd,IAAM,YAAY,GAAG;gBACnB,UAAU,EAAE,UAAU,CAAC,OAAQ;gBAC/B,EAAE,EAAE,IAAI,CAAC,UAAU;gBACnB,KAAK,EAAE,YAAY;aACpB,CAAC;YACF,YAAY,IAAI,oBAAoB,CAAC,YAAY,CAAC,CAAC;SACpD;QACD,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IA0EO,oCAAY,GAApB,UAAqB,OAAoB,EAAE,WAAmB;QAC5D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IA0MH,oBAAC;AAAD,CAAC,AAh2BD,CAAmC,KAAK,CAAC,SAAS,GAg2BjD","sourcesContent":["import * as React from 'react';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { ILegend, Legends } from '../Legends/index';\nimport { classNamesFunction, getId, find } from '@fluentui/react/lib/Utilities';\nimport {\n IAccessibilityProps,\n CartesianChart,\n IBasestate,\n IChildProps,\n ILineChartProps,\n ILineChartPoints,\n ICustomizedCalloutData,\n IMargins,\n IRefArrayData,\n IColorFillBarsProps,\n ILineChartStyleProps,\n ILineChartStyles,\n ILineChartGap,\n} from '../../index';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfXAxislabels,\n Points,\n pointTypes,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nconst getClassNames = classNamesFunction<ILineChartStyleProps, ILineChartStyles>();\n\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\n\nconst DEFAULT_LINE_STROKE_SIZE = 4;\n// The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)\nconst PATH_MULTIPLY_SIZE = 2.5;\n\n/**\n *\n * @param x units from origin\n * @param y units from origin\n * @param w is the legnth of the each side of a shape\n * @param index index to get the shape path\n */\nconst _getPointPath = (x: number, y: number, w: number, index: number): string => {\n const allPointPaths = [\n // circle path\n `M${x - w / 2} ${y}\n A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}\n M${x - w / 2} ${y}\n A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}\n `,\n //square\n `M${x - w / 2} ${y - w / 2}\n L${x + w / 2} ${y - w / 2}\n L${x + w / 2} ${y + w / 2}\n L${x - w / 2} ${y + w / 2}\n Z`,\n //triangle\n `M${x - w / 2} ${y - 0.2886 * w}\n H ${x + w / 2}\n L${x} ${y + 0.5774 * w} Z`,\n //diamond\n `M${x} ${y - w / 2}\n L${x + w / 2} ${y}\n L${x} ${y + w / 2}\n L${x - w / 2} ${y}\n Z`,\n //pyramid\n `M${x} ${y - 0.5774 * w}\n L${x + w / 2} ${y + 0.2886 * w}\n L${x - w / 2} ${y + 0.2886 * w} Z`,\n //hexagon\n `M${x - 0.5 * w} ${y - 0.866 * w}\n L${x + 0.5 * w} ${y - 0.866 * w}\n L${x + w} ${y}\n L${x + 0.5 * w} ${y + 0.866 * w}\n L${x - 0.5 * w} ${y + 0.866 * w}\n L${x - w} ${y}\n Z`,\n //pentagon\n `M${x} ${y - 0.851 * w}\n L${x + 0.6884 * w} ${y - 0.2633 * w}\n L${x + 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.6884 * w} ${y - 0.2633 * w}\n Z`,\n //octagon\n `M${x - 0.5001 * w} ${y - 1.207 * w}\n L${x + 0.5001 * w} ${y - 1.207 * w}\n L${x + 1.207 * w} ${y - 0.5001 * w}\n L${x + 1.207 * w} ${y + 0.5001 * w}\n L${x + 0.5001 * w} ${y + 1.207 * w}\n L${x - 0.5001 * w} ${y + 1.207 * w}\n L${x - 1.207 * w} ${y + 0.5001 * w}\n L${x - 1.207 * w} ${y - 0.5001 * w}\n Z`,\n ];\n return allPointPaths[index];\n};\n\ntype LineChartDataWithIndex = ILineChartPoints & { index: number };\n\nexport interface ILineChartState extends IBasestate {\n // This array contains data of selected legends for points\n selectedLegendPoints: LineChartDataWithIndex[];\n // This array contains data of selected legends for color bars\n selectedColorBarLegend: IColorFillBarsProps[];\n // This is a boolean value which is set to true\n // when at least one legend is selected\n isSelectedLegend: boolean;\n // This value will be used as customized callout props - point callout.\n dataPointCalloutProps?: ICustomizedCalloutData;\n // This value will be used as Customized callout props - For stack callout.\n stackCalloutProps?: ICustomizedCalloutData;\n // active or hovered point\n activePoint?: string;\n // x-axis callout accessibility data\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class LineChartBase extends React.Component<ILineChartProps, ILineChartState> {\n private _points: LineChartDataWithIndex[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _calloutPoints: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _yAxisScale: any = '';\n private _circleId: string;\n private _lineId: string;\n private _borderId: string;\n private _verticalLine: string;\n private _colorFillBarPatternId: string;\n private _uniqueCallOutID: string;\n private _refArray: IRefArrayData[];\n private margins: IMargins;\n private eventLabelHeight: number = 36;\n private lines: JSX.Element[];\n private _renderedColorFillBars: JSX.Element[];\n private _colorFillBars: IColorFillBarsProps[];\n private _colorFillBarsOpacity: number;\n private _tooltipId: string;\n\n constructor(props: ILineChartProps) {\n super(props);\n this.state = {\n hoverXValue: '',\n activeLegend: '',\n YValueHover: [],\n refSelected: '',\n selectedLegend: '',\n isCalloutVisible: false,\n selectedLegendPoints: [],\n selectedColorBarLegend: [],\n isSelectedLegend: false,\n activePoint: '',\n };\n this._refArray = [];\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n this._colorFillBars = [];\n this._colorFillBarsOpacity = 0.4;\n this._calloutPoints = calloutData(this._points) || [];\n this._circleId = getId('circle');\n this._lineId = getId('lineID');\n this._borderId = getId('borderID');\n this._verticalLine = getId('verticalLine');\n this._colorFillBarPatternId = getId('colorFillBarPattern');\n this._tooltipId = getId('LineChartTooltipId_');\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (this.eventLabelHeight = props.eventAnnotationProps.labelHeight);\n }\n\n public componentDidUpdate(prevProps: ILineChartProps): void {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width ||\n prevProps.data !== this.props.data\n ) {\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n this._calloutPoints = calloutData(this._points) || [];\n }\n }\n\n public render(): JSX.Element {\n const { tickValues, tickFormat, eventAnnotationProps, legendProps, data } = this.props;\n this._points = this._injectIndexPropertyInLineChartData(data.lineChartData);\n\n const isXAxisDateType = getXAxisType(this._points);\n let points = this._points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = this.state.selectedLegendPoints.length >= 1 ? this.state.selectedLegendPoints : this._points;\n this._calloutPoints = calloutData(points);\n }\n\n const legendBars = this._createLegends(this._points!);\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n id: `toolTip${this._uniqueCallOutID}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n onDismiss: this._closeCallout,\n preventDismissOnEvent: () => true,\n hidden: !(!this.props.hideTooltip && this.state.isCalloutVisible),\n descriptionMessage:\n this.props.getCalloutDescriptionMessage && this.state.stackCalloutProps\n ? this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData,\n ...this.props.calloutProps,\n };\n const tickParams = {\n tickValues: tickValues,\n tickFormat: tickFormat,\n };\n\n return (\n <CartesianChart\n {...this.props}\n chartTitle={data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n isCalloutForStack\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={this._getMargins}\n getGraphData={this._initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n customizedCallout={this._getCustomizedCallout()}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n this._xAxisScale = props.xScale!;\n this._yAxisScale = props.yScale!;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'steelblue'}\n id={this._verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n <g>\n {this._renderedColorFillBars}\n {this.lines}\n </g>\n {eventAnnotationProps && (\n <EventsAnnotation\n {...eventAnnotationProps}\n scale={props.xScale!}\n chartYTop={this.margins.top! + this.eventLabelHeight}\n chartYBottom={props.containerHeight! - 35}\n />\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n\n private _injectIndexPropertyInLineChartData = (lineChartData?: ILineChartPoints[]): LineChartDataWithIndex[] | [] => {\n const { allowMultipleShapesForPoints = false } = this.props;\n return lineChartData\n ? lineChartData.map((item: ILineChartPoints, index: number) => ({\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n }))\n : [];\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)\n : null;\n };\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _initializeLineChartData = (\n xScale: NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n this._xAxisScale = xScale;\n this._yAxisScale = yScale;\n this._renderedColorFillBars = this.props.colorFillBars ? this._createColorFillBars(containerHeight) : [];\n this.lines = this._createLines(xElement!);\n };\n\n private _handleSingleLegendSelectionAction = (lineChartItem: LineChartDataWithIndex | IColorFillBarsProps) => {\n if (this.state.selectedLegend === lineChartItem.legend) {\n this.setState({ selectedLegend: '', activeLegend: lineChartItem.legend });\n this._handleLegendClick(lineChartItem, null);\n } else {\n this.setState({\n selectedLegend: lineChartItem.legend,\n activeLegend: lineChartItem.legend,\n });\n this._handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n };\n\n private _onHoverCardHide = () => {\n this.setState({\n selectedLegendPoints: [],\n selectedColorBarLegend: [],\n isSelectedLegend: false,\n });\n };\n\n private _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = this.props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: LineChartDataWithIndex) => {\n const color: string = point.color;\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color: color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n this._handleMultipleLineLegendSelectionAction(point);\n } else {\n this._handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n hoverAction: () => {\n this.setState({ activeLegend: point.legend });\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as ILegend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = this.props.colorFillBars\n ? this.props.colorFillBars.map((colorFillBar: IColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const legend: ILegend = {\n title,\n color: colorFillBar.color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n this._handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n this._handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n hoverAction: () => {\n this.setState({ activeLegend: title });\n },\n opacity: this._colorFillBarsOpacity,\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n const legends = (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: this._onHoverCardHide })}\n {...this.props.legendProps}\n />\n );\n return legends;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getBoxWidthOfShape = (pointId: string, pointIndex: number, isLastPoint: boolean) => {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = this.props;\n const { activePoint } = this.state;\n if (allowMultipleShapesForPoints) {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else if (pointIndex === 1 || isLastPoint) {\n return strokeWidth * PATH_MULTIPLY_SIZE;\n } else {\n return PointSize.invisibleSize;\n }\n } else {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else {\n return PointSize.invisibleSize;\n }\n }\n };\n\n private _getPath = (\n xPos: number,\n yPos: number,\n pointId: string,\n pointIndex: number,\n isLastPoint: boolean,\n pointOftheLine: number,\n ): string => {\n const { allowMultipleShapesForPoints = false } = this.props;\n let w = this._getBoxWidthOfShape(pointId, pointIndex, isLastPoint);\n const index: number = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(pointTypes).length : 0;\n const widthRatio = pointTypes[index].widthRatio;\n w = widthRatio > 1 ? w / widthRatio : w;\n\n return _getPointPath(xPos, yPos, w, index);\n };\n private _getPointFill = (lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) => {\n const { activePoint } = this.state;\n const { theme, allowMultipleShapesForPoints = false } = this.props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return theme!.palette.white;\n } else {\n return lineColor;\n }\n }\n };\n private _createLines(xElement: SVGElement): JSX.Element[] {\n const lines: JSX.Element[] = [];\n const points: JSX.Element[] = [];\n if (this.state.isSelectedLegend) {\n this._points = this.state.selectedLegendPoints;\n } else {\n this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);\n }\n for (let i = 0; i < this._points.length; i++) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = this._points[i].legend;\n const lineColor: string = this._points[i].color;\n const { activePoint } = this.state;\n const { theme } = this.props;\n if (this._points[i].data.length === 1) {\n const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[0];\n const circleId = `${this._circleId}${i}`;\n pointsForLine.push(\n <circle\n id={`${this._circleId}${i}`}\n key={`${this._circleId}${i}`}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={this._xAxisScale(x1)}\n cy={this._yAxisScale(y1)}\n fill={activePoint === circleId ? theme!.palette.white : lineColor}\n onMouseOver={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseMove={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseOut={this._handleMouseOut}\n strokeWidth={activePoint === circleId ? 2 : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = this._points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n\n for (let j = 1; j < this._points[i].data.length; j++) {\n const gapResult = this._checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${this._lineId}${i}${j}`;\n const borderId = `${this._borderId}${i}${j}`;\n const circleId = `${this._circleId}${i}${j}`;\n const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[j - 1];\n const { x: x2, y: y2 } = this._points[i].data[j];\n let path = this._getPath(this._xAxisScale(x1), this._yAxisScale(y1), circleId, j, false, this._points[i].index);\n const strokeWidth =\n this._points[i].lineOptions?.strokeWidth || this.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n this.state.activeLegend === legendVal || this.state.activeLegend === '' || this.state.isSelectedLegend;\n\n const hideNonActiveDots = activePoint !== circleId && this._points[i].hideNonActiveDots;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={i === 0 ? true : false}\n onMouseOver={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseMove={this._handleHover.bind(this, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onMouseOut={this._handleMouseOut}\n onFocus={() => this._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={this._handleMouseOut}\n onClick={this._onDataPointClick.bind(this, this._points[i].data[j - 1].onDataPointClick)}\n visibility={hideNonActiveDots ? 'hidden' : 'visible'}\n opacity={isLegendSelected ? 1 : 0.01}\n fill={this._getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={2}\n />,\n );\n if (j + 1 === this._points[i].data.length) {\n const lastCircleId = `${circleId}${j}L`;\n path = this._getPath(\n this._xAxisScale(x2),\n this._yAxisScale(y2),\n lastCircleId,\n j,\n true,\n this._points[i].index,\n );\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = this._points[i].data[j];\n pointsForLine.push(\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={i === 0 ? true : false}\n onMouseOver={this._handleHover.bind(\n this,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )}\n onMouseMove={this._handleHover.bind(\n this,\n x2,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n )}\n onMouseOut={this._handleMouseOut}\n onFocus={() =>\n this._handleFocus(lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData)\n }\n onBlur={this._handleMouseOut}\n onClick={this._onDataPointClick.bind(this, this._points[i].data[j].onDataPointClick)}\n visibility={hideNonActiveDots ? 'hidden' : 'visible'}\n opacity={isLegendSelected ? 1 : 0.01}\n fill={this._getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={2}\n />,\n );\n /* eslint-enable react/jsx-no-bind */\n }\n\n if (isLegendSelected) {\n // don't draw line if it is in a gap\n if (!isInGap) {\n const lineBorderWidth = this._points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(this._points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={this._points[i].lineOptions?.lineBorderColor || theme!.palette.white}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n this._refCallback(e!, lineId);\n }}\n onMouseOver={this._handleHover.bind(\n this,\n x1,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n )}\n onMouseMove={this._handleHover.bind(\n this,\n x1,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n )}\n onMouseOut={this._handleMouseOut}\n stroke={lineColor}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={this._points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={this._points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n onClick={this._onLineClick.bind(this, this._points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={this._xAxisScale(x1)}\n y1={this._yAxisScale(y1)}\n x2={this._xAxisScale(x2)}\n y2={this._yAxisScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={this._points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={this._points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={this._points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n lines.push(...bordersForLine, ...linesForLine);\n points.push(...pointsForLine);\n }\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(this._xAxisScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return lines.concat(points);\n }\n\n private _createColorFillBars = (containerHeight: number) => {\n const colorFillBars: JSX.Element[] = [];\n if (this.state.isSelectedLegend) {\n this._colorFillBars = this.state.selectedColorBarLegend;\n } else {\n this._colorFillBars = this.props.colorFillBars!;\n }\n for (let i = 0; i < this._colorFillBars.length; i++) {\n const colorFillBar = this._colorFillBars[i];\n const colorFillBarId = getId(colorFillBar.legend.replace(/\\W/g, ''));\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(this._getStripePattern(colorFillBar.color, i));\n }\n\n for (let j = 0; j < colorFillBar.data.length; j++) {\n const startX = colorFillBar.data[j].startX;\n const endX = colorFillBar.data[j].endX;\n const opacity =\n this.state.activeLegend === colorFillBar.legend ||\n this.state.activeLegend === '' ||\n this.state.isSelectedLegend\n ? this._colorFillBarsOpacity\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${this._colorFillBarPatternId}${i})` : colorFillBar.color}\n fillOpacity={opacity}\n x={this._xAxisScale(startX)}\n y={this._yAxisScale(0) - containerHeight}\n width={Math.abs(this._xAxisScale(endX) - this._xAxisScale(startX))}\n height={containerHeight}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n };\n\n private _getStripePattern = (color: string, id: number) => {\n // This describes a tile pattern that resembles diagonal stripes\n // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';\n return (\n <pattern\n id={`${this._colorFillBarPatternId}${id}`}\n width={16}\n height={16}\n key={`${this._colorFillBarPatternId}${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={2} />\n </pattern>\n );\n };\n\n private _checkInGap = (pointIndex: number, gaps: ILineChartGap[], currentGapIndex: number) => {\n let gapIndex = currentGapIndex;\n let isInGap = false;\n\n while (gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex) {\n gapIndex++;\n }\n\n if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {\n isInGap = true;\n }\n return { isInGap, gapIndex };\n };\n\n private _refCallback(element: SVGGElement, legendTitle: string): void {\n this._refArray.push({ index: legendTitle, refElement: element });\n }\n\n private _handleFocus = (\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: IAccessibilityProps,\n ) => {\n this._uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? x.toLocaleDateString() : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(this._calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n const _this = this;\n d3Select('#' + circleId).attr('aria-labelledby', `toolTip${this._uniqueCallOutID}`);\n d3Select(`#${this._verticalLine}`)\n .attr('transform', () => `translate(${_this._xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n this._refArray.forEach((obj: IRefArrayData) => {\n if (obj.index === lineId) {\n this.setState({\n isCalloutVisible: true,\n refSelected: obj.refElement,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,\n YValueHover: found.values,\n stackCalloutProps: found!,\n dataPointCalloutProps: found!,\n activePoint: circleId,\n xAxisCalloutAccessibilityData,\n });\n }\n });\n } else {\n this.setState({\n activePoint: circleId,\n });\n }\n };\n\n private _handleHover = (\n x: number | Date,\n xAxisCalloutData: string,\n circleId: string,\n xAxisCalloutAccessibilityData: IAccessibilityProps,\n mouseEvent: React.MouseEvent<SVGElement>,\n ) => {\n mouseEvent.persist();\n this._uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? x.toLocaleDateString() : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const _this = this;\n const found = find(this._calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n d3Select(`#${this._verticalLine}`)\n .attr('transform', () => `translate(${_this._xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n this.setState({\n isCalloutVisible: true,\n refSelected: mouseEvent,\n hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,\n YValueHover: found.values,\n stackCalloutProps: found!,\n dataPointCalloutProps: found!,\n activePoint: circleId,\n xAxisCalloutAccessibilityData,\n });\n } else {\n this.setState({\n activePoint: circleId,\n });\n }\n };\n\n private _onLineClick = (func: () => void) => {\n if (func) {\n func();\n }\n };\n\n private _onDataPointClick = (func: () => void) => {\n if (func) {\n func();\n }\n };\n\n private _handleMouseOut = () => {\n d3Select(`#${this._verticalLine}`).attr('visibility', 'hidden');\n this.setState({\n isCalloutVisible: false,\n activePoint: '',\n });\n };\n\n private _handleLegendClick = (\n lineChartItem: LineChartDataWithIndex | IColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void => {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n };\n\n private _handleMultipleLineLegendSelectionAction = (selectedLine: LineChartDataWithIndex) => {\n const selectedLineIndex = this.state.selectedLegendPoints.reduce((acc, line, index) => {\n if (acc > -1 || line.legend !== selectedLine.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedLines: LineChartDataWithIndex[];\n if (selectedLineIndex === -1) {\n selectedLines = [...this.state.selectedLegendPoints, selectedLine];\n } else {\n selectedLines = this.state.selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(this.state.selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = this.props.data && selectedLines.length === this.props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((this.props.colorFillBars && this.props.colorFillBars.length === this.state.selectedColorBarLegend.length) ||\n !this.props.colorFillBars)\n ) {\n // Clear all legends if all legends including color fill bar legends are selected\n // Or clear all legends if all legends are selected and there are no color fill bars\n this._clearMultipleLegendSelections();\n } else if (!selectedLines.length && !this.state.selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n this._clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n this.setState({\n selectedLegendPoints: selectedLines,\n isSelectedLegend: true,\n });\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n this._handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n };\n\n private _handleMultipleColorFillBarLegendSelectionAction = (selectedColorFillBar: IColorFillBarsProps) => {\n const selectedColorFillBarIndex = this.state.selectedColorBarLegend.reduce((acc, colorFillBar, index) => {\n if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedColorFillBars: IColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...this.state.selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = this.state.selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(this.state.selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (this.props.colorFillBars && this.props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((this.props.data && this.props.data.lineChartData!.length === this.state.selectedLegendPoints.length) ||\n !this.props.data)\n ) {\n // Clear all legends if all legends, including line legends, are selected\n // Or clear all legends if all legends are selected and there is no line data\n this._clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !this.state.selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n this._clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n this.setState({\n selectedColorBarLegend: selectedColorFillBars,\n isSelectedLegend: true,\n });\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: IColorFillBarsProps) => colorFillBar.legend,\n );\n this._handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n };\n\n private _clearMultipleLegendSelections = () => {\n this.setState({\n selectedColorBarLegend: [],\n selectedLegendPoints: [],\n isSelectedLegend: false,\n });\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/PieChart/Arc/Arc.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;IAAyB,uBAA8B;IAAvD;QAAA,qEAsBC;QAjBQ,WAAK,GAAO,EAAE,CAAC;QAOf,iBAAW,GAAG,UAAC,QAAmB;YACvC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC,CAAC;;IAQJ,CAAC;IAfe,4BAAwB,GAAtC,UAAuC,SAA8B;QACnE,YAAY,CAAC,SAAS,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAMM,oBAAM,GAAb;;QACQ,IAAA,KAAiB,IAAI,CAAC,KAAK,EAAzB,KAAK,WAAA,EAAE,GAAG,SAAe,CAAC;QAClC,IAAM,aAAa,GAAG,kBAAkB,EAAyB,CAAC;QAClE,IAAM,UAAU,GAAG,aAAa,CAAC,SAAS,EAAE,EAAE,KAAK,OAAA,EAAE,CAAC,CAAC;QACvD,OAAO,8BAAM,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,QAAE,IAAI,CAAC,KAAK,CAAC,IAAI,0CAAE,IAAI,CAAC,OAAO,GAAI,CAAC;IAC/G,CAAC;IApBa,gBAAY,GAAuB;QAC/C,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;KACjB,CAAC;IAmBJ,UAAC;CAAA,AAtBD,CAAyB,KAAK,CAAC,SAAS,GAsBvC;SAtBY,GAAG;AAwBhB;IAAgC,8BAAG;IAAnC;;IAeA,CAAC;IAdQ,2BAAM,GAAb;QACQ,IAAA,KAAyB,IAAI,CAAC,KAAK,EAAjC,IAAI,UAAA,EAAE,GAAG,SAAA,EAAE,OAAO,aAAe,CAAC;QACpC,IAAA,KAAmB,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAApC,MAAM,QAAA,EAAE,MAAM,QAAsB,CAAC;QAC5C,IAAM,cAAc,GAAG,eAAa,MAAM,UAAK,MAAM,MAAG,CAAC;QAEzD,OAAO,CACL,2BAAG,SAAS,EAAC,KAAK;YACf,iBAAM,MAAM,WAAE;YACf,8BAAM,SAAS,EAAE,cAAc,EAAE,UAAU,EAAC,QAAQ;gBACjD,IAAK,CAAC,IAAK,CAAC,CAAC;;gBAAG,qBAAqB,CAAC,IAAK,CAAC,IAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CACzD,CACL,CACL,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AAfD,CAAgC,GAAG,GAelC;;AAED,SAAS,YAAY,CAAC,QAAmB;IACvC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC/C,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import * as React from 'react';\nimport * as shape from 'd3-shape';\nimport { IArcProps, IArcStyles } from './Arc.types';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { convertToLocaleString } from '../../../utilities/utilities';\n\nexport class Arc extends React.Component<IArcProps, {}> {\n public static defaultProps: Partial<IArcProps> = {\n arc: shape.arc(),\n };\n\n public state: {} = {};\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): null {\n _updateChart(nextProps);\n return null;\n }\n\n public updateChart = (newProps: IArcProps) => {\n _updateChart(newProps);\n };\n\n public render(): JSX.Element {\n const { color, arc } = this.props;\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(getStyles, { color });\n return <path d={arc(this.props.data)} className={classNames.root} onClick={this.props.data?.data.onClick} />;\n }\n}\n\nexport class LabeledArc extends Arc {\n public render(): JSX.Element {\n const { data, arc, culture } = this.props;\n const [labelX, labelY] = arc.centroid(data);\n const labelTranslate = `translate(${labelX}, ${labelY})`;\n\n return (\n <g className=\"arc\">\n {super.render()}\n <text transform={labelTranslate} textAnchor=\"middle\">\n {data!.data!.x}-{convertToLocaleString(data!.data!.y, culture)}\n </text>\n </g>\n );\n }\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}
1
+ {"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/PieChart/Arc/Arc.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;IAAyB,uBAA8B;IAAvD;QAAA,qEAsBC;QAjBQ,WAAK,GAAO,EAAE,CAAC;QAOf,iBAAW,GAAG,UAAC,QAAmB;YACvC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC,CAAC;;IAQJ,CAAC;IAfe,4BAAwB,GAAtC,UAAuC,SAA8B;QACnE,YAAY,CAAC,SAAS,CAAC,CAAC;QACxB,OAAO,IA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C,AAfD,CAAgC,GAAG,GAelC;;AAED,SAAS,YAAY,CAAC,QAAmB;IACvC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC/C,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import * as React from 'react';\nimport * as shape from 'd3-shape';\nimport { IArcProps, IArcStyles } from './Arc.types';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { convertToLocaleString } from '../../../utilities/utilities';\n\nexport class Arc extends React.Component<IArcProps, {}> {\n public static defaultProps: Partial<IArcProps> = {\n arc: shape.arc(),\n };\n\n public state: {} = {};\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): null {\n _updateChart(nextProps);\n return null;\n }\n\n public updateChart = (newProps: IArcProps) => {\n _updateChart(newProps);\n };\n\n public render(): JSX.Element {\n const { color, arc } = this.props;\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(getStyles, { color });\n return <path d={arc(this.props.data)} className={classNames.root} onClick={this.props.data?.data.onClick} />;\n }\n}\n\nexport class LabeledArc extends Arc {\n public render(): JSX.Element {\n const { data, arc, culture } = this.props;\n const [labelX, labelY] = arc.centroid(data);\n const labelTranslate = `translate(${labelX}, ${labelY})`;\n\n return (\n <g className=\"arc\">\n {super.render()}\n <text transform={labelTranslate} textAnchor=\"middle\">\n {data!.data!.x}-{convertToLocaleString(data!.data!.y, culture)}\n </text>\n </g>\n );\n }\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}