@fluentui/react-charting 5.24.37 → 5.24.39
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 +73 -1
- package/CHANGELOG.md +27 -2
- package/dist/react-charting.d.ts +2 -1
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +2 -1
- package/lib/components/AreaChart/AreaChart.base.d.ts +2 -1
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.base.d.ts +2 -1
- package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.d.ts +2 -1
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +2 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.d.ts +2 -1
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.d.ts +2 -1
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.d.ts +3 -2
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +2 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/Legends/Legends.base.d.ts +2 -1
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.d.ts +2 -1
- package/lib/components/LineChart/LineChart.base.js +2 -2
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.d.ts +3 -2
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.d.ts +3 -2
- package/lib/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib/components/PieChart/PieChart.base.d.ts +2 -1
- package/lib/components/PieChart/PieChart.base.js.map +1 -1
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.base.d.ts +3 -2
- package/lib/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.d.ts +2 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.d.ts +2 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.d.ts +2 -1
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/scatterpolar-utils.d.ts +2 -2
- package/lib/utilities/scatterpolar-utils.js.map +1 -1
- package/lib/utilities/utilities.d.ts +14 -14
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/utilities/vbc-utils.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.d.ts +2 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.base.d.ts +2 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +2 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +2 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.d.ts +2 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.d.ts +2 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.d.ts +3 -2
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib-amd/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +2 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.d.ts +2 -1
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.d.ts +2 -1
- package/lib-amd/components/LineChart/LineChart.base.js +2 -2
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.d.ts +3 -2
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/PieChart/Pie/Pie.d.ts +3 -2
- package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/PieChart/PieChart.base.d.ts +2 -1
- package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-amd/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-amd/components/Sparkline/Sparkline.base.d.ts +3 -2
- package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.d.ts +2 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.d.ts +2 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.base.d.ts +2 -1
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/utilities/image-export-utils.js.map +1 -1
- package/lib-amd/utilities/scatterpolar-utils.d.ts +2 -2
- package/lib-amd/utilities/scatterpolar-utils.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +14 -14
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-amd/utilities/vbc-utils.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +2 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.d.ts +2 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +2 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +2 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.d.ts +2 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.d.ts +2 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.d.ts +3 -2
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +2 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.d.ts +2 -1
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.d.ts +2 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +2 -2
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.d.ts +3 -2
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.d.ts +3 -2
- package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.base.d.ts +2 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.base.d.ts +3 -2
- package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.d.ts +2 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.d.ts +2 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.d.ts +2 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/scatterpolar-utils.d.ts +2 -2
- package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +14 -14
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
- package/package.json +5 -5
- package/src/components/CommonComponents/CartesianChart.types.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GanttChart.base.js","sourceRoot":"../src/","sources":["components/GanttChart/GanttChart.base.tsx"],"names":[],"mappings":";;;;IAmCA,IAAM,kBAAkB,GAAG,EAAE,CAAC;IAC9B,IAAM,cAAc,GAAG,CAAC,CAAC;IAEZ,QAAA,cAAc,GAA8C,KAAK,CAAC,UAAU,CAGvF,UAAC,EAA8E,EAAE,YAAY;;QAA1F,IAAA,cAAa,EAAb,MAAM,mBAAG,IAAI,KAAA,EAAE,0BAA8B,EAA9B,kBAAkB,mBAAG,SAAS,KAAA,EAAE,oBAAiB,EAAjB,YAAY,mBAAG,EAAE,KAAA,EAAK,KAAK,sBAA5E,gDAA8E,CAAF;QAC7E,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAS,kBAAkB,CAAC,CAAC;QAC5D,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAS,IAAA,aAAK,EAAC,SAAS,CAAC,CAAC,CAAC;QAC1D,IAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAW,EAAE,CAAC,CAAC;QAC5C,IAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAA8B,IAAI,CAAC,CAAC;QAC5E,IAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAS,IAAI,CAAC,CAA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AC1C,UAAU,EAAE,WAAW,EACvB,iBAAiB,EAAE,kBAAkB,EACrC,iBAAiB,EAAE,sBAAsB,EACzC,GAAG,EAAE,kBAAkB,EACvB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,WAAW,IACrB,CACH,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,CACL,6BACE,EAAE,EAAE,aAAa,CAAC,OAAO,EACzB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,gBACX,8BAA8B,GAC1C,CACH,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,sBAAc,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { ScaleLinear, ScaleBand, ScaleTime } from 'd3-scale';\nimport { DirectionalHint, FocusZoneDirection, getId, getRTL } from '@fluentui/react';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport { IMargins, IChart, IImageExportOptions, IGanttChartDataPoint } from '../../types/IDataPoint';\nimport { CartesianChart, IModifiedCartesianChartProps } from '../CommonComponents/index';\nimport { IGanttChartProps } from './GanttChart.types';\nimport {\n ChartHoverCard,\n ChartTypes,\n YAxisType,\n XAxisTypes,\n getTypeOfAxis,\n getNextColor,\n findHBCWANumericMinMaxOfY,\n createYAxisForHorizontalBarChartWithAxis,\n IDomainNRange,\n createStringYAxisForHorizontalBarChartWithAxis,\n getNextGradient,\n areArraysEqual,\n MIN_DOMAIN_MARGIN,\n sortAxisCategories,\n calculateAppropriateBarWidth,\n getColorFromToken,\n getScalePadding,\n getDateFormatLevel,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { formatDateToLocaleString, getMultiLevelDateTimeFormatOptions } from '@fluentui/chart-utilities';\n\ntype NumberScale = ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\ntype DateScale = ScaleTime<Date, number>;\n\nconst DEFAULT_BAR_HEIGHT = 24;\nconst MIN_BAR_HEIGHT = 1;\n\nexport const GanttChartBase: React.FunctionComponent<IGanttChartProps> = React.forwardRef<\n HTMLDivElement,\n IGanttChartProps\n>(({ useUTC = true, yAxisCategoryOrder = 'default', maxBarHeight = 24, ...props }, forwardedRef) => {\n const _barHeight = React.useRef<number>(DEFAULT_BAR_HEIGHT);\n const _calloutId = React.useRef<string>(getId('callout'));\n const _margins = React.useRef<IMargins>({});\n const _calloutAnchorPoint = React.useRef<IGanttChartDataPoint | null>(null);\n const _cartesianChartRef = React.useRef<IChart>(null);\n const _legendsRef = React.useRef<ILegendContainer>(null);\n const _emptyChartId = React.useRef<string>(getId('Gantt_empty'));\n const _legendMap = React.useRef<Record<string, { id: string; startColor: string; endColor: string }>>({});\n const _prevProps = React.useRef<Partial<IGanttChartProps>>({});\n\n const [calloutColor, setCalloutColor] = React.useState<string>('');\n const [isCalloutVisible, setCalloutVisible] = React.useState<boolean>(false);\n const [hoveredLegend, setHoveredLegend] = React.useState<string>('');\n const [calloutTarget, setCalloutTarget] = React.useState<SVGElement | null>(null);\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [calloutDataPoint, setCalloutDataPoint] = React.useState<IGanttChartDataPoint>();\n\n React.useEffect(() => {\n if (!areArraysEqual(_prevProps.current.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n _prevProps.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: _cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: IImageExportOptions): Promise<string> => {\n return toImage(_cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, getRTL(), opts);\n },\n }),\n [],\n );\n\n const _points = React.useMemo(() => {\n _legendMap.current = {};\n let colorIndex = 0;\n\n return (\n props.data?.map(point => {\n const legend = `${point.legend}`;\n if (!_legendMap.current[legend]) {\n let startColor = point.color\n ? getColorFromToken(point.color, props.theme?.isInverted)\n : getNextColor(colorIndex, 0, props.theme?.isInverted);\n let endColor = startColor;\n\n if (props.enableGradient) {\n const nextGradient = getNextGradient(colorIndex, 0, props.theme?.isInverted);\n startColor = point.gradient?.[0] || nextGradient[0];\n endColor = point.gradient?.[1] || nextGradient[1];\n }\n\n _legendMap.current[legend] = { id: getId('legend'), startColor, endColor };\n colorIndex += 1;\n }\n\n const { startColor, endColor } = _legendMap.current[legend];\n return {\n ...point,\n color: startColor,\n ...(props.enableGradient ? { gradient: [startColor, endColor] as [string, string] } : {}),\n };\n }) ?? []\n );\n }, [props.data, props.theme?.isInverted, props.enableGradient]);\n\n const _xAxisType = React.useMemo(() => {\n if (_points.length > 0) {\n return getTypeOfAxis(_points[0].x.start, true) as XAxisTypes;\n }\n return XAxisTypes.DateAxis;\n }, [_points]);\n\n const _yAxisType = React.useMemo(() => {\n if (_points.length > 0) {\n return getTypeOfAxis(_points[0].y, false) as YAxisType;\n }\n return YAxisType.StringAxis;\n }, [_points]);\n\n const _yAxisPadding = React.useMemo(() => {\n return getScalePadding(props.yAxisPadding, undefined, 1 / 2);\n }, [props.yAxisPadding]);\n\n const _dateFormatOptions = React.useMemo(() => {\n if (_xAxisType !== XAxisTypes.DateAxis) {\n return undefined;\n }\n\n let lowestFormatLevel = 100;\n let highestFormatLevel = -1;\n _points.forEach(p => {\n const startFormatLevel = getDateFormatLevel(p.x.start as Date, useUTC);\n const endFormatLevel = getDateFormatLevel(p.x.end as Date, useUTC);\n lowestFormatLevel = Math.min(lowestFormatLevel, startFormatLevel, endFormatLevel);\n highestFormatLevel = Math.max(highestFormatLevel, startFormatLevel, endFormatLevel);\n });\n\n return getMultiLevelDateTimeFormatOptions(lowestFormatLevel, highestFormatLevel);\n }, [useUTC, _points, _xAxisType]);\n\n const _mapYValueToXValues = React.useCallback(() => {\n const yValueToXValues: Record<string, number[]> = {};\n _points.forEach(point => {\n if (!yValueToXValues[point.y]) {\n yValueToXValues[point.y] = [];\n }\n yValueToXValues[point.y].push(+point.x.end - +point.x.start);\n });\n return yValueToXValues;\n }, [_points]);\n\n const _getOrderedYAxisLabels = React.useCallback(() => {\n const yValueToXValues = _mapYValueToXValues();\n\n if (_yAxisType !== YAxisType.StringAxis) {\n return Object.keys(yValueToXValues).sort((a, b) => +a - +b);\n }\n\n if (yAxisCategoryOrder === 'default') {\n return Object.keys(yValueToXValues).reverse();\n }\n return sortAxisCategories(yValueToXValues, yAxisCategoryOrder);\n }, [_mapYValueToXValues, _yAxisType, yAxisCategoryOrder]);\n\n const _yAxisLabels = React.useMemo(() => _getOrderedYAxisLabels(), [_getOrderedYAxisLabels]);\n\n const _getDomainNRangeValues = React.useCallback(\n (\n points: IGanttChartDataPoint[],\n margins: IMargins,\n containerWidth: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ): IDomainNRange => {\n const xValues: (Date | number)[] = [];\n points.forEach(point => {\n xValues.push(point.x.start, point.x.end);\n });\n\n const xMin = d3Min(xValues) || 0;\n const xMax = d3Max(xValues) || 0;\n\n return {\n dStartValue: isRTL ? xMax : xMin,\n dEndValue: isRTL ? xMin : xMax,\n rStartValue: margins.left! + (isRTL ? 0 : shiftX),\n rEndValue: containerWidth - margins.right! - (isRTL ? shiftX : 0),\n };\n },\n [],\n );\n\n const _getMargins = React.useCallback((margins: IMargins) => {\n _margins.current = margins;\n }, []);\n\n const _getFormattedXValue = React.useCallback(\n (point: IGanttChartDataPoint): string => {\n let formattedStartX: string;\n let formattedEndX: string;\n\n if (_xAxisType === XAxisTypes.DateAxis) {\n formattedStartX = formatDateToLocaleString(\n point.x.start as Date,\n props.culture,\n useUTC,\n false,\n _dateFormatOptions,\n );\n formattedEndX = formatDateToLocaleString(point.x.end as Date, props.culture, useUTC, false, _dateFormatOptions);\n } else {\n formattedStartX = point.x.start.toString();\n formattedEndX = point.x.end.toString();\n }\n\n return `${formattedStartX} - ${formattedEndX}`;\n },\n [props.culture, useUTC, _dateFormatOptions, _xAxisType],\n );\n\n const _getCustomizedCallout = React.useCallback(() => {\n const defaultRender = (point?: IGanttChartDataPoint): React.JSX.Element | null => {\n return point ? (\n <ChartHoverCard\n XValue={point.yAxisCalloutData || point.y.toString()}\n Legend={point.legend}\n YValue={point.xAxisCalloutData || _getFormattedXValue(point)}\n color={point.color}\n culture={props.culture}\n />\n ) : null;\n };\n\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(calloutDataPoint, defaultRender)\n : null;\n //eslint-disable-next-line react-hooks/exhaustive-deps\n }, [_getFormattedXValue, calloutDataPoint, props.culture, props.onRenderCalloutPerDataPoint]);\n\n const _getAriaLabel = React.useCallback(\n (point: IGanttChartDataPoint): string => {\n const xValue = point.xAxisCalloutData || _getFormattedXValue(point);\n const yValue = point.yAxisCalloutData || point.y;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${yValue}. ` + (point.legend ? `${point.legend}, ` : '') + `${xValue}.`\n );\n },\n [_getFormattedXValue],\n );\n\n const _getHighlightedLegend = React.useCallback(() => {\n return selectedLegends.length > 0 ? selectedLegends : hoveredLegend ? [hoveredLegend] : [];\n }, [hoveredLegend, selectedLegends]);\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n const _legendHighlighted = React.useCallback(\n (legend: string | undefined) => {\n return _getHighlightedLegend().includes(`${legend}`);\n },\n [_getHighlightedLegend],\n );\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n const _noLegendHighlighted = React.useCallback(() => {\n return _getHighlightedLegend().length === 0;\n }, [_getHighlightedLegend]);\n\n const _showCallout = React.useCallback(\n (target: SVGElement, point: IGanttChartDataPoint) => {\n if (!(_noLegendHighlighted() || _legendHighlighted(point.legend)) || _calloutAnchorPoint.current === point) {\n return;\n }\n\n _calloutAnchorPoint.current = point;\n setCalloutTarget(target);\n setCalloutVisible(true);\n setCalloutLegend(point.legend!);\n setCalloutColor(point.color!);\n setXCalloutValue(point.yAxisCalloutData || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData! || _getFormattedXValue(point));\n setCalloutDataPoint(point);\n },\n [_getFormattedXValue, _legendHighlighted, _noLegendHighlighted],\n );\n\n const _onBarFocus = React.useCallback(\n (point: IGanttChartDataPoint, focusEvent: React.FocusEvent<SVGElement>): void => {\n _showCallout(focusEvent.currentTarget, point);\n },\n [_showCallout],\n );\n\n const _onBarHover = React.useCallback(\n (point: IGanttChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>): void => {\n _showCallout(mouseEvent.currentTarget, point);\n },\n [_showCallout],\n );\n\n const _onBarLeave = React.useCallback((): void => {\n // do nothing\n }, []);\n\n const _handleChartMouseLeave = React.useCallback((): void => {\n _calloutAnchorPoint.current = null;\n setCalloutTarget(null);\n setCalloutVisible(false);\n setCalloutLegend('');\n setCalloutColor('');\n setXCalloutValue('');\n setYCalloutValue('');\n setCalloutDataPoint(undefined);\n }, []);\n\n const _closeCallout = React.useCallback(() => {\n setCalloutVisible(false);\n }, []);\n\n const _getBarHeight = React.useCallback(\n (adjustedValue: number): number => {\n let barHeight: number;\n if (typeof props.barHeight === 'number') {\n barHeight = props.barHeight;\n } else {\n barHeight = adjustedValue;\n }\n if (typeof maxBarHeight === 'number') {\n barHeight = Math.min(barHeight, maxBarHeight);\n }\n barHeight = Math.max(barHeight, MIN_BAR_HEIGHT);\n return barHeight;\n },\n [maxBarHeight, props.barHeight],\n );\n\n const _getOrderedDataPoints = React.useCallback(() => {\n const result: IGanttChartDataPoint[] = [];\n\n const yValueToPoints: Record<string, IGanttChartDataPoint[]> = {};\n _points.forEach(point => {\n if (!yValueToPoints[point.y]) {\n yValueToPoints[point.y] = [];\n }\n yValueToPoints[point.y].push(point);\n });\n\n for (let i = _yAxisLabels.length - 1; i >= 0; i--) {\n const yValue = _yAxisLabels[i];\n if (yValueToPoints[yValue]) {\n result.push(...yValueToPoints[yValue].sort((a, b) => +a.x.start - +b.x.start));\n }\n }\n\n return result;\n }, [_points, _yAxisLabels]);\n\n const _createBars = React.useCallback(\n ({\n xScale,\n yScalePrimary: yScale,\n }: {\n xScale: DateScale | NumberScale;\n yScalePrimary: NumberScale | StringScale;\n }): React.JSX.Element => {\n const getGradientId = (legend: string | undefined) => {\n const legendId = _legendMap.current[`${legend}`].id;\n return `${legendId}_gradient`;\n };\n\n const gradientDefs: React.JSX.Element[] = [];\n if (props.enableGradient) {\n Object.keys(_legendMap.current).forEach((legend: string, index: number) => {\n const { startColor, endColor } = _legendMap.current[legend];\n gradientDefs.push(\n <linearGradient key={index} id={getGradientId(legend)}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>,\n );\n });\n }\n\n let scaleBandwidth = 0;\n if (_yAxisType === YAxisType.StringAxis) {\n scaleBandwidth = (yScale as StringScale).bandwidth();\n _barHeight.current = _getBarHeight(scaleBandwidth);\n }\n\n const points = _getOrderedDataPoints();\n const bars = points.map((point: IGanttChartDataPoint, index: number) => {\n const rectStartX = xScale(point.x.start);\n const rectEndX = xScale(point.x.end);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const rectY = yScale(point.y as any)! + (scaleBandwidth - _barHeight.current) / 2;\n\n const shouldHighlight = _noLegendHighlighted() || _legendHighlighted(point.legend);\n\n return (\n <rect\n key={index}\n x={Math.min(rectStartX, rectEndX)}\n y={rectY}\n width={Math.abs(rectEndX - rectStartX)}\n height={_barHeight.current}\n rx={props.roundCorners ? 3 : 0}\n fill={props.enableGradient ? `url(#${getGradientId(point.legend)})` : point.color}\n opacity={shouldHighlight ? 1 : 0.1}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, event)}\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(point, event)}\n onBlur={_onBarLeave}\n data-is-focusable={shouldHighlight}\n role=\"img\"\n aria-label={_getAriaLabel(point)}\n />\n );\n });\n return (\n <g>\n {gradientDefs.length > 0 ? <defs>{gradientDefs}</defs> : null}\n {bars}\n </g>\n );\n },\n [\n _getAriaLabel,\n _getBarHeight,\n _getOrderedDataPoints,\n _legendHighlighted,\n _noLegendHighlighted,\n _onBarFocus,\n _onBarHover,\n _onBarLeave,\n _yAxisType,\n props.enableGradient,\n props.roundCorners,\n ],\n );\n\n const _onLegendHover = React.useCallback((legend: string): void => {\n setHoveredLegend(legend);\n }, []);\n\n const _onLegendLeave = React.useCallback((): void => {\n setHoveredLegend('');\n }, []);\n\n const _onLegendSelectionChange = React.useCallback(\n (_selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: ILegend): void => {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(_selectedLegends);\n } else {\n setSelectedLegends(_selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(_selectedLegends, event, currentLegend);\n }\n },\n [props.legendProps],\n );\n\n const _getLegendData = React.useCallback((): React.JSX.Element => {\n const actions: ILegend[] = [];\n\n Object.keys(_legendMap.current).forEach((legendTitle: string) => {\n const legend: ILegend = {\n title: legendTitle,\n color: _legendMap.current[legendTitle].startColor,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowProps={props.legendsOverflowProps}\n focusZonePropsInHoverCard={props.focusZonePropsForLegendsInHoverCard}\n overflowText={props.legendsOverflowText}\n onChange={_onLegendSelectionChange}\n ref={_legendsRef}\n {...props.legendProps}\n />\n );\n return legends;\n }, [\n _handleChartMouseLeave,\n _onLegendHover,\n _onLegendLeave,\n _onLegendSelectionChange,\n props.enabledLegendsWrapLines,\n props.focusZonePropsForLegendsInHoverCard,\n props.legendProps,\n props.legendsOverflowProps,\n props.legendsOverflowText,\n ]);\n\n const _getChartTitle = React.useCallback((): string => {\n return (props.chartTitle ? `${props.chartTitle}. ` : '') + `Gantt chart with ${_points.length} data points. `;\n }, [_points.length, props.chartTitle]);\n\n const _isChartEmpty = React.useCallback((): boolean => {\n return _points.length === 0;\n }, [_points.length]);\n\n const _getYDomainMargins = React.useCallback(\n (containerHeight: number): IMargins => {\n let domainMargin = MIN_DOMAIN_MARGIN;\n\n const ySet = new Set<string | number>();\n _points.forEach((point: IGanttChartDataPoint) => {\n ySet.add(point.y);\n });\n const uniqueY = Array.from(ySet);\n\n /** Total height available to render the bars */\n const totalHeight =\n containerHeight - (_margins.current.top! + MIN_DOMAIN_MARGIN) - (_margins.current.bottom! + MIN_DOMAIN_MARGIN);\n\n if (_yAxisType !== YAxisType.StringAxis) {\n _barHeight.current = _getBarHeight(\n calculateAppropriateBarWidth(uniqueY as number[] | Date[], totalHeight, _yAxisPadding),\n );\n domainMargin += _barHeight.current / 2;\n }\n\n return {\n ..._margins.current,\n top: _margins.current.top! + domainMargin,\n bottom: _margins.current.bottom! + domainMargin,\n };\n },\n [_getBarHeight, _points, _yAxisPadding, _yAxisType],\n );\n\n if (!_isChartEmpty()) {\n _barHeight.current = _getBarHeight(DEFAULT_BAR_HEIGHT);\n\n const calloutProps: IModifiedCartesianChartProps['calloutProps'] = {\n isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${_calloutId.current}`,\n target: calloutTarget,\n isBeakVisible: false,\n gapSpace: 15,\n color: calloutColor,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue,\n onDismiss: _closeCallout,\n preventDismissOnLostFocus: true,\n ...props.calloutProps,\n };\n const tickParams: IModifiedCartesianChartProps['tickParams'] = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n return (\n <CartesianChart\n {...props}\n yAxisPadding={_yAxisPadding}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.GanttChart}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={_getLegendData()}\n createYAxis={createYAxisForHorizontalBarChartWithAxis}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxisForHorizontalBarChartWithAxis}\n getMinMaxOfYAxis={findHBCWANumericMinMaxOfY}\n focusZoneDirection={FocusZoneDirection.bidirectional}\n customizedCallout={_getCustomizedCallout()}\n getmargins={_getMargins}\n getYDomainMargins={_getYDomainMargins}\n onChartMouseLeave={_handleChartMouseLeave}\n ref={_cartesianChartRef}\n useUTC={useUTC}\n children={_createBars}\n />\n );\n } else {\n return (\n <div\n id={_emptyChartId.current}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n});\n\nGanttChartBase.displayName = 'GanttChart';\n"]}
|
|
1
|
+
{"version":3,"file":"GanttChart.base.js","sourceRoot":"../src/","sources":["components/GanttChart/GanttChart.base.tsx"],"names":[],"mappings":";;;;IAoCA,IAAM,kBAAkB,GAAG,EAAE,CAAC;IAC9B,IAAM,cAAc,GAAG,CAAC,CAAC;IAEZ,QAAA,cAAc,GAA8C,KAAK,CAAC,UAAU,CAGvF,UAAC,EAA8E,EAAE,YAAY;;QAA1F,IAAA,cAAa,EAAb,MAAM,mBAAG,IAAI,KAAA,EAAE,0BAA8B,EAA9B,kBAAkB,mBAAG,SAAS,KAAA,EAAE,oBAAiB,EAAjB,YAAY,mBAAG,EAAE,KAAA,EAAK,KAAK,sBAA5E,gDAA8E,CAAF;QAC7E,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAS,kBAAkB,CAAC,CAAC;QAC5D,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,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AAY,EAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,cAAc,EAAE,EAC5B,WAAW,EAAE,gDAAwC,EACrD,qBAAqB,EAAE,sBAAsB,EAC7C,iBAAiB,EAAE,sDAA8C,EACjE,gBAAgB,EAAE,iCAAyB,EAC3C,kBAAkB,EAAE,0BAAkB,CAAC,aAAa,EACpD,iBAAiB,EAAE,qBAAqB,EAAE,EAC1C,UAAU,EAAE,WAAW,EACvB,iBAAiB,EAAE,kBAAkB,EACrC,iBAAiB,EAAE,sBAAsB,EACzC,GAAG,EAAE,kBAAkB,EACvB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,WAAW,IACrB,CACH,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,CACL,6BACE,EAAE,EAAE,aAAa,CAAC,OAAO,EACzB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,gBACX,8BAA8B,GAC1C,CACH,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,sBAAc,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { ScaleLinear, ScaleBand, ScaleTime } from 'd3-scale';\nimport { DirectionalHint, FocusZoneDirection, getId, getRTL } from '@fluentui/react';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport { IMargins, IChart, IImageExportOptions, IGanttChartDataPoint } from '../../types/IDataPoint';\nimport { CartesianChart, IModifiedCartesianChartProps } from '../CommonComponents/index';\nimport { IGanttChartProps } from './GanttChart.types';\nimport {\n ChartHoverCard,\n ChartTypes,\n YAxisType,\n XAxisTypes,\n getTypeOfAxis,\n getNextColor,\n findHBCWANumericMinMaxOfY,\n createYAxisForHorizontalBarChartWithAxis,\n IDomainNRange,\n createStringYAxisForHorizontalBarChartWithAxis,\n getNextGradient,\n areArraysEqual,\n MIN_DOMAIN_MARGIN,\n sortAxisCategories,\n calculateAppropriateBarWidth,\n getColorFromToken,\n getScalePadding,\n getDateFormatLevel,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { formatDateToLocaleString, getMultiLevelDateTimeFormatOptions } from '@fluentui/chart-utilities';\nimport type { JSXElement } from '@fluentui/utilities';\n\ntype NumberScale = ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\ntype DateScale = ScaleTime<Date, number>;\n\nconst DEFAULT_BAR_HEIGHT = 24;\nconst MIN_BAR_HEIGHT = 1;\n\nexport const GanttChartBase: React.FunctionComponent<IGanttChartProps> = React.forwardRef<\n HTMLDivElement,\n IGanttChartProps\n>(({ useUTC = true, yAxisCategoryOrder = 'default', maxBarHeight = 24, ...props }, forwardedRef) => {\n const _barHeight = React.useRef<number>(DEFAULT_BAR_HEIGHT);\n const _calloutId = React.useRef<string>(getId('callout'));\n const _margins = React.useRef<IMargins>({});\n const _calloutAnchorPoint = React.useRef<IGanttChartDataPoint | null>(null);\n const _cartesianChartRef = React.useRef<IChart>(null);\n const _legendsRef = React.useRef<ILegendContainer>(null);\n const _emptyChartId = React.useRef<string>(getId('Gantt_empty'));\n const _legendMap = React.useRef<Record<string, { id: string; startColor: string; endColor: string }>>({});\n const _prevProps = React.useRef<Partial<IGanttChartProps>>({});\n\n const [calloutColor, setCalloutColor] = React.useState<string>('');\n const [isCalloutVisible, setCalloutVisible] = React.useState<boolean>(false);\n const [hoveredLegend, setHoveredLegend] = React.useState<string>('');\n const [calloutTarget, setCalloutTarget] = React.useState<SVGElement | null>(null);\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [calloutDataPoint, setCalloutDataPoint] = React.useState<IGanttChartDataPoint>();\n\n React.useEffect(() => {\n if (!areArraysEqual(_prevProps.current.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n _prevProps.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: _cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: IImageExportOptions): Promise<string> => {\n return toImage(_cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, getRTL(), opts);\n },\n }),\n [],\n );\n\n const _points = React.useMemo(() => {\n _legendMap.current = {};\n let colorIndex = 0;\n\n return (\n props.data?.map(point => {\n const legend = `${point.legend}`;\n if (!_legendMap.current[legend]) {\n let startColor = point.color\n ? getColorFromToken(point.color, props.theme?.isInverted)\n : getNextColor(colorIndex, 0, props.theme?.isInverted);\n let endColor = startColor;\n\n if (props.enableGradient) {\n const nextGradient = getNextGradient(colorIndex, 0, props.theme?.isInverted);\n startColor = point.gradient?.[0] || nextGradient[0];\n endColor = point.gradient?.[1] || nextGradient[1];\n }\n\n _legendMap.current[legend] = { id: getId('legend'), startColor, endColor };\n colorIndex += 1;\n }\n\n const { startColor, endColor } = _legendMap.current[legend];\n return {\n ...point,\n color: startColor,\n ...(props.enableGradient ? { gradient: [startColor, endColor] as [string, string] } : {}),\n };\n }) ?? []\n );\n }, [props.data, props.theme?.isInverted, props.enableGradient]);\n\n const _xAxisType = React.useMemo(() => {\n if (_points.length > 0) {\n return getTypeOfAxis(_points[0].x.start, true) as XAxisTypes;\n }\n return XAxisTypes.DateAxis;\n }, [_points]);\n\n const _yAxisType = React.useMemo(() => {\n if (_points.length > 0) {\n return getTypeOfAxis(_points[0].y, false) as YAxisType;\n }\n return YAxisType.StringAxis;\n }, [_points]);\n\n const _yAxisPadding = React.useMemo(() => {\n return getScalePadding(props.yAxisPadding, undefined, 1 / 2);\n }, [props.yAxisPadding]);\n\n const _dateFormatOptions = React.useMemo(() => {\n if (_xAxisType !== XAxisTypes.DateAxis) {\n return undefined;\n }\n\n let lowestFormatLevel = 100;\n let highestFormatLevel = -1;\n _points.forEach(p => {\n const startFormatLevel = getDateFormatLevel(p.x.start as Date, useUTC);\n const endFormatLevel = getDateFormatLevel(p.x.end as Date, useUTC);\n lowestFormatLevel = Math.min(lowestFormatLevel, startFormatLevel, endFormatLevel);\n highestFormatLevel = Math.max(highestFormatLevel, startFormatLevel, endFormatLevel);\n });\n\n return getMultiLevelDateTimeFormatOptions(lowestFormatLevel, highestFormatLevel);\n }, [useUTC, _points, _xAxisType]);\n\n const _mapYValueToXValues = React.useCallback(() => {\n const yValueToXValues: Record<string, number[]> = {};\n _points.forEach(point => {\n if (!yValueToXValues[point.y]) {\n yValueToXValues[point.y] = [];\n }\n yValueToXValues[point.y].push(+point.x.end - +point.x.start);\n });\n return yValueToXValues;\n }, [_points]);\n\n const _getOrderedYAxisLabels = React.useCallback(() => {\n const yValueToXValues = _mapYValueToXValues();\n\n if (_yAxisType !== YAxisType.StringAxis) {\n return Object.keys(yValueToXValues).sort((a, b) => +a - +b);\n }\n\n if (yAxisCategoryOrder === 'default') {\n return Object.keys(yValueToXValues).reverse();\n }\n return sortAxisCategories(yValueToXValues, yAxisCategoryOrder);\n }, [_mapYValueToXValues, _yAxisType, yAxisCategoryOrder]);\n\n const _yAxisLabels = React.useMemo(() => _getOrderedYAxisLabels(), [_getOrderedYAxisLabels]);\n\n const _getDomainNRangeValues = React.useCallback(\n (\n points: IGanttChartDataPoint[],\n margins: IMargins,\n containerWidth: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ): IDomainNRange => {\n const xValues: (Date | number)[] = [];\n points.forEach(point => {\n xValues.push(point.x.start, point.x.end);\n });\n\n const xMin = d3Min(xValues) || 0;\n const xMax = d3Max(xValues) || 0;\n\n return {\n dStartValue: isRTL ? xMax : xMin,\n dEndValue: isRTL ? xMin : xMax,\n rStartValue: margins.left! + (isRTL ? 0 : shiftX),\n rEndValue: containerWidth - margins.right! - (isRTL ? shiftX : 0),\n };\n },\n [],\n );\n\n const _getMargins = React.useCallback((margins: IMargins) => {\n _margins.current = margins;\n }, []);\n\n const _getFormattedXValue = React.useCallback(\n (point: IGanttChartDataPoint): string => {\n let formattedStartX: string;\n let formattedEndX: string;\n\n if (_xAxisType === XAxisTypes.DateAxis) {\n formattedStartX = formatDateToLocaleString(\n point.x.start as Date,\n props.culture,\n useUTC,\n false,\n _dateFormatOptions,\n );\n formattedEndX = formatDateToLocaleString(point.x.end as Date, props.culture, useUTC, false, _dateFormatOptions);\n } else {\n formattedStartX = point.x.start.toString();\n formattedEndX = point.x.end.toString();\n }\n\n return `${formattedStartX} - ${formattedEndX}`;\n },\n [props.culture, useUTC, _dateFormatOptions, _xAxisType],\n );\n\n const _getCustomizedCallout = React.useCallback(() => {\n const defaultRender = (point?: IGanttChartDataPoint): JSXElement | null => {\n return point ? (\n <ChartHoverCard\n XValue={point.yAxisCalloutData || point.y.toString()}\n Legend={point.legend}\n YValue={point.xAxisCalloutData || _getFormattedXValue(point)}\n color={point.color}\n culture={props.culture}\n />\n ) : null;\n };\n\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(calloutDataPoint, defaultRender)\n : null;\n //eslint-disable-next-line react-hooks/exhaustive-deps\n }, [_getFormattedXValue, calloutDataPoint, props.culture, props.onRenderCalloutPerDataPoint]);\n\n const _getAriaLabel = React.useCallback(\n (point: IGanttChartDataPoint): string => {\n const xValue = point.xAxisCalloutData || _getFormattedXValue(point);\n const yValue = point.yAxisCalloutData || point.y;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${yValue}. ` + (point.legend ? `${point.legend}, ` : '') + `${xValue}.`\n );\n },\n [_getFormattedXValue],\n );\n\n const _getHighlightedLegend = React.useCallback(() => {\n return selectedLegends.length > 0 ? selectedLegends : hoveredLegend ? [hoveredLegend] : [];\n }, [hoveredLegend, selectedLegends]);\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n const _legendHighlighted = React.useCallback(\n (legend: string | undefined) => {\n return _getHighlightedLegend().includes(`${legend}`);\n },\n [_getHighlightedLegend],\n );\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n const _noLegendHighlighted = React.useCallback(() => {\n return _getHighlightedLegend().length === 0;\n }, [_getHighlightedLegend]);\n\n const _showCallout = React.useCallback(\n (target: SVGElement, point: IGanttChartDataPoint) => {\n if (!(_noLegendHighlighted() || _legendHighlighted(point.legend)) || _calloutAnchorPoint.current === point) {\n return;\n }\n\n _calloutAnchorPoint.current = point;\n setCalloutTarget(target);\n setCalloutVisible(true);\n setCalloutLegend(point.legend!);\n setCalloutColor(point.color!);\n setXCalloutValue(point.yAxisCalloutData || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData! || _getFormattedXValue(point));\n setCalloutDataPoint(point);\n },\n [_getFormattedXValue, _legendHighlighted, _noLegendHighlighted],\n );\n\n const _onBarFocus = React.useCallback(\n (point: IGanttChartDataPoint, focusEvent: React.FocusEvent<SVGElement>): void => {\n _showCallout(focusEvent.currentTarget, point);\n },\n [_showCallout],\n );\n\n const _onBarHover = React.useCallback(\n (point: IGanttChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>): void => {\n _showCallout(mouseEvent.currentTarget, point);\n },\n [_showCallout],\n );\n\n const _onBarLeave = React.useCallback((): void => {\n // do nothing\n }, []);\n\n const _handleChartMouseLeave = React.useCallback((): void => {\n _calloutAnchorPoint.current = null;\n setCalloutTarget(null);\n setCalloutVisible(false);\n setCalloutLegend('');\n setCalloutColor('');\n setXCalloutValue('');\n setYCalloutValue('');\n setCalloutDataPoint(undefined);\n }, []);\n\n const _closeCallout = React.useCallback(() => {\n setCalloutVisible(false);\n }, []);\n\n const _getBarHeight = React.useCallback(\n (adjustedValue: number): number => {\n let barHeight: number;\n if (typeof props.barHeight === 'number') {\n barHeight = props.barHeight;\n } else {\n barHeight = adjustedValue;\n }\n if (typeof maxBarHeight === 'number') {\n barHeight = Math.min(barHeight, maxBarHeight);\n }\n barHeight = Math.max(barHeight, MIN_BAR_HEIGHT);\n return barHeight;\n },\n [maxBarHeight, props.barHeight],\n );\n\n const _getOrderedDataPoints = React.useCallback(() => {\n const result: IGanttChartDataPoint[] = [];\n\n const yValueToPoints: Record<string, IGanttChartDataPoint[]> = {};\n _points.forEach(point => {\n if (!yValueToPoints[point.y]) {\n yValueToPoints[point.y] = [];\n }\n yValueToPoints[point.y].push(point);\n });\n\n for (let i = _yAxisLabels.length - 1; i >= 0; i--) {\n const yValue = _yAxisLabels[i];\n if (yValueToPoints[yValue]) {\n result.push(...yValueToPoints[yValue].sort((a, b) => +a.x.start - +b.x.start));\n }\n }\n\n return result;\n }, [_points, _yAxisLabels]);\n\n const _createBars = React.useCallback(\n ({\n xScale,\n yScalePrimary: yScale,\n }: {\n xScale: DateScale | NumberScale;\n yScalePrimary: NumberScale | StringScale;\n }): JSXElement => {\n const getGradientId = (legend: string | undefined) => {\n const legendId = _legendMap.current[`${legend}`].id;\n return `${legendId}_gradient`;\n };\n\n const gradientDefs: JSXElement[] = [];\n if (props.enableGradient) {\n Object.keys(_legendMap.current).forEach((legend: string, index: number) => {\n const { startColor, endColor } = _legendMap.current[legend];\n gradientDefs.push(\n <linearGradient key={index} id={getGradientId(legend)}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>,\n );\n });\n }\n\n let scaleBandwidth = 0;\n if (_yAxisType === YAxisType.StringAxis) {\n scaleBandwidth = (yScale as StringScale).bandwidth();\n _barHeight.current = _getBarHeight(scaleBandwidth);\n }\n\n const points = _getOrderedDataPoints();\n const bars = points.map((point: IGanttChartDataPoint, index: number) => {\n const rectStartX = xScale(point.x.start);\n const rectEndX = xScale(point.x.end);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const rectY = yScale(point.y as any)! + (scaleBandwidth - _barHeight.current) / 2;\n\n const shouldHighlight = _noLegendHighlighted() || _legendHighlighted(point.legend);\n\n return (\n <rect\n key={index}\n x={Math.min(rectStartX, rectEndX)}\n y={rectY}\n width={Math.abs(rectEndX - rectStartX)}\n height={_barHeight.current}\n rx={props.roundCorners ? 3 : 0}\n fill={props.enableGradient ? `url(#${getGradientId(point.legend)})` : point.color}\n opacity={shouldHighlight ? 1 : 0.1}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, event)}\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(point, event)}\n onBlur={_onBarLeave}\n data-is-focusable={shouldHighlight}\n role=\"img\"\n aria-label={_getAriaLabel(point)}\n />\n );\n });\n return (\n <g>\n {gradientDefs.length > 0 ? <defs>{gradientDefs}</defs> : null}\n {bars}\n </g>\n );\n },\n [\n _getAriaLabel,\n _getBarHeight,\n _getOrderedDataPoints,\n _legendHighlighted,\n _noLegendHighlighted,\n _onBarFocus,\n _onBarHover,\n _onBarLeave,\n _yAxisType,\n props.enableGradient,\n props.roundCorners,\n ],\n );\n\n const _onLegendHover = React.useCallback((legend: string): void => {\n setHoveredLegend(legend);\n }, []);\n\n const _onLegendLeave = React.useCallback((): void => {\n setHoveredLegend('');\n }, []);\n\n const _onLegendSelectionChange = React.useCallback(\n (_selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: ILegend): void => {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(_selectedLegends);\n } else {\n setSelectedLegends(_selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(_selectedLegends, event, currentLegend);\n }\n },\n [props.legendProps],\n );\n\n const _getLegendData = React.useCallback((): JSXElement => {\n const actions: ILegend[] = [];\n\n Object.keys(_legendMap.current).forEach((legendTitle: string) => {\n const legend: ILegend = {\n title: legendTitle,\n color: _legendMap.current[legendTitle].startColor,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowProps={props.legendsOverflowProps}\n focusZonePropsInHoverCard={props.focusZonePropsForLegendsInHoverCard}\n overflowText={props.legendsOverflowText}\n onChange={_onLegendSelectionChange}\n ref={_legendsRef}\n {...props.legendProps}\n />\n );\n return legends;\n }, [\n _handleChartMouseLeave,\n _onLegendHover,\n _onLegendLeave,\n _onLegendSelectionChange,\n props.enabledLegendsWrapLines,\n props.focusZonePropsForLegendsInHoverCard,\n props.legendProps,\n props.legendsOverflowProps,\n props.legendsOverflowText,\n ]);\n\n const _getChartTitle = React.useCallback((): string => {\n return (props.chartTitle ? `${props.chartTitle}. ` : '') + `Gantt chart with ${_points.length} data points. `;\n }, [_points.length, props.chartTitle]);\n\n const _isChartEmpty = React.useCallback((): boolean => {\n return _points.length === 0;\n }, [_points.length]);\n\n const _getYDomainMargins = React.useCallback(\n (containerHeight: number): IMargins => {\n let domainMargin = MIN_DOMAIN_MARGIN;\n\n const ySet = new Set<string | number>();\n _points.forEach((point: IGanttChartDataPoint) => {\n ySet.add(point.y);\n });\n const uniqueY = Array.from(ySet);\n\n /** Total height available to render the bars */\n const totalHeight =\n containerHeight - (_margins.current.top! + MIN_DOMAIN_MARGIN) - (_margins.current.bottom! + MIN_DOMAIN_MARGIN);\n\n if (_yAxisType !== YAxisType.StringAxis) {\n _barHeight.current = _getBarHeight(\n calculateAppropriateBarWidth(uniqueY as number[] | Date[], totalHeight, _yAxisPadding),\n );\n domainMargin += _barHeight.current / 2;\n }\n\n return {\n ..._margins.current,\n top: _margins.current.top! + domainMargin,\n bottom: _margins.current.bottom! + domainMargin,\n };\n },\n [_getBarHeight, _points, _yAxisPadding, _yAxisType],\n );\n\n if (!_isChartEmpty()) {\n _barHeight.current = _getBarHeight(DEFAULT_BAR_HEIGHT);\n\n const calloutProps: IModifiedCartesianChartProps['calloutProps'] = {\n isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${_calloutId.current}`,\n target: calloutTarget,\n isBeakVisible: false,\n gapSpace: 15,\n color: calloutColor,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue,\n onDismiss: _closeCallout,\n preventDismissOnLostFocus: true,\n ...props.calloutProps,\n };\n const tickParams: IModifiedCartesianChartProps['tickParams'] = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n return (\n <CartesianChart\n {...props}\n yAxisPadding={_yAxisPadding}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.GanttChart}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={_getLegendData()}\n createYAxis={createYAxisForHorizontalBarChartWithAxis}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxisForHorizontalBarChartWithAxis}\n getMinMaxOfYAxis={findHBCWANumericMinMaxOfY}\n focusZoneDirection={FocusZoneDirection.bidirectional}\n customizedCallout={_getCustomizedCallout()}\n getmargins={_getMargins}\n getYDomainMargins={_getYDomainMargins}\n onChartMouseLeave={_handleChartMouseLeave}\n ref={_cartesianChartRef}\n useUTC={useUTC}\n children={_createBars}\n />\n );\n } else {\n return (\n <div\n id={_emptyChartId.current}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n});\n\nGanttChartBase.displayName = 'GanttChart';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GaugeChart.base.js","sourceRoot":"../src/","sources":["components/GaugeChart/GaugeChart.base.tsx"],"names":[],"mappings":";;;;IAgCA,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,WAAW,GAAG,EAAE,CAAC;IACvB,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,YAAY,GAAG,CAAC,CAAC;IACvB,IAAM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ACJ,CAAC,CAAC,CACE,CACP,CAAC;YACJ,CAAC;QACH,CAAC;QAMH,qBAAC;IAAD,CAAC,AA/pBD,CAAoC,KAAK,CAAC,SAAS,GA+pBlD;IA/pBY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport {\n IGaugeChartProps,\n IGaugeChartSegment,\n IGaugeChartStyleProps,\n IGaugeChartStyles,\n GaugeValueFormat,\n GaugeChartVariant,\n} from './GaugeChart.types';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n Points,\n areArraysEqual,\n formatScientificLimitWidth,\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n pointTypes,\n} from '../../utilities/index';\nimport { ILegend, ILegendContainer, LegendShape, Legends, Shape } from '../Legends/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IYValueHover } from '../../index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { select as d3Select } from 'd3-selection';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst GAUGE_MARGIN = 16;\nconst LABEL_WIDTH = 36;\nconst LABEL_HEIGHT = 16;\nconst LABEL_OFFSET = 4;\nconst TITLE_OFFSET = 11;\nconst EXTRA_NEEDLE_LENGTH = 4;\nexport const ARC_PADDING = 2;\nexport const BREAKPOINTS = [\n { minRadius: 52, arcWidth: 12, fontSize: 20 },\n { minRadius: 70, arcWidth: 16, fontSize: 24 },\n { minRadius: 88, arcWidth: 20, fontSize: 32 },\n { minRadius: 106, arcWidth: 24, fontSize: 32 },\n { minRadius: 124, arcWidth: 28, fontSize: 40 },\n { minRadius: 142, arcWidth: 32, fontSize: 40 },\n];\n\nconst getClassNames = classNamesFunction<IGaugeChartStyleProps, IGaugeChartStyles>();\n\nexport const calcNeedleRotation = (chartValue: number, minValue: number, maxValue: number) => {\n let needleRotation = ((chartValue - minValue) / (maxValue - minValue)) * 180;\n if (needleRotation < 0) {\n needleRotation = 0;\n } else if (needleRotation > 180) {\n needleRotation = 180;\n }\n\n return needleRotation;\n};\n\nexport const getSegmentLabel = (\n segment: IExtendedSegment,\n minValue: number,\n maxValue: number,\n variant?: GaugeChartVariant,\n isAriaLabel: boolean = false,\n) => {\n if (isAriaLabel) {\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.legend}, ${segment.size} out of ${maxValue} or ${((segment.size / maxValue) * 100).toFixed()}%`\n : `${segment.legend}, ${segment.start} to ${segment.end}`;\n }\n\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.size} (${((segment.size / maxValue) * 100).toFixed()}%)`\n : `${segment.start} - ${segment.end}`;\n};\n\nexport const getChartValueLabel = (\n chartValue: number,\n minValue: number,\n maxValue: number,\n chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string),\n forCallout: boolean = false,\n): string => {\n if (forCallout) {\n // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.\n // This helps clarify the actual value and avoid repetition.\n return minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${((chartValue / maxValue) * 100).toFixed()}%`\n : `${chartValue}/${maxValue}`;\n }\n\n return typeof chartValueFormat === 'function'\n ? chartValueFormat([chartValue - minValue, maxValue - minValue])\n : minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${chartValue}/${maxValue}`\n : `${((chartValue / maxValue) * 100).toFixed()}%`;\n};\n\ninterface IYValue extends Omit<IYValueHover, 'y'> {\n y?: string | number;\n}\nexport interface IGaugeChartState {\n hoveredLegend: string;\n selectedLegends: string[];\n focusedElement?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutTarget: any;\n isCalloutVisible: boolean;\n hoverXValue: string | number;\n hoverYValues: IYValue[];\n width: number;\n height: number;\n}\nexport interface IExtendedSegment extends IGaugeChartSegment {\n start: number;\n end: number;\n}\n\nexport class GaugeChartBase extends React.Component<IGaugeChartProps, IGaugeChartState> implements IChart {\n private _classNames: IProcessedStyleSet<IGaugeChartStyles>;\n private _isRTL: boolean;\n private _innerRadius: number;\n private _outerRadius: number;\n private _minValue: number;\n private _maxValue: number;\n private _segments: IExtendedSegment[];\n private _calloutAnchor: string;\n private _rootElem: HTMLDivElement | null;\n private _margins: { left: number; right: number; top: number; bottom: number };\n private _legendsHeight: number;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n constructor(props: IGaugeChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._margins = this._getMargins();\n this._legendsHeight = !props.hideLegend ? 24 : 0;\n\n this.state = {\n hoveredLegend: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n focusedElement: '',\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n width: 140 + this._margins.left + this._margins.right,\n height: 70 + this._margins.top + this._margins.bottom + this._legendsHeight,\n };\n\n this._isRTL = getRTL(props.theme);\n this._calloutAnchor = '';\n this._legendsRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n width: this._rootElem.clientWidth,\n height: this._rootElem.clientHeight,\n });\n }\n }\n\n public componentDidUpdate(prevProps: IGaugeChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n this._margins = this._getMargins();\n this._legendsHeight = !this.props.hideLegend ? 24 : 0;\n\n const width = this.props.width || this.state.width;\n const height = this.props.height || this.state.height;\n\n this._outerRadius = Math.min(\n (width - (this._margins.left + this._margins.right)) / 2,\n height - (this._margins.top + this._margins.bottom + this._legendsHeight),\n );\n\n const { arcWidth, chartValueSize } = this._getStylesBasedOnBreakpoint();\n this._innerRadius = this._outerRadius - arcWidth;\n\n const { arcs } = this._processProps();\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n className: this.props.className,\n chartValueSize,\n });\n\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n <FocusZone direction={FocusZoneDirection.horizontal} className={this._classNames.chartWrapper}>\n <svg\n className={this._classNames.chart}\n role=\"region\"\n aria-label={this._getChartTitle()}\n onMouseLeave={this._handleMouseOut}\n width={width}\n height={height - this._legendsHeight}\n >\n <g transform={`translate(${width / 2}, ${height - (this._margins.bottom + this._legendsHeight)})`}>\n {this.props.chartTitle && (\n <text\n x={0}\n y={-(this._outerRadius + TITLE_OFFSET)}\n textAnchor=\"middle\"\n className={this._classNames.chartTitle}\n aria-hidden={true}\n >\n {this.props.chartTitle}\n </text>\n )}\n {!this.props.hideMinMax && (\n <>\n <text\n x={(this._isRTL ? 1 : -1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"end\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Min value: ${this._minValue}`}\n >\n {formatScientificLimitWidth(this._minValue)}\n </text>\n <text\n x={(this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"start\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Max value: ${this._maxValue}`}\n >\n {formatScientificLimitWidth(this._maxValue)}\n </text>\n </>\n )}\n {arcs.map((arc, index) => {\n const segment = this._segments[arc.segmentIndex];\n\n const clipId = getId('Arc_clip') + `${index}_${arc.startAngle}_${arc.endAngle}`;\n\n const arcClassNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n solidFill: this.props.enableGradient ? 'transparent' : segment.color!,\n gradientFill: `conic-gradient(\n from ${arc.startAngle}rad at 50% 100%,\n ${segment.gradient?.[0]},\n ${segment.gradient?.[1]} ${arc.endAngle - arc.startAngle}rad\n )`,\n opacity: this._legendHighlighted(segment.legend) || this._noLegendHighlighted() ? 1 : 0.1,\n });\n\n return (\n <React.Fragment key={index}>\n <path\n d={arc.d}\n strokeWidth={this.state.focusedElement === segment.legend ? ARC_PADDING : 0}\n className={arcClassNames.segment}\n {...getAccessibleDataObject(\n {\n ariaLabel: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant, true),\n ...segment.accessibilityData,\n },\n 'img',\n true,\n )}\n onFocus={e => this._handleFocus(e, segment.legend)}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, segment.legend)}\n onMouseMove={e => this._handleMouseOver(e, segment.legend)}\n data-is-focusable={this._legendHighlighted(segment.legend) || this._noLegendHighlighted()}\n />\n\n {this.props.enableGradient && (\n <>\n <clipPath id={clipId}>\n <path d={arc.d} />\n </clipPath>\n <foreignObject x=\"-50%\" y=\"-100%\" width=\"100%\" height=\"100%\" clipPath={`url(#${clipId})`}>\n <div className={arcClassNames.gradientSegment} />\n </foreignObject>\n </>\n )}\n </React.Fragment>\n );\n })}\n {this._renderNeedle()}\n <g\n onMouseEnter={e => this._handleMouseOver(e, 'Chart value')}\n onMouseMove={e => this._handleMouseOver(e, 'Chart value')}\n >\n <SVGTooltipText\n content={getChartValueLabel(\n this.props.chartValue,\n this._minValue,\n this._maxValue,\n this.props.chartValueFormat,\n )}\n textProps={{\n x: 0,\n y: 0,\n textAnchor: 'middle',\n className: this._classNames.chartValue,\n 'aria-hidden': 'true',\n }}\n maxWidth={this._innerRadius * 2 - 24}\n wrapContent={this._wrapContent}\n />\n </g>\n {this.props.sublabel && (\n <SVGTooltipText\n content={this.props.sublabel}\n textProps={{\n x: 0,\n y: 4,\n textAnchor: 'middle',\n dominantBaseline: 'hanging',\n className: this._classNames.sublabel,\n }}\n maxWidth={this._innerRadius * 2}\n wrapContent={this._wrapContent}\n />\n )}\n </g>\n </svg>\n </FocusZone>\n {this._renderLegends()}\n {!this.props.hideTooltip && this.state.isCalloutVisible && (\n <Callout\n target={this.state.calloutTarget}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n isBeakVisible={false}\n onDismiss={this._handleCalloutDismiss}\n {...this.props.calloutProps}\n >\n {this._multiValueCallout({\n hoverXValue: this.state.hoverXValue,\n YValueHover: this.state.hoverYValues,\n })}\n </Callout>\n )}\n </div>\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._rootElem;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._rootElem, this._legendsRef.current?.toSVG, this._isRTL, opts);\n };\n\n private _getMargins = () => {\n const { hideMinMax, chartTitle, sublabel } = this.props;\n\n return {\n left: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n right: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n top: (chartTitle ? TITLE_OFFSET + LABEL_HEIGHT : EXTRA_NEEDLE_LENGTH / 2) + GAUGE_MARGIN,\n bottom: (sublabel ? LABEL_OFFSET + LABEL_HEIGHT : 0) + GAUGE_MARGIN,\n };\n };\n\n private _getStylesBasedOnBreakpoint = () => {\n for (let index = BREAKPOINTS.length - 1; index >= 0; index -= 1) {\n if (this._outerRadius >= BREAKPOINTS[index].minRadius) {\n return {\n arcWidth: BREAKPOINTS[index].arcWidth,\n chartValueSize: BREAKPOINTS[index].fontSize,\n };\n }\n }\n return {\n arcWidth: BREAKPOINTS[0].arcWidth,\n chartValueSize: BREAKPOINTS[0].fontSize,\n };\n };\n\n private _processProps = () => {\n const { minValue = 0, maxValue, theme } = this.props;\n\n let total = minValue;\n const segments: IExtendedSegment[] = this.props.segments.map((segment, index) => {\n const size = Math.max(segment.size, 0);\n total += size;\n return {\n legend: segment.legend,\n size,\n color:\n typeof segment.color !== 'undefined'\n ? getColorFromToken(segment.color, theme!.isInverted)\n : getNextColor(index, 0, theme!.isInverted),\n gradient: segment.gradient ?? getNextGradient(index, 0, theme!.isInverted),\n accessibilityData: segment.accessibilityData,\n start: total - size,\n end: total,\n };\n });\n if (typeof maxValue !== 'undefined' && total < maxValue) {\n segments.push({\n legend: 'Unknown',\n size: maxValue - total,\n color: theme!.palette.neutralLight,\n start: total,\n end: maxValue,\n });\n total = maxValue;\n }\n\n const arcGenerator = d3Arc()\n .cornerRadius(this.props.roundCorners ? 3 : 0)\n .padAngle(ARC_PADDING / this._outerRadius)\n .padRadius(this._outerRadius);\n const rtlSafeSegments = this._isRTL ? Array.from(segments).reverse() : segments;\n let prevAngle = -Math.PI / 2;\n const arcs = rtlSafeSegments.map((segment, index) => {\n const endAngle = prevAngle + (segment.size / (total - minValue)) * Math.PI;\n const d = arcGenerator({\n innerRadius: this._innerRadius,\n outerRadius: this._outerRadius,\n startAngle: prevAngle,\n endAngle,\n })!;\n prevAngle = endAngle;\n return {\n d,\n segmentIndex: this._isRTL ? segments.length - 1 - index : index,\n startAngle: prevAngle - (segment.size / (total - minValue)) * Math.PI,\n endAngle,\n };\n });\n\n this._minValue = minValue;\n this._maxValue = total;\n this._segments = segments;\n\n return {\n arcs,\n };\n };\n\n private _renderNeedle = () => {\n const needleRotation = calcNeedleRotation(this.props.chartValue, this._minValue, this._maxValue);\n const rtlSafeNeedleRotation = this._isRTL ? 180 - needleRotation : needleRotation;\n const strokeWidth = 2;\n const halfStrokeWidth = strokeWidth / 2;\n const needleLength = this._outerRadius - this._innerRadius + EXTRA_NEEDLE_LENGTH;\n\n return (\n <g transform={`rotate(${rtlSafeNeedleRotation}, 0, 0)`}>\n <path\n d={`\n M 0,${-halfStrokeWidth - 3}\n L ${-needleLength},${-halfStrokeWidth - 1}\n A ${halfStrokeWidth + 1},${halfStrokeWidth + 1},0,0,0,${-needleLength},${halfStrokeWidth + 1}\n L 0,${halfStrokeWidth + 3}\n A ${halfStrokeWidth + 3},${halfStrokeWidth + 3},0,0,0,0,${-halfStrokeWidth - 3}\n `}\n strokeWidth={strokeWidth}\n className={this._classNames.needle}\n transform={`translate(${-this._innerRadius + EXTRA_NEEDLE_LENGTH / 2})`}\n data-is-focusable={true}\n onFocus={e => this._handleFocus(e, 'Needle')}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, 'Needle')}\n onMouseMove={e => this._handleMouseOver(e, 'Needle')}\n role=\"img\"\n aria-label={\n 'Current value: ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat)\n }\n />\n </g>\n );\n };\n\n private _renderLegends = () => {\n if (this.props.hideLegend) {\n return null;\n }\n\n const legends: ILegend[] = this._segments.map((segment, index) => {\n const color: string = this.props.enableGradient\n ? segment.gradient?.[0] || getNextGradient(index, 0, this.props.theme!.isInverted)[0]\n : segment.color || getNextColor(index, 0, this.props.theme!.isInverted);\n\n return {\n title: segment.legend,\n color,\n hoverAction: () => {\n this.setState({ hoveredLegend: segment.legend });\n },\n onMouseOutAction: () => {\n this.setState({ hoveredLegend: '' });\n },\n };\n });\n\n return (\n <div className={this._classNames.legendsContainer}>\n <Legends\n legends={legends}\n centerLegends\n {...this.props.legendProps}\n // eslint-disable-next-line react/jsx-no-bind\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n </div>\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.hoveredLegend\n ? [this.state.hoveredLegend]\n : [];\n }\n\n private _handleFocus = (focusEvent: React.FocusEvent<SVGElement>, focusedElement: string) => {\n this._showCallout(focusEvent.target, focusedElement, true);\n };\n\n private _handleBlur = () => {\n this._hideCallout(true);\n };\n\n private _handleMouseOver = (mouseEvent: React.MouseEvent<SVGElement>, hoveredElement: string) => {\n this._showCallout(mouseEvent.target, hoveredElement, false);\n };\n\n private _handleMouseOut = () => {\n this._hideCallout(false);\n };\n\n private _handleCalloutDismiss = () => {\n this._hideCallout(false);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _showCallout = (target: any, legend: string, isFocusEvent: boolean) => {\n if (this._calloutAnchor === legend) {\n return;\n }\n\n this._calloutAnchor = legend;\n const hoverXValue: string =\n 'Current value is ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat, true);\n const hoverYValues: IYValue[] = this._segments.map(segment => {\n const yValue: IYValue = {\n legend: segment.legend,\n y: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant),\n color: this.props.enableGradient ? segment.gradient?.[0] : segment.color,\n };\n return yValue;\n });\n this.setState({\n calloutTarget: target,\n /** Show the callout if highlighted arc is hovered/focused and Hide it if unhighlighted arc is hovered/focused */\n isCalloutVisible:\n ['Needle', 'Chart value'].includes(legend) || this._noLegendHighlighted() || this._legendHighlighted(legend),\n hoverXValue,\n hoverYValues,\n ...(isFocusEvent ? { focusedElement: legend } : {}),\n });\n };\n\n private _hideCallout = (isBlurEvent?: boolean) => {\n this._calloutAnchor = '';\n this.setState({\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n ...(isBlurEvent ? { focusedElement: '' } : {}),\n });\n };\n\n private _wrapContent = (content: string, id: string, maxWidth: number) => {\n const textElement = d3Select<SVGTextElement, {}>(`#${id}`);\n textElement.text(content);\n if (!textElement.node()) {\n return false;\n }\n\n let isOverflowing = false;\n let textLength = textElement.node()!.getComputedTextLength();\n while (textLength > maxWidth && content.length > 0) {\n content = content.slice(0, -1);\n textElement.text(content + '...');\n isOverflowing = true;\n textLength = textElement.node()!.getComputedTextLength();\n }\n return isOverflowing;\n };\n\n // TO DO: Write a common functional component for Multi value callout and divide sub count method\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _multiValueCallout = (calloutProps: any) => {\n const yValueHoverSubCountsExists: boolean = this._yValueHoverSubCountsExists(calloutProps.YValueHover);\n return (\n <div className={this._classNames.calloutContentRoot}>\n <div\n className={this._classNames.calloutDateTimeContainer}\n style={yValueHoverSubCountsExists ? { marginBottom: '11px' } : {}}\n >\n <div\n className={this._classNames.calloutContentX}\n {...getAccessibleDataObject(calloutProps!.xAxisCalloutAccessibilityData, 'text', false)}\n >\n {formatToLocaleString(calloutProps!.hoverXValue, this.props.culture) as React.ReactNode}\n </div>\n </div>\n <div\n className={this._classNames.calloutInfoContainer}\n style={yValueHoverSubCountsExists ? { display: 'flex' } : {}}\n >\n {calloutProps!.YValueHover &&\n calloutProps!.YValueHover.map((yValue: IYValueHover, index: number, yValues: IYValueHover[]) => {\n const isLast: boolean = index + 1 === yValues.length;\n const { shouldDrawBorderBottom = false } = yValue;\n return (\n <div\n {...getAccessibleDataObject(yValue.callOutAccessibilityData, 'text', false)}\n key={`callout-content-${index}`}\n style={\n yValueHoverSubCountsExists\n ? {\n display: 'inline-block',\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n : {\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n }\n >\n {this._getCalloutContent(yValue, index, yValueHoverSubCountsExists, isLast)}\n </div>\n );\n })}\n {!!calloutProps.descriptionMessage && (\n <div className={this._classNames.descriptionMessage}>{calloutProps.descriptionMessage}</div>\n )}\n </div>\n </div>\n );\n };\n\n private _yValueHoverSubCountsExists(yValueHover?: IYValueHover[]) {\n if (yValueHover) {\n return yValueHover.some(\n (yValue: {\n legend?: string;\n y?: number;\n color?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n }) => yValue.yAxisCalloutData && typeof yValue.yAxisCalloutData !== 'string',\n );\n }\n return false;\n }\n\n private _getCalloutContent(\n xValue: IYValueHover,\n index: number,\n yValueHoverSubCountsExists: boolean,\n isLast: boolean,\n ): React.ReactNode {\n const marginStyle: React.CSSProperties = isLast ? {} : { marginRight: '16px' };\n const toDrawShape = xValue.index !== undefined && xValue.index !== -1;\n const _classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n lineColor: xValue.color,\n toDrawShape,\n });\n\n const { culture } = this.props;\n const yValue = formatToLocaleString(xValue.y, culture) as React.ReactNode;\n if (!xValue.yAxisCalloutData || typeof xValue.yAxisCalloutData === 'string') {\n return (\n <div style={yValueHoverSubCountsExists ? marginStyle : {}}>\n {yValueHoverSubCountsExists && (\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n )}\n <div id={`${index}_${xValue.y}`} className={_classNames.calloutBlockContainer}>\n {toDrawShape && (\n <Shape\n svgProps={{\n className: _classNames.shapeStyles,\n }}\n pathProps={{ fill: xValue.color }}\n shape={Points[xValue.index! % Object.keys(pointTypes).length] as LegendShape}\n />\n )}\n <div>\n <div className={_classNames.calloutlegendText}> {xValue.legend}</div>\n <div className={_classNames.calloutContentY}>\n {\n formatToLocaleString(\n xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data,\n culture,\n ) as React.ReactNode\n }\n </div>\n </div>\n </div>\n </div>\n );\n } else {\n const subcounts: { [id: string]: number } = xValue.yAxisCalloutData as { [id: string]: number };\n return (\n <div style={marginStyle}>\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n {Object.keys(subcounts).map((subcountName: string) => {\n return (\n <div key={subcountName} className={_classNames.calloutBlockContainer}>\n <div className={_classNames.calloutlegendText}>\n {' '}\n {formatToLocaleString(subcountName, culture) as React.ReactNode}\n </div>\n <div className={_classNames.calloutContentY}>\n {formatToLocaleString(subcounts[subcountName], culture) as React.ReactNode}\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Gauge chart with ${this._segments.length} segments. `;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GaugeChart.base.js","sourceRoot":"../src/","sources":["components/GaugeChart/GaugeChart.base.tsx"],"names":[],"mappings":";;;;IAgCA,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,WAAW,GAAG,EAAE,CAAC;IACvB,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,YAAY,GAAG,CAAC,CAAC;IACvB,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,mBAAmB,GAAG,CAAC,CAAC;IACjB,QAAA,WAAW,GAAG,CAAC,CAAC;IAChB,QAAA,WAAW,GAAG;QACzB,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC7C,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC7C,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC7C,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC9C,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC9C,EAAE,SAAS,EAAE,GAAG,E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ACN,IAAM,WAAS,GAA6B,MAAM,CAAC,gBAA4C,CAAC;gBAChG,OAAO,CACL,6BAAK,KAAK,EAAE,WAAW;oBACrB,6BAAK,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;wBAChE,MAAM,CAAC,MAAO;;wBAAI,MAAM;4BACrB;oBACL,MAAM,CAAC,IAAI,CAAC,WAAS,CAAC,CAAC,GAAG,CAAC,UAAC,YAAoB;wBAC/C,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,CAAC,qBAAqB;4BAClE,6BAAK,SAAS,EAAE,WAAW,CAAC,iBAAiB;gCAC1C,GAAG;gCACH,IAAA,sCAAoB,EAAC,YAAY,EAAE,OAAO,CAAoB,CAC3D;4BACN,6BAAK,SAAS,EAAE,WAAW,CAAC,eAAe,IACxC,IAAA,sCAAoB,EAAC,WAAS,CAAC,YAAY,CAAC,EAAE,OAAO,CAAoB,CACtE,CACF,CACP,CAAC;oBACJ,CAAC,CAAC,CACE,CACP,CAAC;YACJ,CAAC;QACH,CAAC;QAMH,qBAAC;IAAD,CAAC,AA/pBD,CAAoC,KAAK,CAAC,SAAS,GA+pBlD;IA/pBY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport {\n IGaugeChartProps,\n IGaugeChartSegment,\n IGaugeChartStyleProps,\n IGaugeChartStyles,\n GaugeValueFormat,\n GaugeChartVariant,\n} from './GaugeChart.types';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n Points,\n areArraysEqual,\n formatScientificLimitWidth,\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n pointTypes,\n} from '../../utilities/index';\nimport { ILegend, ILegendContainer, LegendShape, Legends, Shape } from '../Legends/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IYValueHover } from '../../index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { select as d3Select } from 'd3-selection';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst GAUGE_MARGIN = 16;\nconst LABEL_WIDTH = 36;\nconst LABEL_HEIGHT = 16;\nconst LABEL_OFFSET = 4;\nconst TITLE_OFFSET = 11;\nconst EXTRA_NEEDLE_LENGTH = 4;\nexport const ARC_PADDING = 2;\nexport const BREAKPOINTS = [\n { minRadius: 52, arcWidth: 12, fontSize: 20 },\n { minRadius: 70, arcWidth: 16, fontSize: 24 },\n { minRadius: 88, arcWidth: 20, fontSize: 32 },\n { minRadius: 106, arcWidth: 24, fontSize: 32 },\n { minRadius: 124, arcWidth: 28, fontSize: 40 },\n { minRadius: 142, arcWidth: 32, fontSize: 40 },\n];\n\nconst getClassNames = classNamesFunction<IGaugeChartStyleProps, IGaugeChartStyles>();\n\nexport const calcNeedleRotation = (chartValue: number, minValue: number, maxValue: number): number => {\n let needleRotation = ((chartValue - minValue) / (maxValue - minValue)) * 180;\n if (needleRotation < 0) {\n needleRotation = 0;\n } else if (needleRotation > 180) {\n needleRotation = 180;\n }\n\n return needleRotation;\n};\n\nexport const getSegmentLabel = (\n segment: IExtendedSegment,\n minValue: number,\n maxValue: number,\n variant?: GaugeChartVariant,\n isAriaLabel: boolean = false,\n): string => {\n if (isAriaLabel) {\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.legend}, ${segment.size} out of ${maxValue} or ${((segment.size / maxValue) * 100).toFixed()}%`\n : `${segment.legend}, ${segment.start} to ${segment.end}`;\n }\n\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.size} (${((segment.size / maxValue) * 100).toFixed()}%)`\n : `${segment.start} - ${segment.end}`;\n};\n\nexport const getChartValueLabel = (\n chartValue: number,\n minValue: number,\n maxValue: number,\n chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string),\n forCallout: boolean = false,\n): string => {\n if (forCallout) {\n // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.\n // This helps clarify the actual value and avoid repetition.\n return minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${((chartValue / maxValue) * 100).toFixed()}%`\n : `${chartValue}/${maxValue}`;\n }\n\n return typeof chartValueFormat === 'function'\n ? chartValueFormat([chartValue - minValue, maxValue - minValue])\n : minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${chartValue}/${maxValue}`\n : `${((chartValue / maxValue) * 100).toFixed()}%`;\n};\n\ninterface IYValue extends Omit<IYValueHover, 'y'> {\n y?: string | number;\n}\nexport interface IGaugeChartState {\n hoveredLegend: string;\n selectedLegends: string[];\n focusedElement?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutTarget: any;\n isCalloutVisible: boolean;\n hoverXValue: string | number;\n hoverYValues: IYValue[];\n width: number;\n height: number;\n}\nexport interface IExtendedSegment extends IGaugeChartSegment {\n start: number;\n end: number;\n}\n\nexport class GaugeChartBase extends React.Component<IGaugeChartProps, IGaugeChartState> implements IChart {\n private _classNames: IProcessedStyleSet<IGaugeChartStyles>;\n private _isRTL: boolean;\n private _innerRadius: number;\n private _outerRadius: number;\n private _minValue: number;\n private _maxValue: number;\n private _segments: IExtendedSegment[];\n private _calloutAnchor: string;\n private _rootElem: HTMLDivElement | null;\n private _margins: { left: number; right: number; top: number; bottom: number };\n private _legendsHeight: number;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n constructor(props: IGaugeChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._margins = this._getMargins();\n this._legendsHeight = !props.hideLegend ? 24 : 0;\n\n this.state = {\n hoveredLegend: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n focusedElement: '',\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n width: 140 + this._margins.left + this._margins.right,\n height: 70 + this._margins.top + this._margins.bottom + this._legendsHeight,\n };\n\n this._isRTL = getRTL(props.theme);\n this._calloutAnchor = '';\n this._legendsRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n width: this._rootElem.clientWidth,\n height: this._rootElem.clientHeight,\n });\n }\n }\n\n public componentDidUpdate(prevProps: IGaugeChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n this._margins = this._getMargins();\n this._legendsHeight = !this.props.hideLegend ? 24 : 0;\n\n const width = this.props.width || this.state.width;\n const height = this.props.height || this.state.height;\n\n this._outerRadius = Math.min(\n (width - (this._margins.left + this._margins.right)) / 2,\n height - (this._margins.top + this._margins.bottom + this._legendsHeight),\n );\n\n const { arcWidth, chartValueSize } = this._getStylesBasedOnBreakpoint();\n this._innerRadius = this._outerRadius - arcWidth;\n\n const { arcs } = this._processProps();\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n className: this.props.className,\n chartValueSize,\n });\n\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n <FocusZone direction={FocusZoneDirection.horizontal} className={this._classNames.chartWrapper}>\n <svg\n className={this._classNames.chart}\n role=\"region\"\n aria-label={this._getChartTitle()}\n onMouseLeave={this._handleMouseOut}\n width={width}\n height={height - this._legendsHeight}\n >\n <g transform={`translate(${width / 2}, ${height - (this._margins.bottom + this._legendsHeight)})`}>\n {this.props.chartTitle && (\n <text\n x={0}\n y={-(this._outerRadius + TITLE_OFFSET)}\n textAnchor=\"middle\"\n className={this._classNames.chartTitle}\n aria-hidden={true}\n >\n {this.props.chartTitle}\n </text>\n )}\n {!this.props.hideMinMax && (\n <>\n <text\n x={(this._isRTL ? 1 : -1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"end\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Min value: ${this._minValue}`}\n >\n {formatScientificLimitWidth(this._minValue)}\n </text>\n <text\n x={(this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"start\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Max value: ${this._maxValue}`}\n >\n {formatScientificLimitWidth(this._maxValue)}\n </text>\n </>\n )}\n {arcs.map((arc, index) => {\n const segment = this._segments[arc.segmentIndex];\n\n const clipId = getId('Arc_clip') + `${index}_${arc.startAngle}_${arc.endAngle}`;\n\n const arcClassNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n solidFill: this.props.enableGradient ? 'transparent' : segment.color!,\n gradientFill: `conic-gradient(\n from ${arc.startAngle}rad at 50% 100%,\n ${segment.gradient?.[0]},\n ${segment.gradient?.[1]} ${arc.endAngle - arc.startAngle}rad\n )`,\n opacity: this._legendHighlighted(segment.legend) || this._noLegendHighlighted() ? 1 : 0.1,\n });\n\n return (\n <React.Fragment key={index}>\n <path\n d={arc.d}\n strokeWidth={this.state.focusedElement === segment.legend ? ARC_PADDING : 0}\n className={arcClassNames.segment}\n {...getAccessibleDataObject(\n {\n ariaLabel: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant, true),\n ...segment.accessibilityData,\n },\n 'img',\n true,\n )}\n onFocus={e => this._handleFocus(e, segment.legend)}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, segment.legend)}\n onMouseMove={e => this._handleMouseOver(e, segment.legend)}\n data-is-focusable={this._legendHighlighted(segment.legend) || this._noLegendHighlighted()}\n />\n\n {this.props.enableGradient && (\n <>\n <clipPath id={clipId}>\n <path d={arc.d} />\n </clipPath>\n <foreignObject x=\"-50%\" y=\"-100%\" width=\"100%\" height=\"100%\" clipPath={`url(#${clipId})`}>\n <div className={arcClassNames.gradientSegment} />\n </foreignObject>\n </>\n )}\n </React.Fragment>\n );\n })}\n {this._renderNeedle()}\n <g\n onMouseEnter={e => this._handleMouseOver(e, 'Chart value')}\n onMouseMove={e => this._handleMouseOver(e, 'Chart value')}\n >\n <SVGTooltipText\n content={getChartValueLabel(\n this.props.chartValue,\n this._minValue,\n this._maxValue,\n this.props.chartValueFormat,\n )}\n textProps={{\n x: 0,\n y: 0,\n textAnchor: 'middle',\n className: this._classNames.chartValue,\n 'aria-hidden': 'true',\n }}\n maxWidth={this._innerRadius * 2 - 24}\n wrapContent={this._wrapContent}\n />\n </g>\n {this.props.sublabel && (\n <SVGTooltipText\n content={this.props.sublabel}\n textProps={{\n x: 0,\n y: 4,\n textAnchor: 'middle',\n dominantBaseline: 'hanging',\n className: this._classNames.sublabel,\n }}\n maxWidth={this._innerRadius * 2}\n wrapContent={this._wrapContent}\n />\n )}\n </g>\n </svg>\n </FocusZone>\n {this._renderLegends()}\n {!this.props.hideTooltip && this.state.isCalloutVisible && (\n <Callout\n target={this.state.calloutTarget}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n isBeakVisible={false}\n onDismiss={this._handleCalloutDismiss}\n {...this.props.calloutProps}\n >\n {this._multiValueCallout({\n hoverXValue: this.state.hoverXValue,\n YValueHover: this.state.hoverYValues,\n })}\n </Callout>\n )}\n </div>\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._rootElem;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._rootElem, this._legendsRef.current?.toSVG, this._isRTL, opts);\n };\n\n private _getMargins = () => {\n const { hideMinMax, chartTitle, sublabel } = this.props;\n\n return {\n left: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n right: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n top: (chartTitle ? TITLE_OFFSET + LABEL_HEIGHT : EXTRA_NEEDLE_LENGTH / 2) + GAUGE_MARGIN,\n bottom: (sublabel ? LABEL_OFFSET + LABEL_HEIGHT : 0) + GAUGE_MARGIN,\n };\n };\n\n private _getStylesBasedOnBreakpoint = () => {\n for (let index = BREAKPOINTS.length - 1; index >= 0; index -= 1) {\n if (this._outerRadius >= BREAKPOINTS[index].minRadius) {\n return {\n arcWidth: BREAKPOINTS[index].arcWidth,\n chartValueSize: BREAKPOINTS[index].fontSize,\n };\n }\n }\n return {\n arcWidth: BREAKPOINTS[0].arcWidth,\n chartValueSize: BREAKPOINTS[0].fontSize,\n };\n };\n\n private _processProps = () => {\n const { minValue = 0, maxValue, theme } = this.props;\n\n let total = minValue;\n const segments: IExtendedSegment[] = this.props.segments.map((segment, index) => {\n const size = Math.max(segment.size, 0);\n total += size;\n return {\n legend: segment.legend,\n size,\n color:\n typeof segment.color !== 'undefined'\n ? getColorFromToken(segment.color, theme!.isInverted)\n : getNextColor(index, 0, theme!.isInverted),\n gradient: segment.gradient ?? getNextGradient(index, 0, theme!.isInverted),\n accessibilityData: segment.accessibilityData,\n start: total - size,\n end: total,\n };\n });\n if (typeof maxValue !== 'undefined' && total < maxValue) {\n segments.push({\n legend: 'Unknown',\n size: maxValue - total,\n color: theme!.palette.neutralLight,\n start: total,\n end: maxValue,\n });\n total = maxValue;\n }\n\n const arcGenerator = d3Arc()\n .cornerRadius(this.props.roundCorners ? 3 : 0)\n .padAngle(ARC_PADDING / this._outerRadius)\n .padRadius(this._outerRadius);\n const rtlSafeSegments = this._isRTL ? Array.from(segments).reverse() : segments;\n let prevAngle = -Math.PI / 2;\n const arcs = rtlSafeSegments.map((segment, index) => {\n const endAngle = prevAngle + (segment.size / (total - minValue)) * Math.PI;\n const d = arcGenerator({\n innerRadius: this._innerRadius,\n outerRadius: this._outerRadius,\n startAngle: prevAngle,\n endAngle,\n })!;\n prevAngle = endAngle;\n return {\n d,\n segmentIndex: this._isRTL ? segments.length - 1 - index : index,\n startAngle: prevAngle - (segment.size / (total - minValue)) * Math.PI,\n endAngle,\n };\n });\n\n this._minValue = minValue;\n this._maxValue = total;\n this._segments = segments;\n\n return {\n arcs,\n };\n };\n\n private _renderNeedle = () => {\n const needleRotation = calcNeedleRotation(this.props.chartValue, this._minValue, this._maxValue);\n const rtlSafeNeedleRotation = this._isRTL ? 180 - needleRotation : needleRotation;\n const strokeWidth = 2;\n const halfStrokeWidth = strokeWidth / 2;\n const needleLength = this._outerRadius - this._innerRadius + EXTRA_NEEDLE_LENGTH;\n\n return (\n <g transform={`rotate(${rtlSafeNeedleRotation}, 0, 0)`}>\n <path\n d={`\n M 0,${-halfStrokeWidth - 3}\n L ${-needleLength},${-halfStrokeWidth - 1}\n A ${halfStrokeWidth + 1},${halfStrokeWidth + 1},0,0,0,${-needleLength},${halfStrokeWidth + 1}\n L 0,${halfStrokeWidth + 3}\n A ${halfStrokeWidth + 3},${halfStrokeWidth + 3},0,0,0,0,${-halfStrokeWidth - 3}\n `}\n strokeWidth={strokeWidth}\n className={this._classNames.needle}\n transform={`translate(${-this._innerRadius + EXTRA_NEEDLE_LENGTH / 2})`}\n data-is-focusable={true}\n onFocus={e => this._handleFocus(e, 'Needle')}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, 'Needle')}\n onMouseMove={e => this._handleMouseOver(e, 'Needle')}\n role=\"img\"\n aria-label={\n 'Current value: ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat)\n }\n />\n </g>\n );\n };\n\n private _renderLegends = () => {\n if (this.props.hideLegend) {\n return null;\n }\n\n const legends: ILegend[] = this._segments.map((segment, index) => {\n const color: string = this.props.enableGradient\n ? segment.gradient?.[0] || getNextGradient(index, 0, this.props.theme!.isInverted)[0]\n : segment.color || getNextColor(index, 0, this.props.theme!.isInverted);\n\n return {\n title: segment.legend,\n color,\n hoverAction: () => {\n this.setState({ hoveredLegend: segment.legend });\n },\n onMouseOutAction: () => {\n this.setState({ hoveredLegend: '' });\n },\n };\n });\n\n return (\n <div className={this._classNames.legendsContainer}>\n <Legends\n legends={legends}\n centerLegends\n {...this.props.legendProps}\n // eslint-disable-next-line react/jsx-no-bind\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n </div>\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.hoveredLegend\n ? [this.state.hoveredLegend]\n : [];\n }\n\n private _handleFocus = (focusEvent: React.FocusEvent<SVGElement>, focusedElement: string) => {\n this._showCallout(focusEvent.target, focusedElement, true);\n };\n\n private _handleBlur = () => {\n this._hideCallout(true);\n };\n\n private _handleMouseOver = (mouseEvent: React.MouseEvent<SVGElement>, hoveredElement: string) => {\n this._showCallout(mouseEvent.target, hoveredElement, false);\n };\n\n private _handleMouseOut = () => {\n this._hideCallout(false);\n };\n\n private _handleCalloutDismiss = () => {\n this._hideCallout(false);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _showCallout = (target: any, legend: string, isFocusEvent: boolean) => {\n if (this._calloutAnchor === legend) {\n return;\n }\n\n this._calloutAnchor = legend;\n const hoverXValue: string =\n 'Current value is ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat, true);\n const hoverYValues: IYValue[] = this._segments.map(segment => {\n const yValue: IYValue = {\n legend: segment.legend,\n y: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant),\n color: this.props.enableGradient ? segment.gradient?.[0] : segment.color,\n };\n return yValue;\n });\n this.setState({\n calloutTarget: target,\n /** Show the callout if highlighted arc is hovered/focused and Hide it if unhighlighted arc is hovered/focused */\n isCalloutVisible:\n ['Needle', 'Chart value'].includes(legend) || this._noLegendHighlighted() || this._legendHighlighted(legend),\n hoverXValue,\n hoverYValues,\n ...(isFocusEvent ? { focusedElement: legend } : {}),\n });\n };\n\n private _hideCallout = (isBlurEvent?: boolean) => {\n this._calloutAnchor = '';\n this.setState({\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n ...(isBlurEvent ? { focusedElement: '' } : {}),\n });\n };\n\n private _wrapContent = (content: string, id: string, maxWidth: number) => {\n const textElement = d3Select<SVGTextElement, {}>(`#${id}`);\n textElement.text(content);\n if (!textElement.node()) {\n return false;\n }\n\n let isOverflowing = false;\n let textLength = textElement.node()!.getComputedTextLength();\n while (textLength > maxWidth && content.length > 0) {\n content = content.slice(0, -1);\n textElement.text(content + '...');\n isOverflowing = true;\n textLength = textElement.node()!.getComputedTextLength();\n }\n return isOverflowing;\n };\n\n // TO DO: Write a common functional component for Multi value callout and divide sub count method\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _multiValueCallout = (calloutProps: any) => {\n const yValueHoverSubCountsExists: boolean = this._yValueHoverSubCountsExists(calloutProps.YValueHover);\n return (\n <div className={this._classNames.calloutContentRoot}>\n <div\n className={this._classNames.calloutDateTimeContainer}\n style={yValueHoverSubCountsExists ? { marginBottom: '11px' } : {}}\n >\n <div\n className={this._classNames.calloutContentX}\n {...getAccessibleDataObject(calloutProps!.xAxisCalloutAccessibilityData, 'text', false)}\n >\n {formatToLocaleString(calloutProps!.hoverXValue, this.props.culture) as React.ReactNode}\n </div>\n </div>\n <div\n className={this._classNames.calloutInfoContainer}\n style={yValueHoverSubCountsExists ? { display: 'flex' } : {}}\n >\n {calloutProps!.YValueHover &&\n calloutProps!.YValueHover.map((yValue: IYValueHover, index: number, yValues: IYValueHover[]) => {\n const isLast: boolean = index + 1 === yValues.length;\n const { shouldDrawBorderBottom = false } = yValue;\n return (\n <div\n {...getAccessibleDataObject(yValue.callOutAccessibilityData, 'text', false)}\n key={`callout-content-${index}`}\n style={\n yValueHoverSubCountsExists\n ? {\n display: 'inline-block',\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n : {\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n }\n >\n {this._getCalloutContent(yValue, index, yValueHoverSubCountsExists, isLast)}\n </div>\n );\n })}\n {!!calloutProps.descriptionMessage && (\n <div className={this._classNames.descriptionMessage}>{calloutProps.descriptionMessage}</div>\n )}\n </div>\n </div>\n );\n };\n\n private _yValueHoverSubCountsExists(yValueHover?: IYValueHover[]) {\n if (yValueHover) {\n return yValueHover.some(\n (yValue: {\n legend?: string;\n y?: number;\n color?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n }) => yValue.yAxisCalloutData && typeof yValue.yAxisCalloutData !== 'string',\n );\n }\n return false;\n }\n\n private _getCalloutContent(\n xValue: IYValueHover,\n index: number,\n yValueHoverSubCountsExists: boolean,\n isLast: boolean,\n ): React.ReactNode {\n const marginStyle: React.CSSProperties = isLast ? {} : { marginRight: '16px' };\n const toDrawShape = xValue.index !== undefined && xValue.index !== -1;\n const _classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n lineColor: xValue.color,\n toDrawShape,\n });\n\n const { culture } = this.props;\n const yValue = formatToLocaleString(xValue.y, culture) as React.ReactNode;\n if (!xValue.yAxisCalloutData || typeof xValue.yAxisCalloutData === 'string') {\n return (\n <div style={yValueHoverSubCountsExists ? marginStyle : {}}>\n {yValueHoverSubCountsExists && (\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n )}\n <div id={`${index}_${xValue.y}`} className={_classNames.calloutBlockContainer}>\n {toDrawShape && (\n <Shape\n svgProps={{\n className: _classNames.shapeStyles,\n }}\n pathProps={{ fill: xValue.color }}\n shape={Points[xValue.index! % Object.keys(pointTypes).length] as LegendShape}\n />\n )}\n <div>\n <div className={_classNames.calloutlegendText}> {xValue.legend}</div>\n <div className={_classNames.calloutContentY}>\n {\n formatToLocaleString(\n xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data,\n culture,\n ) as React.ReactNode\n }\n </div>\n </div>\n </div>\n </div>\n );\n } else {\n const subcounts: { [id: string]: number } = xValue.yAxisCalloutData as { [id: string]: number };\n return (\n <div style={marginStyle}>\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n {Object.keys(subcounts).map((subcountName: string) => {\n return (\n <div key={subcountName} className={_classNames.calloutBlockContainer}>\n <div className={_classNames.calloutlegendText}>\n {' '}\n {formatToLocaleString(subcountName, culture) as React.ReactNode}\n </div>\n <div className={_classNames.calloutContentY}>\n {formatToLocaleString(subcounts[subcountName], culture) as React.ReactNode}\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Gauge chart with ${this._segments.length} segments. `;\n };\n}\n"]}
|