@fluentui/react-charting 5.23.23 → 5.23.25
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 +55 -1
- package/CHANGELOG.md +24 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/AreaChart/AreaChart.base.js +2 -1
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +10 -6
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +2 -1
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js +2 -1
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +2 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +2 -1
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +2 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js +2 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +10 -6
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +2 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js +2 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +2 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +2 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +2 -1
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +2 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +2 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +10 -6
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +2 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +2 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +2 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +2 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +2 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +2 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlySchemaAdapter.js","sourceRoot":"../src/","sources":["components/DeclarativeChart/PlotlySchemaAdapter.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,IAAI,QAAQ,EAAE,GAAG,IAAI,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACxH,OAAO,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,MAAM,IAAI,QAAQ,EA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M;QACL,IAAI,YAAY,CAAC,CAAC,CAAC,EAAE;YACnB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACpC,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;wBAC1B,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,cAAc,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;qBACjE;iBACF;aACF;SACF;aAAM,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE;YAC9B,cAAc,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,cAAc,GAAG,GAAG,CAAC,CAAC;SACnD;KACF;AACH,CAAC","sourcesContent":["/* eslint-disable one-var */\n/* eslint-disable vars-on-top */\n/* eslint-disable no-var */\n/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from 'react';\nimport { bin as d3Bin, extent as d3Extent, sum as d3Sum, min as d3Min, max as d3Max, merge as d3Merge } from 'd3-array';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport { format as d3Format, precisionFixed as d3PrecisionFixed } from 'd3-format';\nimport { IDonutChartProps } from '../DonutChart/index';\nimport {\n IChartDataPoint,\n IChartProps,\n IHorizontalBarChartWithAxisDataPoint,\n ILineChartPoints,\n IVerticalStackedChartProps,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IGroupedVerticalBarChartData,\n IVerticalBarChartDataPoint,\n} from '../../types/IDataPoint';\nimport { ISankeyChartProps } from '../SankeyChart/index';\nimport { IVerticalStackedBarChartProps } from '../VerticalStackedBarChart/index';\nimport { IHorizontalBarChartWithAxisProps } from '../HorizontalBarChartWithAxis/index';\nimport { ILineChartProps } from '../LineChart/index';\nimport { IAreaChartProps } from '../AreaChart/index';\nimport { IHeatMapChartProps } from '../HeatMapChart/index';\nimport { getNextColor } from '../../utilities/colors';\nimport { IGaugeChartProps, IGaugeChartSegment } from '../GaugeChart/index';\nimport { IGroupedVerticalBarChartProps } from '../GroupedVerticalBarChart/index';\nimport { IVerticalBarChartProps } from '../VerticalBarChart/index';\n\nconst isDate = (value: any): boolean => !isNaN(Date.parse(value));\nconst isNumber = (value: any): boolean => !isNaN(parseFloat(value)) && isFinite(value);\nexport const isDateArray = (array: any[]): boolean => isArrayOrTypedArray(array) && array.every(isDate);\nexport const isNumberArray = (array: any[]): boolean => isArrayOrTypedArray(array) && array.every(isNumber);\n\nexport const getColor = (\n legendLabel: string,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): string => {\n if (!colorMap.current.has(legendLabel)) {\n const nextColor = getNextColor(colorMap.current.size + 1, 0, isDarkTheme);\n colorMap.current.set(legendLabel, nextColor);\n return nextColor;\n }\n\n return colorMap.current.get(legendLabel) as string;\n};\n\nexport const transformPlotlyJsonToDonutProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IDonutChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n\n const donutData = firstData.labels?.map((label: string, index: number): IChartDataPoint => {\n const color = getColor(label, colorMap, isDarkTheme);\n return {\n legend: label,\n data: firstData.values?.[index],\n color,\n };\n });\n\n const width: number = layout?.width || 440;\n const height: number = layout?.height || 220;\n const hideLabels = firstData.textinfo ? !['value', 'percent'].includes(firstData.textinfo) : false;\n const donutMarginHorizontal = hideLabels ? 0 : 80;\n const donutMarginVertical = 40 + (hideLabels ? 0 : 40);\n const innerRadius: number = firstData.hole\n ? firstData.hole * (Math.min(width - donutMarginHorizontal, height - donutMarginVertical) / 2)\n : 0;\n\n const styles: IDonutChartProps['styles'] = {\n root: {\n '[class^=\"arcLabel\"]': {\n fontSize: firstData.textfont?.size,\n },\n },\n };\n\n return {\n data: {\n chartTitle: layout?.title,\n chartData: donutData,\n },\n hideLegend: layout?.showlegend === false ? true : false,\n width,\n height,\n innerRadius,\n hideLabels,\n showLabelsInPercent: firstData.textinfo ? firstData.textinfo === 'percent' : true,\n styles,\n };\n};\n\nexport const transformPlotlyJsonToVSBCProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IVerticalStackedBarChartProps => {\n const { data, layout } = jsonObj;\n const mapXToDataPoints: { [key: string]: IVerticalStackedChartProps } = {};\n let yMaxValue = 0;\n\n data.forEach((series: any, index1: number) => {\n series.x?.forEach((x: string | number, index2: number) => {\n if (!mapXToDataPoints[x]) {\n mapXToDataPoints[x] = { xAxisPoint: x, chartData: [], lineData: [] };\n }\n const legend: string = series.name || `Series ${index1 + 1}`;\n if (series.type === 'bar') {\n const color = getColor(legend, colorMap, isDarkTheme);\n mapXToDataPoints[x].chartData.push({\n legend,\n data: series.y?.[index2],\n color,\n });\n } else if (series.type === 'line') {\n const color = getColor(legend, colorMap, isDarkTheme);\n mapXToDataPoints[x].lineData!.push({\n legend,\n y: series.y?.[index2],\n color,\n });\n }\n\n yMaxValue = Math.max(yMaxValue, series.y?.[index2]);\n });\n });\n\n return {\n data: Object.values(mapXToDataPoints),\n chartTitle: layout?.title,\n // width: layout?.width,\n // height: layout?.height,\n barWidth: 'auto',\n yMaxValue,\n };\n};\n\nexport const transformPlotlyJsonToGVBCProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IGroupedVerticalBarChartProps => {\n const { data, layout } = jsonObj;\n const mapXToDataPoints: Record<string, IGroupedVerticalBarChartData> = {};\n\n data.forEach((series: any, index1: number) => {\n series.x?.forEach((x: string | number, index2: number) => {\n if (!mapXToDataPoints[x]) {\n mapXToDataPoints[x] = { name: x.toString(), series: [] };\n }\n if (series.type === 'bar') {\n const legend: string = series.name || `Series ${index1 + 1}`;\n const color = getColor(legend, colorMap, isDarkTheme);\n\n mapXToDataPoints[x].series.push({\n key: legend,\n data: series.y?.[index2],\n color,\n legend,\n });\n }\n });\n });\n\n return {\n data: Object.values(mapXToDataPoints),\n chartTitle: layout?.title,\n // width: layout?.width,\n // height: layout?.height,\n barwidth: 'auto',\n };\n};\n\nexport const transformPlotlyJsonToVBCProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IVerticalBarChartProps => {\n const { data, layout } = jsonObj;\n const vbcData: IVerticalBarChartDataPoint[] = [];\n\n data.forEach((series: any, index: number) => {\n if (!series.x) {\n return;\n }\n\n const scale = d3ScaleLinear()\n .domain(d3Extent<number>(series.x) as [number, number])\n .nice();\n let [xMin, xMax] = scale.domain();\n\n xMin = typeof series.xbins?.start === 'number' ? series.xbins.start : xMin;\n xMax = typeof series.xbins?.end === 'number' ? series.xbins.end : xMax;\n\n const bin = d3Bin().domain([xMin, xMax]);\n\n if (typeof series.xbins?.size === 'number') {\n const thresholds: number[] = [];\n let th = xMin;\n const precision = d3PrecisionFixed(series.xbins.size);\n const format = d3Format(`.${precision}f`);\n\n while (th < xMax + series.xbins.size) {\n thresholds.push(parseFloat(format(th)));\n th += series.xbins.size;\n }\n\n xMin = thresholds[0];\n xMax = thresholds[thresholds.length - 1];\n bin.domain([xMin, xMax]).thresholds(thresholds);\n }\n\n const buckets = bin(series.x);\n // If the start or end of xbins is specified, then the number of datapoints may become less than x.length\n const totalDataPoints = d3Merge(buckets).length;\n\n buckets.forEach(bucket => {\n const legend = series.name || `Series ${index + 1}`;\n const color = getColor(legend, colorMap, isDarkTheme);\n let y = bucket.length;\n\n if (series.histnorm === 'percent') {\n y = (bucket.length / totalDataPoints) * 100;\n } else if (series.histnorm === 'probability') {\n y = bucket.length / totalDataPoints;\n } else if (series.histnorm === 'density') {\n y = bucket.x0 === bucket.x1 ? 0 : bucket.length / (bucket.x1! - bucket.x0!);\n } else if (series.histnorm === 'probability density') {\n y = bucket.x0 === bucket.x1 ? 0 : bucket.length / (totalDataPoints * (bucket.x1! - bucket.x0!));\n } else if (series.histfunc === 'sum') {\n y = d3Sum(bucket);\n } else if (series.histfunc === 'avg') {\n y = bucket.length === 0 ? 0 : d3Sum(bucket) / bucket.length;\n } else if (series.histfunc === 'min') {\n y = d3Min(bucket)!;\n } else if (series.histfunc === 'max') {\n y = d3Max(bucket)!;\n }\n\n vbcData.push({\n x: (bucket.x1! + bucket.x0!) / 2,\n y,\n legend,\n color,\n xAxisCalloutData: `[${bucket.x0} - ${bucket.x1})`,\n });\n });\n });\n\n return {\n data: vbcData,\n chartTitle: layout?.title,\n // width: layout?.width,\n // height: layout?.height,\n hideLegend: true,\n barWidth: 24,\n supportNegativeData: true,\n };\n};\n\nexport const transformPlotlyJsonToScatterChartProps = (\n jsonObj: any,\n isAreaChart: boolean,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): ILineChartProps | IAreaChartProps => {\n const { data, layout } = jsonObj;\n\n const chartData: ILineChartPoints[] = data.map((series: any, index: number) => {\n const xValues = series.x;\n const isString = typeof xValues[0] === 'string';\n const isXDate = isDateArray(xValues);\n const isXNumber = isNumberArray(xValues);\n const legend = series.name || `Series ${index + 1}`;\n const lineColor = getColor(legend, colorMap, isDarkTheme);\n\n return {\n legend,\n data: xValues.map((x: string | number, i: number) => ({\n x: isString ? (isXDate ? new Date(x) : isXNumber ? parseFloat(x as string) : x) : x,\n y: series.y[i],\n })),\n color: lineColor,\n };\n });\n\n const chartProps: IChartProps = {\n chartTitle: layout.title || '',\n lineChartData: chartData,\n };\n\n if (isAreaChart) {\n return {\n data: chartProps,\n supportNegativeData: true,\n } as IAreaChartProps;\n } else {\n return {\n data: chartProps,\n supportNegativeData: true,\n } as ILineChartProps;\n }\n};\n\nexport const transformPlotlyJsonToHorizontalBarWithAxisProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IHorizontalBarChartWithAxisProps => {\n const { data, layout } = jsonObj;\n\n const chartData: IHorizontalBarChartWithAxisDataPoint[] = data\n .map((series: any, index: number) => {\n return series.y.map((yValue: string, i: number) => {\n const color = getColor(yValue, colorMap, isDarkTheme);\n return {\n x: series.x[i],\n y: yValue,\n legend: yValue,\n color,\n };\n });\n })\n .flat();\n\n const chartHeight = layout.height || 350;\n const margin = layout.margin?.l || 0;\n const padding = layout.margin?.pad || 0;\n const availableHeight = chartHeight - margin - padding;\n const numberOfBars = data[0].y.length;\n const gapFactor = 0.5;\n const barHeight = availableHeight / (numberOfBars * (1 + gapFactor));\n\n return {\n data: chartData,\n chartTitle: layout.title || '',\n barHeight,\n showYAxisLables: true,\n styles: {\n root: {\n height: chartHeight,\n width: layout.width || 600,\n },\n },\n };\n};\n\nexport const transformPlotlyJsonToHeatmapProps = (jsonObj: any): IHeatMapChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n const heatmapDataPoints: IHeatMapChartDataPoint[] = [];\n let zMin = Number.POSITIVE_INFINITY;\n let zMax = Number.NEGATIVE_INFINITY;\n\n firstData.x?.forEach((xVal: any, xIdx: number) => {\n firstData.y?.forEach((yVal: any, yIdx: number) => {\n const zVal = firstData.z?.[yIdx]?.[xIdx];\n\n heatmapDataPoints.push({\n x: layout.xaxis?.type === 'date' ? new Date(xVal) : xVal,\n y: layout.yaxis?.type === 'date' ? new Date(yVal) : yVal,\n value: zVal,\n });\n\n zMin = Math.min(zMin, zVal);\n zMax = Math.max(zMax, zVal);\n });\n });\n const heatmapData: IHeatMapChartData = {\n legend: firstData.name || '',\n data: heatmapDataPoints,\n value: 0,\n };\n\n // Convert normalized values to actual values\n const domainValuesForColorScale: number[] = firstData.colorscale?.map((arr: any) => arr[0] * (zMax - zMin) + zMin);\n const rangeValuesForColorScale: string[] = firstData.colorscale?.map((arr: any) => arr[1]);\n\n return {\n data: [heatmapData],\n domainValuesForColorScale,\n rangeValuesForColorScale,\n hideLegend: true,\n };\n};\n\nexport const transformPlotlyJsonToSankeyProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): ISankeyChartProps => {\n const { data, layout } = jsonObj;\n const { link, node } = data[0];\n const validLinks = link.value\n .map((val: number, index: number) => ({\n value: val,\n source: link.source[index],\n target: link.target[index],\n }))\n // eslint-disable-next-line @typescript-eslint/no-shadow\n //@ts-expect-error Dynamic link object. Ignore for now.\n .filter(x => x.source !== x.target); // Filter out self-references (circular links)\n\n const sankeyChartData = {\n nodes: node.label.map((label: string, index: number) => {\n const color = getColor(label, colorMap, isDarkTheme);\n\n return {\n nodeId: index,\n name: label,\n color,\n };\n }),\n links: validLinks.map((validLink: any, index: number) => {\n return {\n ...validLink,\n };\n }),\n };\n\n const width: number = layout?.width || 440;\n const height: number = layout?.height || 220;\n const styles: ISankeyChartProps['styles'] = {\n root: {\n fontSize: layout.font?.size,\n },\n };\n const shouldResize: number = width + height;\n return {\n data: {\n chartTitle: layout?.title,\n SankeyChartData: sankeyChartData,\n },\n width,\n height,\n styles,\n shouldResize,\n enableReflow: true,\n };\n};\n\nexport const transformPlotlyJsonToGaugeProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IGaugeChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n\n const segments = firstData.gauge?.steps?.map((step: any, index: number): IGaugeChartSegment => {\n const legend = step.name || `Segment ${index + 1}`;\n const color = getColor(legend, colorMap, isDarkTheme);\n return {\n legend,\n size: step.range?.[1] - step.range?.[0],\n color,\n };\n });\n\n let sublabel: string | undefined;\n let sublabelColor: string | undefined;\n if (typeof firstData.delta?.reference === 'number') {\n const diff = firstData.value - firstData.delta.reference;\n if (diff >= 0) {\n sublabel = `\\u25B2 ${diff}`;\n const color = getColor(firstData.delta.increasing?.color || '', colorMap, isDarkTheme);\n sublabelColor = color;\n } else {\n sublabel = `\\u25BC ${Math.abs(diff)}`;\n const color = getColor(firstData.delta.decreasing?.color || '', colorMap, isDarkTheme);\n sublabelColor = color;\n }\n }\n\n const styles: IGaugeChartProps['styles'] = {\n sublabel: {\n fill: sublabelColor,\n },\n };\n\n return {\n segments,\n chartValue: firstData.value,\n chartTitle: firstData.title?.text,\n sublabel,\n // range values can be null\n minValue: firstData.gauge?.axis?.range?.[0] ?? undefined,\n maxValue: firstData.gauge?.axis?.range?.[1] ?? undefined,\n chartValueFormat: () => firstData.value,\n width: layout?.width,\n height: layout?.height,\n hideLegend: true,\n styles,\n };\n};\n\nfunction isTypedArray(a: any) {\n return ArrayBuffer.isView(a) && !(a instanceof DataView);\n}\n\nfunction isArrayOrTypedArray(a: any) {\n return Array.isArray(a) || isTypedArray(a);\n}\n\nfunction isPlainObject(obj: any) {\n if (window && window.process && window.process.versions) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n }\n\n return (\n Object.prototype.toString.call(obj) === '[object Object]' &&\n Object.getPrototypeOf(obj).hasOwnProperty('hasOwnProperty')\n );\n}\n\nvar arrayAttributes: any[] = [];\nvar stack: any[] = [];\nvar isArrayStack: any[] = [];\nvar baseContainer: any, baseAttrName: any;\n/**\n * Interate iteratively through the trace object and find all the array attributes.\n * 1 trace record = 1 series of data\n * @param trace\n */\nexport function findArrayAttributes(trace: any) {\n // Init basecontainer and baseAttrName\n crawlIntoTrace(baseContainer, 0, '');\n for (const attribute of arrayAttributes) {\n console.log(attribute);\n }\n}\n\nfunction crawlIntoTrace(container: any, i: number, astrPartial: any) {\n var item = container[stack[i]];\n var newAstrPartial = astrPartial + stack[i];\n if (i === stack.length - 1) {\n if (isArrayOrTypedArray(item)) {\n arrayAttributes.push(baseAttrName + newAstrPartial);\n }\n } else {\n if (isArrayStack[i]) {\n if (Array.isArray(item)) {\n for (var j = 0; j < item.length; j++) {\n if (isPlainObject(item[j])) {\n crawlIntoTrace(item[j], i + 1, newAstrPartial + '[' + j + '].');\n }\n }\n }\n } else if (isPlainObject(item)) {\n crawlIntoTrace(item, i + 1, newAstrPartial + '.');\n }\n }\n}\n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int-disable one-var */\n/* eslint-disable vars-on-top */\n/* eslint-disable no-var */\n/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from 'react';\nimport { bin as d3Bin, extent as d3Extent, sum as d3Sum, min as d3Min, max as d3Max, merge as d3Merge } from 'd3-array';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport { format as d3Format, precisionFixed as d3PrecisionFixed } from 'd3-format';\nimport { IDonutChartProps } from '../DonutChart/index';\nimport {\n IChartDataPoint,\n IChartProps,\n IHorizontalBarChartWithAxisDataPoint,\n ILineChartPoints,\n IVerticalStackedChartProps,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IGroupedVerticalBarChartData,\n IVerticalBarChartDataPoint,\n} from '../../types/IDataPoint';\nimport { ISankeyChartProps } from '../SankeyChart/index';\nimport { IVerticalStackedBarChartProps } from '../VerticalStackedBarChart/index';\nimport { IHorizontalBarChartWithAxisProps } from '../HorizontalBarChartWithAxis/index';\nimport { ILineChartProps } from '../LineChart/index';\nimport { IAreaChartProps } from '../AreaChart/index';\nimport { IHeatMapChartProps } from '../HeatMapChart/index';\nimport { getNextColor } from '../../utilities/colors';\nimport { IGaugeChartProps, IGaugeChartSegment } from '../GaugeChart/index';\nimport { IGroupedVerticalBarChartProps } from '../GroupedVerticalBarChart/index';\nimport { IVerticalBarChartProps } from '../VerticalBarChart/index';\n\nconst isDate = (value: any): boolean => !isNaN(Date.parse(value));\nconst isNumber = (value: any): boolean => !isNaN(parseFloat(value)) && isFinite(value);\nexport const isDateArray = (array: any[]): boolean => isArrayOrTypedArray(array) && array.every(isDate);\nexport const isNumberArray = (array: any[]): boolean => isArrayOrTypedArray(array) && array.every(isNumber);\n\nexport const getColor = (\n legendLabel: string,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): string => {\n if (!colorMap.current.has(legendLabel)) {\n const nextColor = getNextColor(colorMap.current.size + 1, 0, isDarkTheme);\n colorMap.current.set(legendLabel, nextColor);\n return nextColor;\n }\n\n return colorMap.current.get(legendLabel) as string;\n};\n\nexport const transformPlotlyJsonToDonutProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IDonutChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n\n const donutData = firstData.labels?.map((label: string, index: number): IChartDataPoint => {\n const color = getColor(label, colorMap, isDarkTheme);\n return {\n legend: label,\n data: firstData.values?.[index],\n color,\n };\n });\n\n const width: number = layout?.width || 440;\n const height: number = layout?.height || 220;\n const hideLabels = firstData.textinfo ? !['value', 'percent'].includes(firstData.textinfo) : false;\n const donutMarginHorizontal = hideLabels ? 0 : 80;\n const donutMarginVertical = 40 + (hideLabels ? 0 : 40);\n const innerRadius: number = firstData.hole\n ? firstData.hole * (Math.min(width - donutMarginHorizontal, height - donutMarginVertical) / 2)\n : 0;\n\n const styles: IDonutChartProps['styles'] = {\n root: {\n '[class^=\"arcLabel\"]': {\n fontSize: firstData.textfont?.size,\n },\n },\n };\n\n return {\n data: {\n chartTitle: layout?.title,\n chartData: donutData,\n },\n hideLegend: layout?.showlegend === false ? true : false,\n width,\n height,\n innerRadius,\n hideLabels,\n showLabelsInPercent: firstData.textinfo ? firstData.textinfo === 'percent' : true,\n styles,\n };\n};\n\nexport const transformPlotlyJsonToVSBCProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IVerticalStackedBarChartProps => {\n const { data, layout } = jsonObj;\n const mapXToDataPoints: { [key: string]: IVerticalStackedChartProps } = {};\n let yMaxValue = 0;\n\n data.forEach((series: any, index1: number) => {\n series.x?.forEach((x: string | number, index2: number) => {\n if (!mapXToDataPoints[x]) {\n mapXToDataPoints[x] = { xAxisPoint: x, chartData: [], lineData: [] };\n }\n const legend: string = series.name || `Series ${index1 + 1}`;\n if (series.type === 'bar') {\n const color = getColor(legend, colorMap, isDarkTheme);\n mapXToDataPoints[x].chartData.push({\n legend,\n data: series.y?.[index2],\n color,\n });\n } else if (series.type === 'line') {\n const color = getColor(legend, colorMap, isDarkTheme);\n mapXToDataPoints[x].lineData!.push({\n legend,\n y: series.y?.[index2],\n color,\n });\n }\n\n yMaxValue = Math.max(yMaxValue, series.y?.[index2]);\n });\n });\n\n return {\n data: Object.values(mapXToDataPoints),\n chartTitle: layout?.title,\n // width: layout?.width,\n // height: layout?.height,\n barWidth: 'auto',\n yMaxValue,\n };\n};\n\nexport const transformPlotlyJsonToGVBCProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IGroupedVerticalBarChartProps => {\n const { data, layout } = jsonObj;\n const mapXToDataPoints: Record<string, IGroupedVerticalBarChartData> = {};\n\n data.forEach((series: any, index1: number) => {\n series.x?.forEach((x: string | number, index2: number) => {\n if (!mapXToDataPoints[x]) {\n mapXToDataPoints[x] = { name: x.toString(), series: [] };\n }\n if (series.type === 'bar') {\n const legend: string = series.name || `Series ${index1 + 1}`;\n const color = getColor(legend, colorMap, isDarkTheme);\n\n mapXToDataPoints[x].series.push({\n key: legend,\n data: series.y?.[index2],\n color,\n legend,\n });\n }\n });\n });\n\n return {\n data: Object.values(mapXToDataPoints),\n chartTitle: layout?.title,\n // width: layout?.width,\n // height: layout?.height,\n barwidth: 'auto',\n };\n};\n\nexport const transformPlotlyJsonToVBCProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IVerticalBarChartProps => {\n const { data, layout } = jsonObj;\n const vbcData: IVerticalBarChartDataPoint[] = [];\n\n data.forEach((series: any, index: number) => {\n if (!series.x) {\n return;\n }\n\n const scale = d3ScaleLinear()\n .domain(d3Extent<number>(series.x) as [number, number])\n .nice();\n let [xMin, xMax] = scale.domain();\n\n xMin = typeof series.xbins?.start === 'number' ? series.xbins.start : xMin;\n xMax = typeof series.xbins?.end === 'number' ? series.xbins.end : xMax;\n\n const bin = d3Bin().domain([xMin, xMax]);\n\n if (typeof series.xbins?.size === 'number') {\n const thresholds: number[] = [];\n let th = xMin;\n const precision = d3PrecisionFixed(series.xbins.size);\n const format = d3Format(`.${precision}f`);\n\n while (th < xMax + series.xbins.size) {\n thresholds.push(parseFloat(format(th)));\n th += series.xbins.size;\n }\n\n xMin = thresholds[0];\n xMax = thresholds[thresholds.length - 1];\n bin.domain([xMin, xMax]).thresholds(thresholds);\n }\n\n const buckets = bin(series.x);\n // If the start or end of xbins is specified, then the number of datapoints may become less than x.length\n const totalDataPoints = d3Merge(buckets).length;\n\n buckets.forEach(bucket => {\n const legend = series.name || `Series ${index + 1}`;\n const color = getColor(legend, colorMap, isDarkTheme);\n let y = bucket.length;\n\n if (series.histnorm === 'percent') {\n y = (bucket.length / totalDataPoints) * 100;\n } else if (series.histnorm === 'probability') {\n y = bucket.length / totalDataPoints;\n } else if (series.histnorm === 'density') {\n y = bucket.x0 === bucket.x1 ? 0 : bucket.length / (bucket.x1! - bucket.x0!);\n } else if (series.histnorm === 'probability density') {\n y = bucket.x0 === bucket.x1 ? 0 : bucket.length / (totalDataPoints * (bucket.x1! - bucket.x0!));\n } else if (series.histfunc === 'sum') {\n y = d3Sum(bucket);\n } else if (series.histfunc === 'avg') {\n y = bucket.length === 0 ? 0 : d3Sum(bucket) / bucket.length;\n } else if (series.histfunc === 'min') {\n y = d3Min(bucket)!;\n } else if (series.histfunc === 'max') {\n y = d3Max(bucket)!;\n }\n\n vbcData.push({\n x: (bucket.x1! + bucket.x0!) / 2,\n y,\n legend,\n color,\n xAxisCalloutData: `[${bucket.x0} - ${bucket.x1})`,\n });\n });\n });\n\n return {\n data: vbcData,\n chartTitle: layout?.title,\n // width: layout?.width,\n // height: layout?.height,\n hideLegend: true,\n barWidth: 24,\n supportNegativeData: true,\n };\n};\n\nexport const transformPlotlyJsonToScatterChartProps = (\n jsonObj: any,\n isAreaChart: boolean,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): ILineChartProps | IAreaChartProps => {\n const { data, layout } = jsonObj;\n\n const chartData: ILineChartPoints[] = data.map((series: any, index: number) => {\n const xValues = series.x;\n const isString = typeof xValues[0] === 'string';\n const isXDate = isDateArray(xValues);\n const isXNumber = isNumberArray(xValues);\n const legend = series.name || `Series ${index + 1}`;\n const lineColor = getColor(legend, colorMap, isDarkTheme);\n\n return {\n legend,\n data: xValues.map((x: string | number, i: number) => ({\n x: isString ? (isXDate ? new Date(x) : isXNumber ? parseFloat(x as string) : x) : x,\n y: series.y[i],\n })),\n color: lineColor,\n };\n });\n\n const chartProps: IChartProps = {\n chartTitle: layout.title || '',\n lineChartData: chartData,\n };\n\n if (isAreaChart) {\n return {\n data: chartProps,\n supportNegativeData: true,\n } as IAreaChartProps;\n } else {\n return {\n data: chartProps,\n supportNegativeData: true,\n } as ILineChartProps;\n }\n};\n\nexport const transformPlotlyJsonToHorizontalBarWithAxisProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IHorizontalBarChartWithAxisProps => {\n const { data, layout } = jsonObj;\n\n const chartData: IHorizontalBarChartWithAxisDataPoint[] = data\n .map((series: any, index: number) => {\n return series.y.map((yValue: string, i: number) => {\n const color = getColor(yValue, colorMap, isDarkTheme);\n return {\n x: series.x[i],\n y: yValue,\n legend: yValue,\n color,\n };\n });\n })\n .flat();\n\n const chartHeight = layout.height || 450;\n const margin = layout.margin?.l || 0;\n const padding = layout.margin?.pad || 0;\n const availableHeight = chartHeight - margin - padding;\n const numberOfBars = data[0].y.length;\n const scalingFactor = 0.01;\n const gapFactor = 1 / (1 + scalingFactor * numberOfBars);\n const barHeight = availableHeight / (numberOfBars * (1 + gapFactor));\n\n return {\n data: chartData,\n chartTitle: layout.title || '',\n barHeight,\n showYAxisLables: true,\n styles: {\n root: {\n height: chartHeight,\n width: layout.width || 600,\n },\n },\n };\n};\n\nexport const transformPlotlyJsonToHeatmapProps = (jsonObj: any): IHeatMapChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n const heatmapDataPoints: IHeatMapChartDataPoint[] = [];\n let zMin = Number.POSITIVE_INFINITY;\n let zMax = Number.NEGATIVE_INFINITY;\n\n firstData.x?.forEach((xVal: any, xIdx: number) => {\n firstData.y?.forEach((yVal: any, yIdx: number) => {\n const zVal = firstData.z?.[yIdx]?.[xIdx];\n\n heatmapDataPoints.push({\n x: layout.xaxis?.type === 'date' ? new Date(xVal) : xVal,\n y: layout.yaxis?.type === 'date' ? new Date(yVal) : yVal,\n value: zVal,\n });\n\n zMin = Math.min(zMin, zVal);\n zMax = Math.max(zMax, zVal);\n });\n });\n const heatmapData: IHeatMapChartData = {\n legend: firstData.name || '',\n data: heatmapDataPoints,\n value: 0,\n };\n\n // Convert normalized values to actual values\n const domainValuesForColorScale: number[] = firstData.colorscale\n ? firstData.colorscale.map((arr: any) => arr[0] * (zMax - zMin) + zMin)\n : [];\n const rangeValuesForColorScale: string[] = firstData.colorscale ? firstData.colorscale.map((arr: any) => arr[1]) : [];\n\n return {\n data: [heatmapData],\n domainValuesForColorScale,\n rangeValuesForColorScale,\n hideLegend: true,\n };\n};\n\nexport const transformPlotlyJsonToSankeyProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): ISankeyChartProps => {\n const { data, layout } = jsonObj;\n const { link, node } = data[0];\n const validLinks = link.value\n .map((val: number, index: number) => ({\n value: val,\n source: link.source[index],\n target: link.target[index],\n }))\n // eslint-disable-next-line @typescript-eslint/no-shadow\n //@ts-expect-error Dynamic link object. Ignore for now.\n // Filter out negative nodes, unequal nodes and self-references (circular links)\n .filter(x => x.source > 0 && x.target > 0 && x.source !== x.target);\n\n const sankeyChartData = {\n nodes: node.label.map((label: string, index: number) => {\n const color = getColor(label, colorMap, isDarkTheme);\n\n return {\n nodeId: index,\n name: label,\n color,\n };\n }),\n links: validLinks.map((validLink: any, index: number) => {\n return {\n ...validLink,\n };\n }),\n };\n\n const width: number = layout?.width || 440;\n const height: number = layout?.height || 220;\n const styles: ISankeyChartProps['styles'] = {\n root: {\n fontSize: layout.font?.size,\n },\n };\n const shouldResize: number = width + height;\n return {\n data: {\n chartTitle: layout?.title,\n SankeyChartData: sankeyChartData,\n },\n width,\n height,\n styles,\n shouldResize,\n enableReflow: true,\n };\n};\n\nexport const transformPlotlyJsonToGaugeProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): IGaugeChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n\n const segments = firstData.gauge?.steps?.map((step: any, index: number): IGaugeChartSegment => {\n const legend = step.name || `Segment ${index + 1}`;\n const color = getColor(legend, colorMap, isDarkTheme);\n return {\n legend,\n size: step.range?.[1] - step.range?.[0],\n color,\n };\n });\n\n let sublabel: string | undefined;\n let sublabelColor: string | undefined;\n if (typeof firstData.delta?.reference === 'number') {\n const diff = firstData.value - firstData.delta.reference;\n if (diff >= 0) {\n sublabel = `\\u25B2 ${diff}`;\n const color = getColor(firstData.delta.increasing?.color || '', colorMap, isDarkTheme);\n sublabelColor = color;\n } else {\n sublabel = `\\u25BC ${Math.abs(diff)}`;\n const color = getColor(firstData.delta.decreasing?.color || '', colorMap, isDarkTheme);\n sublabelColor = color;\n }\n }\n\n const styles: IGaugeChartProps['styles'] = {\n sublabel: {\n fill: sublabelColor,\n },\n };\n\n return {\n segments,\n chartValue: firstData.value,\n chartTitle: firstData.title?.text,\n sublabel,\n // range values can be null\n minValue: firstData.gauge?.axis?.range?.[0] ?? undefined,\n maxValue: firstData.gauge?.axis?.range?.[1] ?? undefined,\n chartValueFormat: () => firstData.value,\n width: layout?.width,\n height: layout?.height,\n hideLegend: true,\n styles,\n };\n};\n\nfunction isTypedArray(a: any) {\n return ArrayBuffer.isView(a) && !(a instanceof DataView);\n}\n\nfunction isArrayOrTypedArray(a: any) {\n return Array.isArray(a) || isTypedArray(a);\n}\n\nfunction isPlainObject(obj: any) {\n if (window && window.process && window.process.versions) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n }\n\n return (\n Object.prototype.toString.call(obj) === '[object Object]' &&\n Object.getPrototypeOf(obj).hasOwnProperty('hasOwnProperty')\n );\n}\n\nvar arrayAttributes: any[] = [];\nvar stack: any[] = [];\nvar isArrayStack: any[] = [];\nvar baseContainer: any, baseAttrName: any;\n/**\n * Interate iteratively through the trace object and find all the array attributes.\n * 1 trace record = 1 series of data\n * @param trace\n */\nexport function findArrayAttributes(trace: any) {\n // Init basecontainer and baseAttrName\n crawlIntoTrace(baseContainer, 0, '');\n for (const attribute of arrayAttributes) {\n console.log(attribute);\n }\n}\n\nfunction crawlIntoTrace(container: any, i: number, astrPartial: any) {\n var item = container[stack[i]];\n var newAstrPartial = astrPartial + stack[i];\n if (i === stack.length - 1) {\n if (isArrayOrTypedArray(item)) {\n arrayAttributes.push(baseAttrName + newAstrPartial);\n }\n } else {\n if (isArrayStack[i]) {\n if (Array.isArray(item)) {\n for (var j = 0; j < item.length; j++) {\n if (isPlainObject(item[j])) {\n crawlIntoTrace(item[j], i + 1, newAstrPartial + '[' + j + '].');\n }\n }\n }\n } else if (isPlainObject(item)) {\n crawlIntoTrace(item, i + 1, newAstrPartial + '.');\n }\n }\n}\n"]}
|
|
@@ -12,6 +12,7 @@ var LEGEND_CONTAINER_HEIGHT = 40;
|
|
|
12
12
|
var DonutChartBase = /** @class */ (function (_super) {
|
|
13
13
|
__extends(DonutChartBase, _super);
|
|
14
14
|
function DonutChartBase(props) {
|
|
15
|
+
var _a, _b;
|
|
15
16
|
var _this = _super.call(this, props) || this;
|
|
16
17
|
_this._closeCallout = function () {
|
|
17
18
|
_this.setState({
|
|
@@ -89,7 +90,7 @@ var DonutChartBase = /** @class */ (function (_super) {
|
|
|
89
90
|
color: '',
|
|
90
91
|
xCalloutValue: '',
|
|
91
92
|
yCalloutValue: '',
|
|
92
|
-
selectedLegend: '',
|
|
93
|
+
selectedLegend: (_b = (_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegend) !== null && _b !== void 0 ? _b : '',
|
|
93
94
|
focusedArcId: '',
|
|
94
95
|
};
|
|
95
96
|
_this._hoverCallback = _this._hoverCallback.bind(_this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DonutChart.base.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAG1E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAuB,cAAc,EAAW,OAAO,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,IAAM,aAAa,GAAG,kBAAkB,EAA4C,CAAC;AACrF,IAAM,uBAAuB,GAAG,EAAE,CAAC;AAkBnC;IAAoC,kCAAmD;IAgCrF,wBAAY,KAAuB;QAAnC,YACE,kBAAM,KAAK,CAAC,SAoBb;QA0GO,mBAAa,GAAG;YACtB,KAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS,EAAE,KAAK;aACjB,CAAC,CAAC;QACL,CAAC,CAAC;QA8EM,oBAAc,GAAG,UAAC,IAAqB,EAAE,EAAU,EAAE,OAAuB;YAClF,KAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC;YACpC,KAAI,CAAC,QAAQ,CAAC;gBACZ,iGAAiG;gBACjG,SAAS,EAAE,KAAI,CAAC,KAAK,CAAC,cAAc,KAA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CAAC,MAAM,CAAC,UAAC,CAAkB,IAAK,OAAA,CAAC,CAAC,IAAK,GAAG,CAAC,EAAX,CAAW,CAAC,CAAC,MAAM,GAAG,CAAC,CAClF,CAAC;IACJ,CAAC;IA7Ua,2BAAY,GAA8B;QACtD,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,IAAI;KACjB,AAHyB,CAGxB;IA2VJ,qBAAC;CAAA,AA/VD,CAAoC,KAAK,CAAC,SAAS,GA+VlD;SA/VY,cAAc","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId } from '@fluentui/react/lib/Utilities';\nimport { ScaleOrdinal } from 'd3-scale';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport { IAccessibilityProps, ChartHoverCard, ILegend, Legends } from '../../index';\nimport { Pie } from './Pie/index';\nimport { IChartDataPoint, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './index';\nimport { getAccessibleDataObject, getColorFromToken, getNextColor, getNextGradient } from '../../utilities/index';\nimport { convertToLocaleString } from '../../utilities/locale-util';\n\nconst getClassNames = classNamesFunction<IDonutChartStyleProps, IDonutChartStyles>();\nconst LEGEND_CONTAINER_HEIGHT = 40;\n\nexport interface IDonutChartState {\n showHover?: boolean;\n value?: string | undefined;\n legend?: string | undefined;\n _width?: number | undefined;\n _height?: number | undefined;\n activeLegend?: string;\n color?: string | undefined;\n xCalloutValue?: string;\n yCalloutValue?: string;\n focusedArcId?: string;\n selectedLegend: string;\n dataPointCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class DonutChartBase extends React.Component<IDonutChartProps, IDonutChartState> {\n public static defaultProps: Partial<IDonutChartProps> = {\n innerRadius: 0,\n hideLabels: true,\n };\n public _colors: ScaleOrdinal<string, {}>;\n private _classNames: IProcessedStyleSet<IDonutChartStyles>;\n private _rootElem: HTMLElement | null;\n private _uniqText: string;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private _currentHoverElement: any;\n private _calloutId: string;\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _emptyChartId: string | null;\n\n public static getDerivedStateFromProps(\n nextProps: Readonly<IDonutChartProps>,\n prevState: Readonly<IDonutChartState>,\n ): Partial<IDonutChartState> | null {\n let widthState: { _width: number } | undefined;\n if (nextProps.width && nextProps.width !== prevState._width) {\n widthState = { _width: nextProps.width };\n }\n\n let heightState: { _height: number } | undefined;\n if (nextProps.height && nextProps.height !== prevState._height) {\n heightState = { _height: nextProps.height - LEGEND_CONTAINER_HEIGHT };\n }\n\n return { ...widthState, ...heightState };\n }\n\n constructor(props: IDonutChartProps) {\n super(props);\n this.state = {\n showHover: false,\n value: '',\n legend: '',\n _width: this.props.width || 200,\n _height: this.props.height || 200,\n activeLegend: '',\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n selectedLegend: '',\n focusedArcId: '',\n };\n this._hoverCallback = this._hoverCallback.bind(this);\n this._focusCallback = this._focusCallback.bind(this);\n this._hoverLeave = this._hoverLeave.bind(this);\n this._calloutId = getId('callout');\n this._uniqText = getId('_Pie_');\n this._emptyChartId = getId('_DonutChart_empty');\n }\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n _width: this._rootElem.offsetWidth,\n _height: this._rootElem.offsetHeight - LEGEND_CONTAINER_HEIGHT,\n });\n }\n }\n\n public render(): JSX.Element {\n const { data, hideLegend = false } = this.props;\n const points = this._addDefaultColors(data?.chartData);\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.state._width!,\n height: this.state._height!,\n color: this.state.color!,\n className: this.props.className!,\n });\n\n const legendBars = this._createLegends(points);\n const donutMarginHorizontal = this.props.hideLabels ? 0 : 80;\n const donutMarginVertical = this.props.hideLabels ? 0 : 40;\n const outerRadius =\n Math.min(this.state._width! - donutMarginHorizontal, this.state._height! - donutMarginVertical) / 2;\n const chartData = this._elevateToMinimums(points.filter((d: IChartDataPoint) => d.data! >= 0));\n const valueInsideDonut = this._valueInsideDonut(this.props.valueInsideDonut!, chartData!);\n\n return !this._isChartEmpty() ? (\n <div\n className={this._classNames.root}\n ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}\n onMouseLeave={this._handleChartMouseLeave}\n >\n <FocusZone direction={FocusZoneDirection.horizontal} handleTabKey={FocusZoneTabbableElements.all}>\n <div>\n <svg\n className={this._classNames.chart}\n aria-label={data?.chartTitle}\n ref={(node: SVGElement | null) => this._setViewBox(node)}\n >\n <Pie\n width={this.state._width!}\n height={this.state._height!}\n outerRadius={outerRadius}\n innerRadius={this.props.innerRadius!}\n data={chartData!}\n enableGradient={this.props.enableGradient}\n roundCorners={this.props.roundCorners}\n onFocusCallback={this._focusCallback}\n hoverOnCallback={this._hoverCallback}\n hoverLeaveCallback={this._hoverLeave}\n uniqText={this._uniqText}\n onBlurCallback={this._onBlur}\n activeArc={this._getHighlightedLegend()}\n focusedArcId={this.state.focusedArcId || ''}\n href={this.props.href!}\n calloutId={this._calloutId}\n valueInsideDonut={this._toLocaleString(valueInsideDonut)}\n theme={this.props.theme!}\n showLabelsInPercent={this.props.showLabelsInPercent}\n hideLabels={this.props.hideLabels}\n />\n </svg>\n </div>\n </FocusZone>\n <Callout\n target={this._currentHoverElement}\n alignTargetEdge={true}\n isBeakVisible={false}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n hidden={!(!this.props.hideTooltip && this.state.showHover)}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n preventDismissOnLostFocus={true}\n /** Keep the callout updated with details of focused/hovered arc */\n shouldUpdateWhenHidden={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)}\n >\n {this.props.onRenderCalloutPerDataPoint ? (\n this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps!)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value}\n color={this.state.color}\n culture={this.props.culture}\n />\n )}\n </Callout>\n {!hideLegend && <div className={this._classNames.legendContainer}>{legendBars}</div>}\n </div>\n ) : (\n <div\n id={this._emptyChartId!}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _closeCallout = () => {\n this.setState({\n showHover: false,\n });\n };\n\n private _elevateToMinimums(data: IChartDataPoint[]) {\n let sumOfData = 0;\n const minPercent = 0.01;\n const elevatedData: IChartDataPoint[] = [];\n data.forEach(item => {\n sumOfData += item.data!;\n });\n data.forEach(item => {\n elevatedData.push(\n minPercent * sumOfData > item.data! && item.data! > 0\n ? {\n ...item,\n data: minPercent * sumOfData,\n yAxisCalloutData:\n item.yAxisCalloutData === undefined ? item.data!.toLocaleString() : item.yAxisCalloutData,\n }\n : item,\n );\n });\n return elevatedData;\n }\n private _setViewBox(node: SVGElement | null): void {\n if (node === null) {\n return;\n }\n\n const widthVal = node.parentElement ? node.parentElement.clientWidth : this.state._width;\n\n const heightVal =\n node.parentElement && node.parentElement?.offsetHeight > this.state._height!\n ? node.parentElement?.offsetHeight\n : this.state._height;\n const viewbox = `0 0 ${widthVal!} ${heightVal!}`;\n node.setAttribute('viewBox', viewbox);\n }\n\n private _createLegends(chartData: IChartDataPoint[]): JSX.Element {\n const legendDataItems = chartData.map((point: IChartDataPoint, index: number) => {\n const color: string = this.props.enableGradient\n ? point.gradient?.[0] || getNextGradient(index, 0, this.props.theme?.isInverted)[0]\n : point.color!;\n\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n if (this.state.selectedLegend === point.legend) {\n this.setState({ selectedLegend: '' });\n } else {\n this.setState({ selectedLegend: point.legend! });\n }\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this.setState({ activeLegend: point.legend! });\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n };\n return legend;\n });\n const legends = (\n <Legends\n legends={legendDataItems}\n centerLegends\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n }\n\n private _focusCallback = (data: IChartDataPoint, id: string, element: SVGPathElement): void => {\n this._currentHoverElement = element;\n this.setState({\n /** Show the callout if highlighted arc is focused and Hide it if unhighlighted arc is focused */\n showHover: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n value: data.data!.toString(),\n legend: data.legend,\n color: data.color!,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n focusedArcId: id,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n };\n\n private _hoverCallback = (data: IChartDataPoint, e: React.MouseEvent<SVGPathElement>): void => {\n if (this._calloutAnchorPoint !== data) {\n this._calloutAnchorPoint = data;\n this._currentHoverElement = e;\n let color: string = data.color!;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(this.props.data?.chartData?.findIndex(item => item.legend === data.legend) || 0, 0);\n color = data.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n this.setState({\n /** Show the callout if highlighted arc is hovered and Hide it if unhighlighted arc is hovered */\n showHover: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n value: data.data!.toString(),\n legend: data.legend,\n color,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n }\n };\n private _onBlur = (): void => {\n this.setState({ focusedArcId: '' });\n };\n\n private _hoverLeave(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n this.setState({ showHover: false });\n };\n\n private _valueInsideDonut(valueInsideDonut: string | number | undefined, data: IChartDataPoint[]) {\n const highlightedLegend = this._getHighlightedLegend();\n if (valueInsideDonut !== undefined && (highlightedLegend !== '' || this.state.showHover)) {\n let legendValue = valueInsideDonut;\n data!.map((point: IChartDataPoint, index: number) => {\n if (point.legend === highlightedLegend || (this.state.showHover && point.legend === this.state.legend)) {\n legendValue = point.yAxisCalloutData ? point.yAxisCalloutData : point.data!;\n }\n return;\n });\n return legendValue;\n } else {\n return valueInsideDonut;\n }\n }\n\n private _toLocaleString(data: string | number | undefined) {\n const localeString = convertToLocaleString(data, this.props.culture);\n if (!localeString) {\n return data;\n }\n return localeString?.toString();\n }\n\n /**\n * This function returns\n * the selected legend if there is one\n * or the hovered legend if none of the legends is selected.\n * Note: This won't work in case of multiple legends selection.\n */\n private _getHighlightedLegend() {\n return this.state.selectedLegend || this.state.activeLegend;\n }\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.chartData &&\n this.props.data.chartData!.filter((d: IChartDataPoint) => d.data! > 0).length > 0\n );\n }\n\n private _addDefaultColors = (donutChartDataPoint?: IChartDataPoint[]): IChartDataPoint[] => {\n return donutChartDataPoint\n ? donutChartDataPoint.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DonutChart.base.js","sourceRoot":"../src/","sources":["components/DonutChart/DonutChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAG1E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,uB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tG,aAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,IAAK,CAAC;iBAC7E;gBACD,OAAO;YACT,CAAC,CAAC,CAAC;YACH,OAAO,aAAW,CAAC;SACpB;aAAM;YACL,OAAO,gBAAgB,CAAC;SACzB;IACH,CAAC;IAEO,wCAAe,GAAvB,UAAwB,IAAiC;QACvD,IAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrE,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,EAAE,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACK,8CAAqB,GAA7B;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;IAC9D,CAAC;IAEO,sCAAa,GAArB;QACE,OAAO,CAAC,CACN,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS;YACzB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAU,CAAC,MAAM,CAAC,UAAC,CAAkB,IAAK,OAAA,CAAC,CAAC,IAAK,GAAG,CAAC,EAAX,CAAW,CAAC,CAAC,MAAM,GAAG,CAAC,CAClF,CAAC;IACJ,CAAC;IA7Ua,2BAAY,GAA8B;QACtD,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,IAAI;KACjB,AAHyB,CAGxB;IA2VJ,qBAAC;CAAA,AA/VD,CAAoC,KAAK,CAAC,SAAS,GA+VlD;SA/VY,cAAc","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, getId } from '@fluentui/react/lib/Utilities';\nimport { ScaleOrdinal } from 'd3-scale';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport { IAccessibilityProps, ChartHoverCard, ILegend, Legends } from '../../index';\nimport { Pie } from './Pie/index';\nimport { IChartDataPoint, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './index';\nimport { getAccessibleDataObject, getColorFromToken, getNextColor, getNextGradient } from '../../utilities/index';\nimport { convertToLocaleString } from '../../utilities/locale-util';\n\nconst getClassNames = classNamesFunction<IDonutChartStyleProps, IDonutChartStyles>();\nconst LEGEND_CONTAINER_HEIGHT = 40;\n\nexport interface IDonutChartState {\n showHover?: boolean;\n value?: string | undefined;\n legend?: string | undefined;\n _width?: number | undefined;\n _height?: number | undefined;\n activeLegend?: string;\n color?: string | undefined;\n xCalloutValue?: string;\n yCalloutValue?: string;\n focusedArcId?: string;\n selectedLegend: string;\n dataPointCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport class DonutChartBase extends React.Component<IDonutChartProps, IDonutChartState> {\n public static defaultProps: Partial<IDonutChartProps> = {\n innerRadius: 0,\n hideLabels: true,\n };\n public _colors: ScaleOrdinal<string, {}>;\n private _classNames: IProcessedStyleSet<IDonutChartStyles>;\n private _rootElem: HTMLElement | null;\n private _uniqText: string;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private _currentHoverElement: any;\n private _calloutId: string;\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _emptyChartId: string | null;\n\n public static getDerivedStateFromProps(\n nextProps: Readonly<IDonutChartProps>,\n prevState: Readonly<IDonutChartState>,\n ): Partial<IDonutChartState> | null {\n let widthState: { _width: number } | undefined;\n if (nextProps.width && nextProps.width !== prevState._width) {\n widthState = { _width: nextProps.width };\n }\n\n let heightState: { _height: number } | undefined;\n if (nextProps.height && nextProps.height !== prevState._height) {\n heightState = { _height: nextProps.height - LEGEND_CONTAINER_HEIGHT };\n }\n\n return { ...widthState, ...heightState };\n }\n\n constructor(props: IDonutChartProps) {\n super(props);\n this.state = {\n showHover: false,\n value: '',\n legend: '',\n _width: this.props.width || 200,\n _height: this.props.height || 200,\n activeLegend: '',\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n selectedLegend: props.legendProps?.selectedLegend ?? '',\n focusedArcId: '',\n };\n this._hoverCallback = this._hoverCallback.bind(this);\n this._focusCallback = this._focusCallback.bind(this);\n this._hoverLeave = this._hoverLeave.bind(this);\n this._calloutId = getId('callout');\n this._uniqText = getId('_Pie_');\n this._emptyChartId = getId('_DonutChart_empty');\n }\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n _width: this._rootElem.offsetWidth,\n _height: this._rootElem.offsetHeight - LEGEND_CONTAINER_HEIGHT,\n });\n }\n }\n\n public render(): JSX.Element {\n const { data, hideLegend = false } = this.props;\n const points = this._addDefaultColors(data?.chartData);\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.state._width!,\n height: this.state._height!,\n color: this.state.color!,\n className: this.props.className!,\n });\n\n const legendBars = this._createLegends(points);\n const donutMarginHorizontal = this.props.hideLabels ? 0 : 80;\n const donutMarginVertical = this.props.hideLabels ? 0 : 40;\n const outerRadius =\n Math.min(this.state._width! - donutMarginHorizontal, this.state._height! - donutMarginVertical) / 2;\n const chartData = this._elevateToMinimums(points.filter((d: IChartDataPoint) => d.data! >= 0));\n const valueInsideDonut = this._valueInsideDonut(this.props.valueInsideDonut!, chartData!);\n\n return !this._isChartEmpty() ? (\n <div\n className={this._classNames.root}\n ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}\n onMouseLeave={this._handleChartMouseLeave}\n >\n <FocusZone direction={FocusZoneDirection.horizontal} handleTabKey={FocusZoneTabbableElements.all}>\n <div>\n <svg\n className={this._classNames.chart}\n aria-label={data?.chartTitle}\n ref={(node: SVGElement | null) => this._setViewBox(node)}\n >\n <Pie\n width={this.state._width!}\n height={this.state._height!}\n outerRadius={outerRadius}\n innerRadius={this.props.innerRadius!}\n data={chartData!}\n enableGradient={this.props.enableGradient}\n roundCorners={this.props.roundCorners}\n onFocusCallback={this._focusCallback}\n hoverOnCallback={this._hoverCallback}\n hoverLeaveCallback={this._hoverLeave}\n uniqText={this._uniqText}\n onBlurCallback={this._onBlur}\n activeArc={this._getHighlightedLegend()}\n focusedArcId={this.state.focusedArcId || ''}\n href={this.props.href!}\n calloutId={this._calloutId}\n valueInsideDonut={this._toLocaleString(valueInsideDonut)}\n theme={this.props.theme!}\n showLabelsInPercent={this.props.showLabelsInPercent}\n hideLabels={this.props.hideLabels}\n />\n </svg>\n </div>\n </FocusZone>\n <Callout\n target={this._currentHoverElement}\n alignTargetEdge={true}\n isBeakVisible={false}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n hidden={!(!this.props.hideTooltip && this.state.showHover)}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n preventDismissOnLostFocus={true}\n /** Keep the callout updated with details of focused/hovered arc */\n shouldUpdateWhenHidden={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData, 'text', false)}\n >\n {this.props.onRenderCalloutPerDataPoint ? (\n this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps!)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value}\n color={this.state.color}\n culture={this.props.culture}\n />\n )}\n </Callout>\n {!hideLegend && <div className={this._classNames.legendContainer}>{legendBars}</div>}\n </div>\n ) : (\n <div\n id={this._emptyChartId!}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n private _closeCallout = () => {\n this.setState({\n showHover: false,\n });\n };\n\n private _elevateToMinimums(data: IChartDataPoint[]) {\n let sumOfData = 0;\n const minPercent = 0.01;\n const elevatedData: IChartDataPoint[] = [];\n data.forEach(item => {\n sumOfData += item.data!;\n });\n data.forEach(item => {\n elevatedData.push(\n minPercent * sumOfData > item.data! && item.data! > 0\n ? {\n ...item,\n data: minPercent * sumOfData,\n yAxisCalloutData:\n item.yAxisCalloutData === undefined ? item.data!.toLocaleString() : item.yAxisCalloutData,\n }\n : item,\n );\n });\n return elevatedData;\n }\n private _setViewBox(node: SVGElement | null): void {\n if (node === null) {\n return;\n }\n\n const widthVal = node.parentElement ? node.parentElement.clientWidth : this.state._width;\n\n const heightVal =\n node.parentElement && node.parentElement?.offsetHeight > this.state._height!\n ? node.parentElement?.offsetHeight\n : this.state._height;\n const viewbox = `0 0 ${widthVal!} ${heightVal!}`;\n node.setAttribute('viewBox', viewbox);\n }\n\n private _createLegends(chartData: IChartDataPoint[]): JSX.Element {\n const legendDataItems = chartData.map((point: IChartDataPoint, index: number) => {\n const color: string = this.props.enableGradient\n ? point.gradient?.[0] || getNextGradient(index, 0, this.props.theme?.isInverted)[0]\n : point.color!;\n\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n if (this.state.selectedLegend === point.legend) {\n this.setState({ selectedLegend: '' });\n } else {\n this.setState({ selectedLegend: point.legend! });\n }\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this.setState({ activeLegend: point.legend! });\n },\n onMouseOutAction: () => {\n this.setState({ activeLegend: '' });\n },\n };\n return legend;\n });\n const legends = (\n <Legends\n legends={legendDataItems}\n centerLegends\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n }\n\n private _focusCallback = (data: IChartDataPoint, id: string, element: SVGPathElement): void => {\n this._currentHoverElement = element;\n this.setState({\n /** Show the callout if highlighted arc is focused and Hide it if unhighlighted arc is focused */\n showHover: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n value: data.data!.toString(),\n legend: data.legend,\n color: data.color!,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n focusedArcId: id,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n };\n\n private _hoverCallback = (data: IChartDataPoint, e: React.MouseEvent<SVGPathElement>): void => {\n if (this._calloutAnchorPoint !== data) {\n this._calloutAnchorPoint = data;\n this._currentHoverElement = e;\n let color: string = data.color!;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(this.props.data?.chartData?.findIndex(item => item.legend === data.legend) || 0, 0);\n color = data.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n this.setState({\n /** Show the callout if highlighted arc is hovered and Hide it if unhighlighted arc is hovered */\n showHover: this.state.selectedLegend === '' || this.state.selectedLegend === data.legend,\n value: data.data!.toString(),\n legend: data.legend,\n color,\n xCalloutValue: data.xAxisCalloutData!,\n yCalloutValue: data.yAxisCalloutData!,\n dataPointCalloutProps: data,\n callOutAccessibilityData: data.callOutAccessibilityData!,\n });\n }\n };\n private _onBlur = (): void => {\n this.setState({ focusedArcId: '' });\n };\n\n private _hoverLeave(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n this.setState({ showHover: false });\n };\n\n private _valueInsideDonut(valueInsideDonut: string | number | undefined, data: IChartDataPoint[]) {\n const highlightedLegend = this._getHighlightedLegend();\n if (valueInsideDonut !== undefined && (highlightedLegend !== '' || this.state.showHover)) {\n let legendValue = valueInsideDonut;\n data!.map((point: IChartDataPoint, index: number) => {\n if (point.legend === highlightedLegend || (this.state.showHover && point.legend === this.state.legend)) {\n legendValue = point.yAxisCalloutData ? point.yAxisCalloutData : point.data!;\n }\n return;\n });\n return legendValue;\n } else {\n return valueInsideDonut;\n }\n }\n\n private _toLocaleString(data: string | number | undefined) {\n const localeString = convertToLocaleString(data, this.props.culture);\n if (!localeString) {\n return data;\n }\n return localeString?.toString();\n }\n\n /**\n * This function returns\n * the selected legend if there is one\n * or the hovered legend if none of the legends is selected.\n * Note: This won't work in case of multiple legends selection.\n */\n private _getHighlightedLegend() {\n return this.state.selectedLegend || this.state.activeLegend;\n }\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.chartData &&\n this.props.data.chartData!.filter((d: IChartDataPoint) => d.data! > 0).length > 0\n );\n }\n\n private _addDefaultColors = (donutChartDataPoint?: IChartDataPoint[]): IChartDataPoint[] => {\n return donutChartDataPoint\n ? donutChartDataPoint.map((item, index) => {\n let color: string;\n // isInverted property is applicable to v8 themes only\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0, this.props.theme?.isInverted);\n } else {\n color = getColorFromToken(item.color, this.props.theme?.isInverted);\n }\n\n return { ...item, color };\n })\n : [];\n };\n}\n"]}
|
|
@@ -69,6 +69,7 @@ export var getChartValueLabel = function (chartValue, minValue, maxValue, chartV
|
|
|
69
69
|
var GaugeChartBase = /** @class */ (function (_super) {
|
|
70
70
|
__extends(GaugeChartBase, _super);
|
|
71
71
|
function GaugeChartBase(props) {
|
|
72
|
+
var _a, _b;
|
|
72
73
|
var _this = _super.call(this, props) || this;
|
|
73
74
|
_this._getMargins = function () {
|
|
74
75
|
var _a = _this.props, hideMinMax = _a.hideMinMax, chartTitle = _a.chartTitle, sublabel = _a.sublabel;
|
|
@@ -296,7 +297,7 @@ var GaugeChartBase = /** @class */ (function (_super) {
|
|
|
296
297
|
_this._legendsHeight = !props.hideLegend ? 24 : 0;
|
|
297
298
|
_this.state = {
|
|
298
299
|
hoveredLegend: '',
|
|
299
|
-
selectedLegend: '',
|
|
300
|
+
selectedLegend: (_b = (_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegend) !== null && _b !== void 0 ? _b : '',
|
|
300
301
|
focusedElement: '',
|
|
301
302
|
calloutTarget: null,
|
|
302
303
|
isCalloutVisible: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GaugeChart.base.js","sourceRoot":"../src/","sources":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SAAS,EAAE,WAAW,CAAC,qBAAqB;wBAClE,6BAAK,SAAS,EAAE,WAAW,CAAC,iBAAiB;;4BAAI,qBAAqB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAO;wBACpG,6BAAK,SAAS,EAAE,WAAW,CAAC,eAAe,IACxC,qBAAqB,CAAC,WAAS,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CACpD,CACF,CACP,CAAC;gBACJ,CAAC,CAAC,CACE,CACP,CAAC;SACH;IACH,CAAC;IAMH,qBAAC;AAAD,CAAC,AAnnBD,CAAoC,KAAK,CAAC,SAAS,GAmnBlD","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL } 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 { convertToLocaleString } from '../../utilities/locale-util';\nimport {\n Points,\n formatValueWithSIPrefix,\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n pointTypes,\n} from '../../utilities/index';\nimport { ILegend, 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';\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 selectedLegend: 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> {\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\n constructor(props: IGaugeChartProps) {\n super(props);\n\n this._margins = this._getMargins();\n this._legendsHeight = !props.hideLegend ? 24 : 0;\n\n this.state = {\n hoveredLegend: '',\n selectedLegend: '',\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 }\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 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 chartWidth: width,\n chartHeight: height - this._legendsHeight,\n chartValueSize,\n });\n\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <svg\n className={this._classNames.chart}\n role=\"region\"\n aria-label={this._getChartTitle()}\n onMouseLeave={this._handleMouseOut}\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 {formatValueWithSIPrefix(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 {formatValueWithSIPrefix(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 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 action: () => {\n if (this.state.selectedLegend === segment.legend) {\n this.setState({ selectedLegend: '' });\n } else {\n this.setState({ selectedLegend: segment.legend });\n }\n },\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 legends={legends} centerLegends {...this.props.legendProps} />\n </div>\n );\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return (\n this.state.selectedLegend === legend || (this.state.selectedLegend === '' && this.state.hoveredLegend === legend)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.hoveredLegend === '';\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) ||\n this.state.selectedLegend === '' ||\n this.state.selectedLegend === 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 {convertToLocaleString(calloutProps!.hoverXValue, this.props.culture)}\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 = convertToLocaleString(xValue.y, culture);\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 {convertToLocaleString(\n xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data,\n culture,\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}> {convertToLocaleString(subcountName, culture)}</div>\n <div className={_classNames.calloutContentY}>\n {convertToLocaleString(subcounts[subcountName], culture)}\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":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC;AACx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AAC,YAAY,EAAE,OAAO,CAAC,CAAO;wBACpG,6BAAK,SAAS,EAAE,WAAW,CAAC,eAAe,IACxC,qBAAqB,CAAC,WAAS,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CACpD,CACF,CACP,CAAC;gBACJ,CAAC,CAAC,CACE,CACP,CAAC;SACH;IACH,CAAC;IAMH,qBAAC;AAAD,CAAC,AAnnBD,CAAoC,KAAK,CAAC,SAAS,GAmnBlD","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL } 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 { convertToLocaleString } from '../../utilities/locale-util';\nimport {\n Points,\n formatValueWithSIPrefix,\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n pointTypes,\n} from '../../utilities/index';\nimport { ILegend, 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';\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 selectedLegend: 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> {\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\n constructor(props: IGaugeChartProps) {\n super(props);\n\n this._margins = this._getMargins();\n this._legendsHeight = !props.hideLegend ? 24 : 0;\n\n this.state = {\n hoveredLegend: '',\n selectedLegend: props.legendProps?.selectedLegend ?? '',\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 }\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 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 chartWidth: width,\n chartHeight: height - this._legendsHeight,\n chartValueSize,\n });\n\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <svg\n className={this._classNames.chart}\n role=\"region\"\n aria-label={this._getChartTitle()}\n onMouseLeave={this._handleMouseOut}\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 {formatValueWithSIPrefix(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 {formatValueWithSIPrefix(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 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 action: () => {\n if (this.state.selectedLegend === segment.legend) {\n this.setState({ selectedLegend: '' });\n } else {\n this.setState({ selectedLegend: segment.legend });\n }\n },\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 legends={legends} centerLegends {...this.props.legendProps} />\n </div>\n );\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return (\n this.state.selectedLegend === legend || (this.state.selectedLegend === '' && this.state.hoveredLegend === legend)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.hoveredLegend === '';\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) ||\n this.state.selectedLegend === '' ||\n this.state.selectedLegend === 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 {convertToLocaleString(calloutProps!.hoverXValue, this.props.culture)}\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 = convertToLocaleString(xValue.y, culture);\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 {convertToLocaleString(\n xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data,\n culture,\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}> {convertToLocaleString(subcountName, culture)}</div>\n <div className={_classNames.calloutContentY}>\n {convertToLocaleString(subcounts[subcountName], culture)}\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"]}
|
|
@@ -19,6 +19,7 @@ var BAR_GAP_RATE = X1_INNER_PADDING / (1 - X1_INNER_PADDING);
|
|
|
19
19
|
var GroupedVerticalBarChartBase = /** @class */ (function (_super) {
|
|
20
20
|
__extends(GroupedVerticalBarChartBase, _super);
|
|
21
21
|
function GroupedVerticalBarChartBase(props) {
|
|
22
|
+
var _a, _b;
|
|
22
23
|
var _this = _super.call(this, props) || this;
|
|
23
24
|
_this._isRtl = getRTL();
|
|
24
25
|
_this._getMinMaxOfYAxis = function () {
|
|
@@ -351,7 +352,7 @@ var GroupedVerticalBarChartBase = /** @class */ (function (_super) {
|
|
|
351
352
|
dataForHoverCard: 0,
|
|
352
353
|
isCalloutVisible: false,
|
|
353
354
|
refSelected: null,
|
|
354
|
-
selectedLegend: '',
|
|
355
|
+
selectedLegend: (_b = (_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegend) !== null && _b !== void 0 ? _b : '',
|
|
355
356
|
xCalloutValue: '',
|
|
356
357
|
yCalloutValue: '',
|
|
357
358
|
YValueHover: [],
|