@fluentui/react-charting 5.6.6 → 5.6.7
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.
- package/CHANGELOG.json +22 -1
- package/CHANGELOG.md +12 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +1 -2
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +2 -1
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -2
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/Legends/Legends.base.js +3 -3
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +10 -9
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/utilities/utilities.js +4 -4
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -2
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +2 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.js +2 -2
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +9 -8
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/utilities/utilities.js +3 -3
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-amd/version.js +1 -1
- package/lib-amd/version.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +2 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +2 -2
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +9 -8
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +3 -3
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/version.js +1 -1
- package/lib-commonjs/version.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.base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E;gBACd,IAAM,YAAY,GAAG;oBACnB,UAAU,EAAE,UAAU,CAAC,OAAQ;oBAC/B,EAAE,EAAE,IAAI,CAAC,UAAU;oBACnB,KAAK,EAAE,YAAY;iBACpB,CAAC;gBACF,YAAY,IAAI,4BAAoB,CAAC,YAAY,CAAC,CAAC;aACpD;YACD,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;QA0EO,oCAAY,GAApB,UAAqB,OAAoB,EAAE,WAAmB;YAC5D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;QACnE,CAAC;QA0MH,oBAAC;IAAD,CAAC,AAh2BD,CAAmC,KAAK,CAAC,SAAS,GAg2BjD;IAh2BY,sCAAa","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":";;;;IAiCA,IAAM,aAAa,GAAG,8BAAkB,EAA0C,CAAC;IAEnF,IAAK,SAGJ;IAHD,WAAK,SAAS;QACZ,oDAAc,CAAA;QACd,2DAAiB,CAAA;IACnB,CAAC,EAHI,SAAS,KAAT,SAAS,QAGb;IAED,IAAM,wBAAwB,GAAG,CAAC,CAAC;IACnC,6FAA6F;IAC7F,IAAM,kBAAkB,GAAG,GAAG,CAAC;IAE/B;;;;;;OAMG;IACH,IAAM,aAAa,GAAG,UAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,KAAa;QACnE,IAAM,aAAa,GAAG;YACpB,cAAc;YACd,OAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAI,CAAC,gBACd,CAAC,GAAG,CAAC,SAAI,CAAC,GAAG,CAAC,gBAAU,CAAC,GAAG,CAAC,GAAG,CAAC,UAAI,CAAC,iBACtC,CAAC,GAAG,CAAC,GAAG,CAAC,UAAI,CAAC,iBACb,CAAC,GAAG,CAAC,SAAI,CAAC,GAAG,CAAC,gBAAU,CAAC,GAAG,CAAC,GAAG,CAAC,UAAI,CAAC,YACzC;YACF,QAAQ;YACR,OAAI,CAAC,GAAG,CAAC,GAAG,CAAC,WAAI,CAAC,GAAG,CAAC,GAAG,CAAC,kBACtB,CAAC,GAAG,CAAC,GAAG,CAAC,WAAI,CAAC,GAAG,CAAC,GAAG,CAAC,kBACtB,CAAC,GAAG,CAAC,GAAG,CAAC,WAAI,CAAC,GAAG,CAAC,GAAG,CAAC,kBACtB,CAAC,GAAG,CAAC,GAAG,CAAC,WAAI,CAAC,GAAG,CAAC,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AAG,qBAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC/D,IAAI;oBACF,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAE,CAAC,MAAM,EAAE,CAAC;oBAC/F,oCAAoC;iBACrC;gBAAC,OAAO,CAAC,EAAE,GAAE;gBACd,IAAM,YAAY,GAAG;oBACnB,UAAU,EAAE,UAAU,CAAC,OAAQ;oBAC/B,EAAE,EAAE,IAAI,CAAC,UAAU;oBACnB,KAAK,EAAE,YAAY;iBACpB,CAAC;gBACF,YAAY,IAAI,4BAAoB,CAAC,YAAY,CAAC,CAAC;aACpD;YACD,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;QA0EO,oCAAY,GAApB,UAAqB,OAAoB,EAAE,WAAmB;YAC5D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;QACnE,CAAC;QA0MH,oBAAC;IAAD,CAAC,AAh2BD,CAAmC,KAAK,CAAC,SAAS,GAg2BjD;IAh2BY,sCAAa","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":";;;;IAOA;QAAyB,+BAA8B;QAAvD;YAAA,qEAsBC;YAjBQ,WAAK,GAAO,EAAE,CAAC;YAOf,iBAAW,GAAG,UAAC,QAAmB;gBACvC,YAAY,CAAC,QAAQ,CAAC,CAAC;YACzB,CAAC,CAAC;;QAQJ,CAAC;QAfe,4BAAwB,GAAtC,UAAuC,SAA8B;YACnE,YAAY,CAAC,SAAS,CAAC,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;QAMM,oBAAM,GAAb;;YACQ,IAAA,KAAiB,IAAI,CAAC,KAAK,EAAzB,KAAK,WAAA,EAAE,GAAG,SAAe,CAAC;YAClC,IAAM,aAAa,GAAG,8BAAkB,EAAyB,CAAC;YAClE,IAAM,UAAU,GAAG,aAAa,CAAC,sBAAS,EAAE,EAAE,KAAK,OAAA,EAAE,CAAC,CAAC;YACvD,OAAO,8BAAM,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"Arc.js","source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G,eAAa,MAAM,UAAK,MAAM,MAAG,CAAC;YAEzD,OAAO,CACL,2BAAG,SAAS,EAAC,KAAK;gBACf,iBAAM,MAAM,WAAE;gBACf,8BAAM,SAAS,EAAE,cAAc,EAAE,UAAU,EAAC,QAAQ;oBACjD,IAAK,CAAC,IAAK,CAAC,CAAC;;oBAAG,iCAAqB,CAAC,IAAK,CAAC,IAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CACzD,CACL,CACL,CAAC;QACJ,CAAC;QACH,iBAAC;IAAD,CAAC,AAfD,CAAgC,GAAG,GAelC;IAfY,gCAAU;IAiBvB,SAAS,YAAY,CAAC,QAAmB;QACvC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC/C,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjD,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalBarChart/VerticalBarChart.base.tsx"],"names":[],"mappings":";;;;IAoCA,IAAK,eAGJ;IAHD,WAAK,eAAe;QAClB,sCAAmB,CAAA;QACnB,kCAAe,CAAA;IACjB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;IACD,IAAM,aAAa,GAAG,8BAAkB,EAAwD,CAAC;IAejG;QAA0C,gDAA+D;QAgBvG,8BAAmB,KAA6B;YAAhD,YACE,kBAAM,KAAK,CAAC,SAuBb;YAhCO,YAAM,GAAY,kBAAM,EAAE,CAAC;YAuG3B,iBAAW,GAAG;YACpB,8DAA8D;YAC9D,MAAW;YACX,8DAA8D;YAC9D,MAAW,EACX,eAA2B,EAC3B,cAA0B;gBAD1B,gCAAA,EAAA,mBAA2B;gBAC3B,+BAAA,EAAA,kBAA0B;gBAE1B,IAAM,aAAa,GAAG,KAAI,CAAC,UAAU,KAAK,kBAAU,CAAC,WAAW,CAAC;gBACzD,IAAA,SAAS,GAAK,KAAI,CAAC,UAAU,CAAC,eAAe,EAAE,cAAc,EAAE,aAAa,CAAC,UAApE,CAAqE;gBACtF,IAAM,UAAU,GAAG,KAAI,CAAC,aAAa,EAAE,CAAC;gBAChC,IAAA,KAAK,GAAK,KAAI,CAAC,KAAK,MAAf,CAAgB;gBACvB,IAAA,KAAoE,KAAI,CAAC,KAAK,EAA5E,IAAI,UAAA,EAAE,uBAAuC,EAAvC,eAAe,mBAAG,KAAM,CAAC,OAAO,CAAC,MAAM,KAAA,EAAE,cAAc,oBAAe,CAAC;gB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,EAAE,KAAK;oBACtB,mBAAmB,EAAE,EAAE;oBACvB,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;iBACxE,CAAC,CAAC;aACJ;QACH,CAAC;QA4DH,2BAAC;IAAD,CAAC,AAxnBD,CAA0C,KAAK,CAAC,SAAS,GAwnBxD;IAxnBY,oDAAoB","sourcesContent":["import * as React from 'react';\nimport { max as d3Max } from 'd3-array';\nimport { line as d3Line } from 'd3-shape';\nimport { select as d3Select } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear } from 'd3-scale';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ChartHoverCard,\n IBasestate,\n IMargins,\n ILegend,\n IRefArrayData,\n IVerticalBarChartProps,\n IVerticalBarChartStyleProps,\n IVerticalBarChartStyles,\n IVerticalBarChartDataPoint,\n Legends,\n IChildProps,\n IYValueHover,\n} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n} from '../../utilities/index';\n\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\nconst getClassNames = classNamesFunction<IVerticalBarChartStyleProps, IVerticalBarChartStyles>();\nexport interface IVerticalBarChartState extends IBasestate {\n selectedLegendTitle: string;\n dataPointCalloutProps?: IVerticalBarChartDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | string | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class VerticalBarChartBase extends React.Component<IVerticalBarChartProps, IVerticalBarChartState> {\n private _points: IVerticalBarChartDataPoint[];\n private _barWidth: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IVerticalBarChartStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _xAxisLabels: string[];\n private _yMax: number;\n private _isHavingLine: boolean;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n\n public constructor(props: IVerticalBarChartProps) {\n super(props);\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n isLegendSelected: false,\n isLegendHovered: false,\n refSelected: null,\n selectedLegendTitle: '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n };\n this._isHavingLine = this._checkForLine();\n this._calloutId = getId('callout');\n this._tooltipId = getId('VCTooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n this._xAxisLabels = this._points.map((point: IVerticalBarChartDataPoint) => point.x as string);\n this._yMax = Math.max(\n d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.y)!,\n this.props.yMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topRightEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n ...(this._isHavingLine && {\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n }),\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.selectedLegendTitle,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return (\n <CartesianChart\n {...this.props}\n points={this._points}\n chartType={ChartTypes.VerticalBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n {...(this._isHavingLine && { isCalloutForStack: true })}\n legendBars={legendBars}\n datasetForXAxisDomain={this._xAxisLabels}\n barwidth={this._barWidth}\n focusZoneDirection={FocusZoneDirection.horizontal}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n {this._isHavingLine && (\n <g>{this._createLine(props.xScale!, props.yScale!, props.containerHeight, props.containerWidth)}</g>\n )}\n </>\n );\n }}\n />\n );\n }\n\n private _createLine = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScale: any,\n containerHeight: number = 0,\n containerWidth: number = 0,\n ): React.ReactNode => {\n const isNumericAxis = this._xAxisType === XAxisTypes.NumericAxis;\n const { xBarScale } = this._getScales(containerHeight, containerWidth, isNumericAxis);\n const colorScale = this._createColors();\n const { theme } = this.props;\n const { data, lineLegendColor = theme!.palette.yellow, lineLegendText } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const lineData: Array<any> = [];\n data &&\n data.forEach((item: IVerticalBarChartDataPoint, index: number) => {\n if (item.lineData && item.lineData.y) {\n lineData.push({ x: item.x, y: item.lineData!.y, point: item, index });\n }\n });\n const linePath = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => (!isNumericAxis ? xBarScale(d.index) + 0.5 * this._barWidth : xScale(d.x)))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.y));\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this.state.selectedLegendTitle === lineLegendText;\n }\n const line = (\n <path\n opacity={shouldHighlight ? 1 : 0.4}\n d={linePath(lineData)!}\n fill={'none'}\n strokeWidth={3}\n stroke={lineLegendColor}\n />\n );\n const dots: React.ReactNode[] = lineData.map(\n (item: { x: number | string; y: number; point: IVerticalBarChartDataPoint; index: number }, index: number) => {\n return (\n <circle\n key={index}\n cx={!isNumericAxis ? xBarScale(item.index) + 0.5 * this._barWidth : xScale(item.x)}\n cy={yScale(item.y)}\n onMouseOver={this._onBarHover.bind(this, item.point, colorScale(item.y))}\n onMouseOut={this._onBarLeave}\n r={8}\n stroke={lineLegendColor}\n fill={this.props.theme!.palette.white}\n strokeWidth={3}\n visibility={this.state.activeXdataPoint === item.x ? CircleVisbility.show : CircleVisbility.hide}\n onClick={item.point.lineData?.onClick}\n />\n );\n },\n );\n\n return (\n <>\n {line}\n {dots}\n </>\n );\n };\n\n private _checkForLine = (): boolean => {\n const { data } = this.props;\n return data!.some((item: IVerticalBarChartDataPoint) => item?.lineData?.y !== undefined);\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barWidth = this.props.barWidth || 32;\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n this._isHavingLine = this._checkForLine();\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForBothLineAndBars = (point: IVerticalBarChartDataPoint): JSX.Element => {\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n const content: JSX.Element[] = YValueHover.map((item: IYValueHover, index: number) => {\n return (\n <ChartHoverCard\n key={index}\n Legend={item.legend}\n {...(index === 0 && { XValue: `${hoverXValue || item.data}` })}\n color={item.color}\n YValue={item.data || item.y}\n culture={this.props.culture}\n />\n );\n });\n return <>{content}</>;\n };\n private _renderContentForOnlyBars = (props: IVerticalBarChartDataPoint): JSX.Element => {\n const { useSingleColor = false } = this.props;\n return (\n <>\n <ChartHoverCard\n XValue={props.xAxisCalloutData || (props.x as string)}\n Legend={props.legend}\n YValue={props.yAxisCalloutData || props.y}\n color={!useSingleColor && props.color ? props.color : this._createColors()(props.y)}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IVerticalBarChartDataPoint): JSX.Element | null => {\n return props\n ? this._isHavingLine\n ? this._renderContentForBothLineAndBars(props)\n : this._renderContentForOnlyBars(props)\n : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n xScale: StringAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n ) => {\n return (this._bars =\n this._xAxisType === XAxisTypes.NumericAxis\n ? this._createNumericBars(containerHeight, containerWidth, xElement!)\n : this._createStringBars(containerHeight, containerWidth, xElement!));\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._yMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForLineAndBar = (\n point: IVerticalBarChartDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { theme, useSingleColor = false } = this.props;\n const { data, lineLegendText, lineLegendColor = theme!.palette.yellow } = this.props;\n const selectedPoint = data!.filter((xDataPoint: IVerticalBarChartDataPoint) => xDataPoint.x === point.x);\n // there might be no y value of the line for the hovered bar. so we need to check this condition\n if (this._isHavingLine && selectedPoint[0].lineData?.y !== undefined) {\n // callout data for the line\n YValueHover.push({\n legend: lineLegendText,\n color: lineLegendColor,\n y: selectedPoint[0].lineData?.y,\n data: selectedPoint[0].lineData?.yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].lineData?.yAxisCalloutData,\n });\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n y: selectedPoint[0].y,\n color: !useSingleColor\n ? selectedPoint[0].color\n ? selectedPoint[0].color\n : this._createColors()(selectedPoint[0].y)\n : this._createColors()(1),\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n return { YValueHover, hoverXValue: point.xAxisCalloutData || point.x.toString() };\n };\n\n private _onBarHover(\n point: IVerticalBarChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n if (\n this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)\n ) {\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n dataForHoverCard: point.y,\n selectedLegendTitle: point.legend!,\n color: point.color || color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue: point.xAxisCalloutData || point.x.toString(),\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (point: IVerticalBarChartDataPoint, refArrayIndexNumber: number, color: string): void => {\n if (\n this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)\n ) {\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (obj.index === point.legend! && refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n isCalloutVisible: true,\n selectedLegendTitle: point.legend!,\n dataForHoverCard: point.y,\n color: point.color || color,\n xCalloutValue: point.xAxisCalloutData || point.x.toString(),\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n }\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n if (isNumericScale) {\n const xMax = d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.x as number)!;\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([\n this.margins.left! + this._barWidth / 2,\n containerWidth - this.margins.right! - this._barWidth - this._barWidth / 2,\n ]);\n const yBarScale = d3ScaleLinear()\n .domain([0, this._yMax])\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n return { xBarScale, yBarScale };\n } else {\n const endpointDistance = 0.5 * ((containerWidth - this.margins.right!) / this._points.length);\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [this._points.length - 1, 0] : [0, this._points.length - 1])\n .range([\n this.margins.left! + endpointDistance - 0.5 * this._barWidth,\n containerWidth - this.margins.right! - endpointDistance - 0.5 * this._barWidth,\n ]);\n const yBarScale = d3ScaleLinear()\n .domain([0, this._yMax])\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n return { xBarScale, yBarScale };\n }\n };\n\n private _createNumericBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, true);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this.state.selectedLegendTitle === point.legend;\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight: shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n return (\n <rect\n key={point.x}\n x={xBarScale(point.x as number)}\n className={this._classNames.opacityChangeOnHover}\n y={containerHeight - this.margins.bottom! - yBarScale(point.y)}\n width={this._barWidth}\n data-is-focusable={!this.props.hideTooltip}\n height={Math.max(yBarScale(point.y), 0)}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n aria-label=\"Vertical bar chart\"\n role=\"text\"\n aria-labelledby={`toolTip${this._calloutId}`}\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n />\n );\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(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _createStringBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, false);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n return (\n <rect\n key={point.x}\n x={xBarScale(index)}\n y={containerHeight - this.margins.bottom! - yBarScale(point.y)}\n width={this._barWidth}\n height={barHeight}\n aria-label=\"Vertical bar chart\"\n role=\"text\"\n aria-labelledby={`toolTip${this._calloutId}`}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={!this.props.hideTooltip}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n fill={point.color ? point.color : colorScale(point.y)}\n />\n );\n });\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(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n showTooltip: this.props.showXAxisLablesTooltip,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendClick(customMessage: string): void {\n if (this.state.isLegendSelected) {\n if (this.state.selectedLegendTitle === customMessage) {\n this.setState({\n isLegendSelected: false,\n selectedLegendTitle: customMessage,\n });\n } else {\n this.setState({\n selectedLegendTitle: customMessage,\n });\n }\n } else {\n this.setState({\n isLegendSelected: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendHover(customMessage: string): void {\n if (this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: false,\n selectedLegendTitle: '',\n isLegendSelected: isLegendFocused ? false : this.state.isLegendSelected,\n });\n }\n }\n\n private _getLegendData = (data: IVerticalBarChartDataPoint[], palette: IPalette): JSX.Element => {\n const { theme, useSingleColor } = this.props;\n const { lineLegendText, lineLegendColor = theme!.palette.yellow } = this.props;\n const actions: ILegend[] = [];\n data.forEach((point: IVerticalBarChartDataPoint, _index: number) => {\n const color: string = !useSingleColor ? point.color! : this._createColors()(1);\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color: color,\n action: () => {\n this._onLegendClick(point.legend!);\n },\n hoverAction: () => {\n this._onLegendHover(point.legend!);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n if (this._isHavingLine && lineLegendText && lineLegendColor) {\n const lineLegend: ILegend = {\n title: lineLegendText,\n color: lineLegendColor,\n action: () => {\n this._onLegendClick(lineLegendText);\n },\n hoverAction: () => {\n this._onLegendHover(lineLegendText);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n isLineLegendInBarChart: true,\n };\n actions.unshift(lineLegend);\n }\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || 0);\n }\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"VerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalBarChart/VerticalBarChart.base.tsx"],"names":[],"mappings":";;;;IAoCA,IAAK,eAGJ;IAHD,WAAK,eAAe;QAClB,sCAAmB,CAAA;QACnB,kCAAe,CAAA;IACjB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;IACD,IAAM,aAAa,GAAG,8BAAkB,EAAwD,CAAC;IAejG;QAA0C,gDAA+D;QAgBvG,8BAAmB,KAA6B;YAAhD,YACE,kBAAM,KAAK,CAAC,SAuBb;YAhCO,YAAM,GAAY,kBAAM,EAAE,CAAC;YAuG3B,iBAAW,GAAG;YACpB,8DAA8D;YAC9D,MAAW;YACX,8DAA8D;YAC9D,MAAW,EACX,eAA2B,EAC3B,cAA0B;gBAD1B,gCAAA,EAAA,mBAA2B;gBAC3B,+BAAA,EAAA,kBAA0B;gBAE1B,IAAM,aAAa,GAAG,KAAI,CAAC,UAAU,KAAK,kBAAU,CAAC,WAAW,CAAC;gBACzD,IAAA,SAAS,GAAK,KAAI,CAAC,UAAU,CAAC,eAAe,EAAE,cAAc,EAAE,aAAa,CAAC,UAApE,CAAqE;gBACt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AK,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC;oBACZ,eAAe,EAAE,IAAI;oBACrB,mBAAmB,EAAE,aAAa;iBACnC,CAAC,CAAC;aACJ;QACH,CAAC;QAEO,6CAAc,GAAtB,UAAuB,eAAyB;YAC9C,IAAI,CAAC,CAAC,eAAe,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,KAAK,EAAE;gBAC9D,IAAI,CAAC,QAAQ,CAAC;oBACZ,eAAe,EAAE,KAAK;oBACtB,mBAAmB,EAAE,EAAE;oBACvB,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;iBACxE,CAAC,CAAC;aACJ;QACH,CAAC;QA4DH,2BAAC;IAAD,CAAC,AAxnBD,CAA0C,KAAK,CAAC,SAAS,GAwnBxD;IAxnBY,oDAAoB","sourcesContent":["import * as React from 'react';\nimport { max as d3Max } from 'd3-array';\nimport { line as d3Line } from 'd3-shape';\nimport { select as d3Select } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear } from 'd3-scale';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ChartHoverCard,\n IBasestate,\n IMargins,\n ILegend,\n IRefArrayData,\n IVerticalBarChartProps,\n IVerticalBarChartStyleProps,\n IVerticalBarChartStyles,\n IVerticalBarChartDataPoint,\n Legends,\n IChildProps,\n IYValueHover,\n} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n} from '../../utilities/index';\n\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\nconst getClassNames = classNamesFunction<IVerticalBarChartStyleProps, IVerticalBarChartStyles>();\nexport interface IVerticalBarChartState extends IBasestate {\n selectedLegendTitle: string;\n dataPointCalloutProps?: IVerticalBarChartDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | string | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class VerticalBarChartBase extends React.Component<IVerticalBarChartProps, IVerticalBarChartState> {\n private _points: IVerticalBarChartDataPoint[];\n private _barWidth: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IVerticalBarChartStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _xAxisLabels: string[];\n private _yMax: number;\n private _isHavingLine: boolean;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n\n public constructor(props: IVerticalBarChartProps) {\n super(props);\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n isLegendSelected: false,\n isLegendHovered: false,\n refSelected: null,\n selectedLegendTitle: '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n };\n this._isHavingLine = this._checkForLine();\n this._calloutId = getId('callout');\n this._tooltipId = getId('VCTooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n this._xAxisLabels = this._points.map((point: IVerticalBarChartDataPoint) => point.x as string);\n this._yMax = Math.max(\n d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.y)!,\n this.props.yMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topRightEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n ...(this._isHavingLine && {\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n }),\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.selectedLegendTitle,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return (\n <CartesianChart\n {...this.props}\n points={this._points}\n chartType={ChartTypes.VerticalBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n {...(this._isHavingLine && { isCalloutForStack: true })}\n legendBars={legendBars}\n datasetForXAxisDomain={this._xAxisLabels}\n barwidth={this._barWidth}\n focusZoneDirection={FocusZoneDirection.horizontal}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n {this._isHavingLine && (\n <g>{this._createLine(props.xScale!, props.yScale!, props.containerHeight, props.containerWidth)}</g>\n )}\n </>\n );\n }}\n />\n );\n }\n\n private _createLine = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScale: any,\n containerHeight: number = 0,\n containerWidth: number = 0,\n ): React.ReactNode => {\n const isNumericAxis = this._xAxisType === XAxisTypes.NumericAxis;\n const { xBarScale } = this._getScales(containerHeight, containerWidth, isNumericAxis);\n const colorScale = this._createColors();\n const { theme } = this.props;\n const { data, lineLegendColor = theme!.palette.yellow, lineLegendText } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const lineData: Array<any> = [];\n data &&\n data.forEach((item: IVerticalBarChartDataPoint, index: number) => {\n if (item.lineData && item.lineData.y) {\n lineData.push({ x: item.x, y: item.lineData!.y, point: item, index });\n }\n });\n const linePath = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => (!isNumericAxis ? xBarScale(d.index) + 0.5 * this._barWidth : xScale(d.x)))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => yScale(d.y));\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this.state.selectedLegendTitle === lineLegendText;\n }\n const line = (\n <path\n opacity={shouldHighlight ? 1 : 0.4}\n d={linePath(lineData)!}\n fill={'none'}\n strokeWidth={3}\n stroke={lineLegendColor}\n />\n );\n const dots: React.ReactNode[] = lineData.map(\n (item: { x: number | string; y: number; point: IVerticalBarChartDataPoint; index: number }, index: number) => {\n return (\n <circle\n key={index}\n cx={!isNumericAxis ? xBarScale(item.index) + 0.5 * this._barWidth : xScale(item.x)}\n cy={yScale(item.y)}\n onMouseOver={this._onBarHover.bind(this, item.point, colorScale(item.y))}\n onMouseOut={this._onBarLeave}\n r={8}\n stroke={lineLegendColor}\n fill={this.props.theme!.palette.white}\n strokeWidth={3}\n visibility={this.state.activeXdataPoint === item.x ? CircleVisbility.show : CircleVisbility.hide}\n onClick={item.point.lineData?.onClick}\n />\n );\n },\n );\n\n return (\n <>\n {line}\n {dots}\n </>\n );\n };\n\n private _checkForLine = (): boolean => {\n const { data } = this.props;\n return data!.some((item: IVerticalBarChartDataPoint) => item?.lineData?.y !== undefined);\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barWidth = this.props.barWidth || 32;\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n this._isHavingLine = this._checkForLine();\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForBothLineAndBars = (point: IVerticalBarChartDataPoint): JSX.Element => {\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n const content: JSX.Element[] = YValueHover.map((item: IYValueHover, index: number) => {\n return (\n <ChartHoverCard\n key={index}\n Legend={item.legend}\n {...(index === 0 && { XValue: `${hoverXValue || item.data}` })}\n color={item.color}\n YValue={item.data || item.y}\n culture={this.props.culture}\n />\n );\n });\n return <>{content}</>;\n };\n private _renderContentForOnlyBars = (props: IVerticalBarChartDataPoint): JSX.Element => {\n const { useSingleColor = false } = this.props;\n return (\n <>\n <ChartHoverCard\n XValue={props.xAxisCalloutData || (props.x as string)}\n Legend={props.legend}\n YValue={props.yAxisCalloutData || props.y}\n color={!useSingleColor && props.color ? props.color : this._createColors()(props.y)}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IVerticalBarChartDataPoint): JSX.Element | null => {\n return props\n ? this._isHavingLine\n ? this._renderContentForBothLineAndBars(props)\n : this._renderContentForOnlyBars(props)\n : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n xScale: StringAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n ) => {\n return (this._bars =\n this._xAxisType === XAxisTypes.NumericAxis\n ? this._createNumericBars(containerHeight, containerWidth, xElement!)\n : this._createStringBars(containerHeight, containerWidth, xElement!));\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._yMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForLineAndBar = (\n point: IVerticalBarChartDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { theme, useSingleColor = false } = this.props;\n const { data, lineLegendText, lineLegendColor = theme!.palette.yellow } = this.props;\n const selectedPoint = data!.filter((xDataPoint: IVerticalBarChartDataPoint) => xDataPoint.x === point.x);\n // there might be no y value of the line for the hovered bar. so we need to check this condition\n if (this._isHavingLine && selectedPoint[0].lineData?.y !== undefined) {\n // callout data for the line\n YValueHover.push({\n legend: lineLegendText,\n color: lineLegendColor,\n y: selectedPoint[0].lineData?.y,\n data: selectedPoint[0].lineData?.yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].lineData?.yAxisCalloutData,\n });\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n y: selectedPoint[0].y,\n color: !useSingleColor\n ? selectedPoint[0].color\n ? selectedPoint[0].color\n : this._createColors()(selectedPoint[0].y)\n : this._createColors()(1),\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n return { YValueHover, hoverXValue: point.xAxisCalloutData || point.x.toString() };\n };\n\n private _onBarHover(\n point: IVerticalBarChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n if (\n this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)\n ) {\n this.setState({\n refSelected: mouseEvent,\n isCalloutVisible: true,\n dataForHoverCard: point.y,\n selectedLegendTitle: point.legend!,\n color: point.color || color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue: point.xAxisCalloutData || point.x.toString(),\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (point: IVerticalBarChartDataPoint, refArrayIndexNumber: number, color: string): void => {\n if (\n this.state.isLegendSelected === false ||\n (this.state.isLegendSelected && this.state.selectedLegendTitle === point.legend)\n ) {\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (obj.index === point.legend! && refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n isCalloutVisible: true,\n selectedLegendTitle: point.legend!,\n dataForHoverCard: point.y,\n color: point.color || color,\n xCalloutValue: point.xAxisCalloutData || point.x.toString(),\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n }\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n if (isNumericScale) {\n const xMax = d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.x as number)!;\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([\n this.margins.left! + this._barWidth / 2,\n containerWidth - this.margins.right! - this._barWidth - this._barWidth / 2,\n ]);\n const yBarScale = d3ScaleLinear()\n .domain([0, this._yMax])\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n return { xBarScale, yBarScale };\n } else {\n const endpointDistance = 0.5 * ((containerWidth - this.margins.right!) / this._points.length);\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [this._points.length - 1, 0] : [0, this._points.length - 1])\n .range([\n this.margins.left! + endpointDistance - 0.5 * this._barWidth,\n containerWidth - this.margins.right! - endpointDistance - 0.5 * this._barWidth,\n ]);\n const yBarScale = d3ScaleLinear()\n .domain([0, this._yMax])\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n return { xBarScale, yBarScale };\n }\n };\n\n private _createNumericBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, true);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n let shouldHighlight = true;\n if (this.state.isLegendHovered || this.state.isLegendSelected) {\n shouldHighlight = this.state.selectedLegendTitle === point.legend;\n }\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight: shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n return (\n <rect\n key={point.x}\n x={xBarScale(point.x as number)}\n className={this._classNames.opacityChangeOnHover}\n y={containerHeight - this.margins.bottom! - yBarScale(point.y)}\n width={this._barWidth}\n data-is-focusable={!this.props.hideTooltip}\n height={Math.max(yBarScale(point.y), 0)}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n aria-label=\"Vertical bar chart\"\n role=\"text\"\n aria-labelledby={`toolTip${this._calloutId}`}\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n />\n );\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(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _createStringBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth, false);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n return (\n <rect\n key={point.x}\n x={xBarScale(index)}\n y={containerHeight - this.margins.bottom! - yBarScale(point.y)}\n width={this._barWidth}\n height={barHeight}\n aria-label=\"Vertical bar chart\"\n role=\"text\"\n aria-labelledby={`toolTip${this._calloutId}`}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={!this.props.hideTooltip}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n fill={point.color ? point.color : colorScale(point.y)}\n />\n );\n });\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(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n showTooltip: this.props.showXAxisLablesTooltip,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendClick(customMessage: string): void {\n if (this.state.isLegendSelected) {\n if (this.state.selectedLegendTitle === customMessage) {\n this.setState({\n isLegendSelected: false,\n selectedLegendTitle: customMessage,\n });\n } else {\n this.setState({\n selectedLegendTitle: customMessage,\n });\n }\n } else {\n this.setState({\n isLegendSelected: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendHover(customMessage: string): void {\n if (this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: true,\n selectedLegendTitle: customMessage,\n });\n }\n }\n\n private _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || this.state.isLegendSelected === false) {\n this.setState({\n isLegendHovered: false,\n selectedLegendTitle: '',\n isLegendSelected: isLegendFocused ? false : this.state.isLegendSelected,\n });\n }\n }\n\n private _getLegendData = (data: IVerticalBarChartDataPoint[], palette: IPalette): JSX.Element => {\n const { theme, useSingleColor } = this.props;\n const { lineLegendText, lineLegendColor = theme!.palette.yellow } = this.props;\n const actions: ILegend[] = [];\n data.forEach((point: IVerticalBarChartDataPoint, _index: number) => {\n const color: string = !useSingleColor ? point.color! : this._createColors()(1);\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color: color,\n action: () => {\n this._onLegendClick(point.legend!);\n },\n hoverAction: () => {\n this._onLegendHover(point.legend!);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n if (this._isHavingLine && lineLegendText && lineLegendColor) {\n const lineLegend: ILegend = {\n title: lineLegendText,\n color: lineLegendColor,\n action: () => {\n this._onLegendClick(lineLegendText);\n },\n hoverAction: () => {\n this._onLegendHover(lineLegendText);\n },\n onMouseOutAction: (isLegendSelected?: boolean) => {\n this._onLegendLeave(isLegendSelected);\n },\n isLineLegendInBarChart: true,\n };\n actions.unshift(lineLegend);\n }\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || 0);\n }\n };\n}\n"]}
|
|
@@ -534,7 +534,7 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
|
|
|
534
534
|
refSelected: refSelected,
|
|
535
535
|
isCalloutVisible: true,
|
|
536
536
|
YValueHover: isLinesPresent
|
|
537
|
-
? tslib_1.
|
|
537
|
+
? tslib_1.__spreadArray(tslib_1.__spreadArray([], lineData.sort(function (a, b) { return (a.data < b.data ? 1 : -1); })), stack.chartData.slice().reverse()) : stack.chartData.slice().reverse(),
|
|
538
538
|
hoverXValue: stack.xAxisPoint,
|
|
539
539
|
stackCalloutProps: stack,
|
|
540
540
|
activeXAxisDataPoint: stack.xAxisPoint,
|