@fluentui/react-charting 5.24.39 → 5.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.json +75 -1
  2. package/CHANGELOG.md +30 -2
  3. package/dist/react-charting.d.ts +127 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +74 -0
  7. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
  8. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +496 -0
  9. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  10. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
  11. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +111 -0
  12. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
  13. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
  14. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +2 -0
  15. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  16. package/lib/components/CommonComponents/CartesianChart.base.js +38 -46
  17. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  18. package/lib/components/CommonComponents/CartesianChart.styles.js +9 -1
  19. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  20. package/lib/components/CommonComponents/CartesianChart.types.d.ts +17 -1
  21. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  22. package/lib/components/CommonComponents/index.d.ts +2 -0
  23. package/lib/components/CommonComponents/index.js +2 -0
  24. package/lib/components/CommonComponents/index.js.map +1 -1
  25. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +650 -76
  26. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  27. package/lib/index.d.ts +1 -1
  28. package/lib/index.js.map +1 -1
  29. package/lib/types/IChartAnnotation.d.ts +99 -0
  30. package/lib/types/IChartAnnotation.js +2 -0
  31. package/lib/types/IChartAnnotation.js.map +1 -0
  32. package/lib/types/IDataPoint.d.ts +4 -0
  33. package/lib/types/IDataPoint.js.map +1 -1
  34. package/lib/types/index.d.ts +1 -0
  35. package/lib/types/index.js +1 -0
  36. package/lib/types/index.js.map +1 -1
  37. package/lib/utilities/image-export-utils.js +55 -0
  38. package/lib/utilities/image-export-utils.js.map +1 -1
  39. package/lib/utilities/utilities.js +72 -20
  40. package/lib/utilities/utilities.js.map +1 -1
  41. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
  42. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js +497 -0
  43. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  44. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
  45. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +119 -0
  46. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
  47. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
  48. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +5 -0
  49. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  50. package/lib-amd/components/CommonComponents/CartesianChart.base.js +38 -47
  51. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  52. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +9 -1
  53. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  54. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +17 -1
  55. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  56. package/lib-amd/components/CommonComponents/index.d.ts +2 -0
  57. package/lib-amd/components/CommonComponents/index.js +3 -1
  58. package/lib-amd/components/CommonComponents/index.js.map +1 -1
  59. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +650 -76
  60. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  61. package/lib-amd/index.d.ts +1 -1
  62. package/lib-amd/index.js.map +1 -1
  63. package/lib-amd/types/IChartAnnotation.d.ts +99 -0
  64. package/lib-amd/types/IChartAnnotation.js +5 -0
  65. package/lib-amd/types/IChartAnnotation.js.map +1 -0
  66. package/lib-amd/types/IDataPoint.d.ts +4 -0
  67. package/lib-amd/types/IDataPoint.js.map +1 -1
  68. package/lib-amd/types/index.d.ts +1 -0
  69. package/lib-amd/types/index.js +2 -1
  70. package/lib-amd/types/index.js.map +1 -1
  71. package/lib-amd/utilities/image-export-utils.js +55 -0
  72. package/lib-amd/utilities/image-export-utils.js.map +1 -1
  73. package/lib-amd/utilities/utilities.js +72 -20
  74. package/lib-amd/utilities/utilities.js.map +1 -1
  75. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
  76. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +499 -0
  77. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  78. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
  79. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +118 -0
  80. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
  81. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
  82. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +3 -0
  83. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  84. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +38 -46
  85. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  86. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +9 -1
  87. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  88. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +17 -1
  89. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  90. package/lib-commonjs/components/CommonComponents/index.d.ts +2 -0
  91. package/lib-commonjs/components/CommonComponents/index.js +2 -0
  92. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  93. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +650 -76
  94. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  95. package/lib-commonjs/index.d.ts +1 -1
  96. package/lib-commonjs/index.js.map +1 -1
  97. package/lib-commonjs/types/IChartAnnotation.d.ts +99 -0
  98. package/lib-commonjs/types/IChartAnnotation.js +3 -0
  99. package/lib-commonjs/types/IChartAnnotation.js.map +1 -0
  100. package/lib-commonjs/types/IDataPoint.d.ts +4 -0
  101. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  102. package/lib-commonjs/types/index.d.ts +1 -0
  103. package/lib-commonjs/types/index.js +1 -0
  104. package/lib-commonjs/types/index.js.map +1 -1
  105. package/lib-commonjs/utilities/image-export-utils.js +55 -0
  106. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  107. package/lib-commonjs/utilities/utilities.js +72 -20
  108. package/lib-commonjs/utilities/utilities.js.map +1 -1
  109. package/package.json +9 -9
  110. package/src/components/CommonComponents/Annotations/ChartAnnotationLayer.types.ts +58 -0
  111. package/src/components/CommonComponents/CartesianChart.types.ts +21 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartAnnotationLayer.js","sourceRoot":"../src/","sources":["components/CommonComponents/Annotations/ChartAnnotationLayer.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE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AAE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAC,cAAc,iCAA6B,MAAM;QACpF,eAAe,IAAI,CAClB,6BACE,SAAS,EAAE,UAAU,CAAC,cAAc,EACpC,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAE,cAAO,YAAY,cAAI,aAAa,CAAE,EAC/C,mBAAmB,EAAC,MAAM,+BACA,MAAM;YAE/B,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,kCAAO,UAAU,CAAQ;YAClD,iBAAiB,CAAC,MAAM,GAAG,CAAC,IAAI,CAC/B,0CAAe,MAAM,EAAC,SAAS,EAAE,UAAU,CAAC,cAAc,IACvD,iBAAiB,CAChB,CACL;YACA,wBAAwB,CACrB,CACP;QACA,mBAAmB,CAChB,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, css, getId } from '@fluentui/react/lib/Utilities';\nimport { IChartAnnotation } from '../../../types/IChartAnnotation';\nimport {\n IAnnotationPoint,\n IChartAnnotationContext,\n IChartAnnotationLayerProps,\n ConnectorRenderData,\n IResolvedAnnotationPosition,\n} from './ChartAnnotationLayer.types';\nimport {\n applyOpacityToColor,\n DEFAULT_ANNOTATION_BACKGROUND_OPACITY,\n DEFAULT_CONNECTOR_ARROW,\n DEFAULT_CONNECTOR_END_PADDING,\n DEFAULT_CONNECTOR_START_PADDING,\n DEFAULT_CONNECTOR_STROKE_WIDTH,\n getDefaultConnectorStrokeColor,\n getStyles,\n IChartAnnotationLayerStyleProps,\n IChartAnnotationLayerStyles,\n} from './ChartAnnotationLayer.styles';\n\nconst getClassNames = classNamesFunction<IChartAnnotationLayerStyleProps, IChartAnnotationLayerStyles>();\n\nconst DEFAULT_HORIZONTAL_ALIGN = 'center';\nconst DEFAULT_VERTICAL_ALIGN = 'middle';\nconst DEFAULT_FOREIGN_OBJECT_WIDTH = 180;\nconst DEFAULT_FOREIGN_OBJECT_HEIGHT = 60;\nconst MIN_ARROW_SIZE = 6;\nconst MAX_ARROW_SIZE = 24;\nconst ARROW_SIZE_SCALE = 0.35;\nconst MAX_SIMPLE_MARKUP_DEPTH = 5;\nconst CHAR_CODE_LESS_THAN = '<'.codePointAt(0)!;\nconst CHAR_CODE_GREATER_THAN = '>'.codePointAt(0)!;\nconst getAnnotationKey = (annotation: IChartAnnotation, index: number) =>\n annotation.id ??\n (typeof annotation.text === 'string' || typeof annotation.text === 'number' ? String(annotation.text) : undefined) ??\n `annotation-${index}`;\n\ntype SimpleMarkupNode =\n | { type: 'text'; content: string }\n | { type: 'br' }\n | { type: 'element'; tag: 'b' | 'i'; children: SimpleMarkupNode[] };\n\ntype ElementMarkupNode = Extract<SimpleMarkupNode, { type: 'element' }>;\n\ntype StackFrame = {\n node: ElementMarkupNode | null;\n};\n\nconst decodeSimpleMarkupInput = (input: string): string => {\n const namedEntities: Record<string, string> = {\n amp: '&',\n quot: '\"',\n apos: \"'\",\n nbsp: '\\u00a0',\n };\n\n const withBasicEntitiesDecoded = input.replace(/&(#x?[0-9a-f]+|#\\d+|[a-z][\\w-]*);/gi, (match, entity) => {\n const lower = entity.toLowerCase();\n if (lower === 'lt' || lower === 'gt') {\n return `&${lower};`;\n }\n if (lower.startsWith('#')) {\n const isHex = lower[1] === 'x';\n const digits = lower.slice(isHex ? 2 : 1);\n const codePoint = Number.parseInt(digits, isHex ? 16 : 10);\n if (Number.isNaN(codePoint)) {\n return match;\n }\n if (codePoint === CHAR_CODE_LESS_THAN) {\n return '&lt;';\n }\n if (codePoint === CHAR_CODE_GREATER_THAN) {\n return '&gt;';\n }\n return String.fromCodePoint(codePoint);\n }\n return namedEntities[lower] ?? match;\n });\n\n return withBasicEntitiesDecoded.replace(/&lt;([^;]+)&gt;/gi, (match, inner) => {\n const normalized = inner.trim().replace(/\\s+/g, ' ');\n const lower = normalized.toLowerCase();\n\n switch (lower) {\n case 'b':\n return '<b>';\n case '/b':\n return '</b>';\n case 'i':\n return '<i>';\n case '/i':\n return '</i>';\n case 'br':\n case 'br/':\n case 'br /':\n return '<br />';\n default:\n return match;\n }\n });\n};\n\nconst appendTextNode = (nodes: SimpleMarkupNode[], text: string) => {\n if (text.length === 0) {\n return;\n }\n\n const last = nodes[nodes.length - 1];\n if (last && last.type === 'text') {\n last.content += text;\n } else {\n nodes.push({ type: 'text', content: text });\n }\n};\n\nconst serializeSimpleMarkup = (nodes: SimpleMarkupNode[]): string =>\n nodes\n .map(node => {\n if (node.type === 'text') {\n return node.content;\n }\n if (node.type === 'br') {\n return '<br />';\n }\n return `<${node.tag}>${serializeSimpleMarkup(node.children)}</${node.tag}>`;\n })\n .join('');\n\nconst parseSimpleMarkup = (input: string): SimpleMarkupNode[] => {\n if (!input) {\n return [];\n }\n\n const decodedInput = decodeSimpleMarkupInput(input);\n const rootChildren: SimpleMarkupNode[] = [];\n const stack: StackFrame[] = [{ node: null }];\n const currentChildren = () => stack[stack.length - 1].node?.children ?? rootChildren;\n const tagRegex = /<\\/?([a-z]+)\\s*\\/?\\s*>/gi;\n let lastIndex = 0;\n\n let match: RegExpExecArray | null;\n while ((match = tagRegex.exec(decodedInput)) !== null) {\n const [fullMatch, rawTagName] = match;\n const tagName = rawTagName.toLowerCase();\n const isClosing = fullMatch.startsWith('</');\n const isSelfClosing = /\\/\\s*>$/.test(fullMatch);\n\n appendTextNode(currentChildren(), decodedInput.slice(lastIndex, match.index));\n lastIndex = match.index + fullMatch.length;\n\n if (tagName === 'br' && !isClosing) {\n currentChildren().push({ type: 'br' });\n continue;\n }\n\n if ((tagName === 'b' || tagName === 'i') && !isSelfClosing) {\n if (isClosing) {\n const top = stack[stack.length - 1].node;\n if (stack.length > 1 && top?.tag === tagName) {\n stack.pop();\n } else {\n appendTextNode(currentChildren(), fullMatch);\n }\n } else {\n if (stack.length - 1 >= MAX_SIMPLE_MARKUP_DEPTH) {\n appendTextNode(currentChildren(), fullMatch);\n continue;\n }\n const elementNode: ElementMarkupNode = {\n type: 'element',\n tag: tagName as 'b' | 'i',\n children: [],\n };\n currentChildren().push(elementNode);\n stack.push({ node: elementNode });\n }\n continue;\n }\n\n appendTextNode(currentChildren(), fullMatch);\n }\n\n appendTextNode(currentChildren(), decodedInput.slice(lastIndex));\n\n while (stack.length > 1) {\n const unclosed = stack.pop()!;\n const elementNode = unclosed.node;\n if (!elementNode) {\n continue;\n }\n\n const parentChildren = stack[stack.length - 1].node?.children ?? rootChildren;\n const lastChild = parentChildren[parentChildren.length - 1];\n if (lastChild === elementNode) {\n parentChildren.pop();\n } else {\n const nodeIndex = parentChildren.indexOf(elementNode);\n if (nodeIndex !== -1) {\n parentChildren.splice(nodeIndex, 1);\n }\n }\n\n appendTextNode(\n parentChildren,\n `<${elementNode.tag}>${serializeSimpleMarkup(elementNode.children)}</${elementNode.tag}>`,\n );\n }\n\n return rootChildren;\n};\n\nconst simpleMarkupNodesToPlainText = (nodes: SimpleMarkupNode[]): string =>\n nodes\n .map(node => {\n if (node.type === 'text') {\n return node.content;\n }\n if (node.type === 'br') {\n return '\\n';\n }\n return simpleMarkupNodesToPlainText(node.children);\n })\n .join('');\n\nconst renderSimpleMarkupNodeList = (nodes: SimpleMarkupNode[], keyPrefix: string): React.ReactNode[] =>\n nodes.map((node, index) => {\n const key = `${keyPrefix}-${index}`;\n\n if (node.type === 'text') {\n return <React.Fragment key={key}>{node.content}</React.Fragment>;\n }\n\n if (node.type === 'br') {\n return <br key={key} />;\n }\n\n const Tag = node.tag === 'b' ? 'strong' : 'em';\n return React.createElement(Tag, { key }, ...renderSimpleMarkupNodeList(node.children, key));\n });\n\nconst renderSimpleMarkup = (nodes: SimpleMarkupNode[], keyPrefix: string): React.ReactNode => {\n const rendered = renderSimpleMarkupNodeList(nodes, keyPrefix);\n return rendered.length <= 1 ? rendered[0] ?? null : rendered;\n};\n\nconst normalizeBandOffset = (\n scale: (((value: unknown) => number) & { bandwidth?: () => number }) | undefined,\n value: unknown,\n) => {\n const position = scale?.(value as never);\n if (typeof position !== 'number' || Number.isNaN(position)) {\n return undefined;\n }\n if (scale && typeof scale.bandwidth === 'function') {\n return position + scale.bandwidth() / 2;\n }\n return position;\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.max(min, Math.min(max, value));\n\nconst createMeasurementSignature = (\n annotationContentSignature: string,\n containerStyle: React.CSSProperties,\n contentStyle: React.CSSProperties,\n layoutClassName?: string,\n styleClassName?: string,\n) =>\n JSON.stringify({\n annotationContentSignature,\n containerStyle,\n contentStyle,\n layoutClassName: layoutClassName ?? '',\n styleClassName: styleClassName ?? '',\n });\n\ntype MeasurementEntry = { width: number; height: number; signature: string };\n\nconst resolveCoordinates = (\n annotation: IChartAnnotation,\n context: IChartAnnotationContext,\n): IResolvedAnnotationPosition | undefined => {\n const { coordinates, layout } = annotation;\n\n if (!coordinates) {\n return undefined;\n }\n\n const offsetX = layout?.offsetX ?? 0;\n const offsetY = layout?.offsetY ?? 0;\n\n const anchor: IAnnotationPoint = { x: 0, y: 0 };\n\n switch (coordinates.type) {\n case 'data': {\n const { x, y, yAxis = 'primary' } = coordinates;\n const xScale = context.xScale;\n const yScale = yAxis === 'secondary' ? context.yScaleSecondary : context.yScalePrimary;\n if (!xScale || !yScale) {\n return undefined;\n }\n const xValue = normalizeBandOffset(xScale, x instanceof Date ? x.getTime() : x);\n const yValue = normalizeBandOffset(yScale, y instanceof Date ? y.getTime() : y);\n if (typeof xValue !== 'number' || typeof yValue !== 'number') {\n return undefined;\n }\n anchor.x = xValue;\n anchor.y = yValue;\n break;\n }\n case 'relative': {\n if (typeof coordinates.x !== 'number' || typeof coordinates.y !== 'number') {\n return undefined;\n }\n anchor.x = context.plotRect.x + context.plotRect.width * coordinates.x;\n anchor.y = context.plotRect.y + context.plotRect.height * coordinates.y;\n break;\n }\n case 'pixel': {\n if (typeof coordinates.x !== 'number' || typeof coordinates.y !== 'number') {\n return undefined;\n }\n anchor.x = context.plotRect.x + coordinates.x;\n anchor.y = context.plotRect.y + coordinates.y;\n break;\n }\n default:\n return undefined;\n }\n\n let left = anchor.x + offsetX;\n let top = anchor.y + offsetY;\n\n if (layout?.clipToBounds) {\n left = clamp(left, context.plotRect.x, context.plotRect.x + context.plotRect.width);\n top = clamp(top, context.plotRect.y, context.plotRect.y + context.plotRect.height);\n }\n\n return {\n anchor,\n point: { x: left, y: top },\n };\n};\n\nexport const ChartAnnotationLayer: React.FC<IChartAnnotationLayerProps> = React.memo(props => {\n const { annotations: annotationsProp, theme, context, className } = props;\n\n const classNames = getClassNames(getStyles, { theme, className });\n const idPrefix = React.useMemo(() => getId('chart-annotation'), []);\n\n const [measurements, setMeasurements] = React.useState<Record<string, MeasurementEntry>>({});\n\n const resolvedAnnotations = React.useMemo(\n () =>\n (annotationsProp ?? []).map((annotation, index) => ({ annotation, key: getAnnotationKey(annotation, index) })),\n [annotationsProp],\n );\n\n React.useEffect(() => {\n setMeasurements(prev => {\n if (resolvedAnnotations.length === 0) {\n if (Object.keys(prev).length === 0) {\n return prev;\n }\n return {} as Record<string, MeasurementEntry>;\n }\n\n const next: Record<string, MeasurementEntry> = {};\n resolvedAnnotations.forEach(({ key }) => {\n if (prev[key]) {\n next[key] = prev[key];\n }\n });\n\n if (Object.keys(next).length === Object.keys(prev).length) {\n let identical = true;\n for (const key of Object.keys(next)) {\n if (next[key] !== prev[key]) {\n identical = false;\n break;\n }\n }\n if (identical) {\n return prev;\n }\n }\n\n return next;\n });\n }, [resolvedAnnotations]);\n\n const updateMeasurement = React.useCallback((key: string, width: number, height: number, signature: string) => {\n setMeasurements(prev => {\n const prevEntry = prev[key];\n if (\n prevEntry &&\n prevEntry.signature === signature &&\n Math.abs(prevEntry.width - width) < 0.5 &&\n Math.abs(prevEntry.height - height) < 0.5\n ) {\n return prev;\n }\n\n if (width === 0 && height === 0) {\n return prev;\n }\n\n return {\n ...prev,\n [key]: { width, height, signature },\n };\n });\n }, []);\n\n const annotationForeignObjects: React.ReactNode[] = [];\n const measurementElements: React.ReactNode[] = [];\n const connectors: ConnectorRenderData[] = [];\n\n resolvedAnnotations.forEach(({ annotation, key }) => {\n const resolved = resolveCoordinates(annotation, context);\n if (!resolved) {\n return;\n }\n\n const rawAnnotationText = annotation.text === undefined || annotation.text === null ? '' : String(annotation.text);\n const annotationMarkupNodes = parseSimpleMarkup(rawAnnotationText);\n const annotationMarkupSignature = JSON.stringify(annotationMarkupNodes);\n const annotationPlainText = simpleMarkupNodesToPlainText(annotationMarkupNodes);\n\n const layout = annotation.layout;\n const horizontalAlign = layout?.align ?? DEFAULT_HORIZONTAL_ALIGN;\n const verticalAlign = layout?.verticalAlign ?? DEFAULT_VERTICAL_ALIGN;\n const backgroundOpacity = annotation.style?.opacity ?? DEFAULT_ANNOTATION_BACKGROUND_OPACITY;\n const baseBackgroundColor = annotation.style?.backgroundColor ?? theme.semanticColors.bodyBackground;\n const hasCustomBackground =\n annotation.style?.backgroundColor !== undefined || annotation.style?.opacity !== undefined;\n\n const containerStyle: React.CSSProperties = {\n maxWidth: layout?.maxWidth,\n ...(hasCustomBackground && {\n backgroundColor: applyOpacityToColor(baseBackgroundColor, backgroundOpacity),\n }),\n borderColor: annotation.style?.borderColor,\n borderWidth: annotation.style?.borderWidth,\n borderStyle: annotation.style?.borderStyle ?? (annotation.style?.borderColor ? 'solid' : undefined),\n borderRadius: annotation.style?.borderRadius,\n padding: annotation.style?.padding,\n boxShadow: annotation.style?.boxShadow,\n };\n\n const contentStyle: React.CSSProperties = {\n color: annotation.style?.textColor,\n fontSize: annotation.style?.fontSize,\n fontWeight: annotation.style?.fontWeight,\n opacity: 1,\n };\n\n const measurementSignature = createMeasurementSignature(\n annotationMarkupSignature,\n containerStyle,\n contentStyle,\n layout?.className,\n annotation.style?.className,\n );\n const measurementEntry = measurements[key];\n const isMeasurementValid = measurementEntry?.signature === measurementSignature;\n const measuredSize = isMeasurementValid ? measurementEntry : undefined;\n const width = Math.max(measuredSize?.width ?? layout?.maxWidth ?? DEFAULT_FOREIGN_OBJECT_WIDTH, 1);\n const height = Math.max(measuredSize?.height ?? DEFAULT_FOREIGN_OBJECT_HEIGHT, 1);\n\n const offsetX = horizontalAlign === 'center' ? -width / 2 : horizontalAlign === 'end' ? -width : 0;\n const offsetY = verticalAlign === 'middle' ? -height / 2 : verticalAlign === 'bottom' ? -height : 0;\n\n const baseTopLeftX = resolved.point.x + offsetX;\n const baseTopLeftY = resolved.point.y + offsetY;\n\n const usePlotBounds = layout?.clipToBounds !== false;\n const viewportX = usePlotBounds ? context.plotRect.x : 0;\n const viewportY = usePlotBounds ? context.plotRect.y : 0;\n const viewportWidth = usePlotBounds ? context.plotRect.width : context.svgRect.width ?? 0;\n const viewportHeight = usePlotBounds ? context.plotRect.height : context.svgRect.height ?? 0;\n\n const maxTopLeftX = viewportWidth > 0 ? viewportX + viewportWidth - width : baseTopLeftX;\n const maxTopLeftY = viewportHeight > 0 ? viewportY + viewportHeight - height : baseTopLeftY;\n\n let topLeftX = viewportWidth > 0 ? clamp(baseTopLeftX, viewportX, Math.max(viewportX, maxTopLeftX)) : baseTopLeftX;\n let topLeftY = viewportHeight > 0 ? clamp(baseTopLeftY, viewportY, Math.max(viewportY, maxTopLeftY)) : baseTopLeftY;\n\n let displayPoint = {\n x: topLeftX - offsetX,\n y: topLeftY - offsetY,\n };\n\n if (annotation.connector) {\n const startPadding = annotation.connector.startPadding ?? 12;\n const endPadding = annotation.connector.endPadding ?? 0;\n const minArrowClearance = 6;\n const minDistance = Math.max(startPadding + endPadding + minArrowClearance, startPadding);\n\n const dx = displayPoint.x - resolved.anchor.x;\n const dy = displayPoint.y - resolved.anchor.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (distance < minDistance) {\n const fallbackDirection: IAnnotationPoint = { x: 0, y: -1 };\n const ux = distance === 0 ? fallbackDirection.x : dx / distance;\n const uy = distance === 0 ? fallbackDirection.y : dy / distance;\n\n const desiredDisplayX = resolved.anchor.x + ux * minDistance;\n const desiredDisplayY = resolved.anchor.y + uy * minDistance;\n\n let desiredTopLeftX = desiredDisplayX + offsetX;\n let desiredTopLeftY = desiredDisplayY + offsetY;\n\n desiredTopLeftX =\n viewportWidth > 0 ? clamp(desiredTopLeftX, viewportX, Math.max(viewportX, maxTopLeftX)) : desiredTopLeftX;\n desiredTopLeftY =\n viewportHeight > 0 ? clamp(desiredTopLeftY, viewportY, Math.max(viewportY, maxTopLeftY)) : desiredTopLeftY;\n\n topLeftX = desiredTopLeftX;\n topLeftY = desiredTopLeftY;\n displayPoint = {\n x: topLeftX - offsetX,\n y: topLeftY - offsetY,\n };\n }\n }\n\n const measurementStyle: React.CSSProperties = {\n left: topLeftX,\n top: topLeftY,\n pointerEvents: 'none',\n ...containerStyle,\n };\n\n if (!isMeasurementValid) {\n measurementElements.push(\n <div\n key={`${key}-measurement`}\n ref={node => {\n if (node) {\n const rect = node.getBoundingClientRect();\n if (rect.width !== 0 || rect.height !== 0) {\n updateMeasurement(key, rect.width, rect.height, measurementSignature);\n }\n }\n }}\n className={css(classNames.annotation, classNames.measurement, layout?.className, annotation.style?.className)}\n style={measurementStyle}\n aria-hidden={true}\n data-annotation-key={key}\n data-chart-annotation-measurement=\"true\"\n >\n <div\n className={css(classNames.annotationContent, layout?.className, annotation.style?.className)}\n style={contentStyle}\n >\n {renderSimpleMarkup(annotationMarkupNodes, `${key}-measurement`)}\n </div>\n </div>,\n );\n }\n\n annotationForeignObjects.push(\n <foreignObject\n key={`${key}-annotation`}\n x={topLeftX}\n y={topLeftY}\n width={width}\n height={height}\n className={css(classNames.annotationForeignObject)}\n data-annotation-key={key}\n >\n <div\n className={css(classNames.annotation, layout?.className, annotation.style?.className)}\n style={containerStyle}\n data-annotation-key={key}\n >\n <div\n className={css(classNames.annotationContent, annotation.style?.className)}\n style={contentStyle}\n role={annotation.accessibility?.role ?? 'note'}\n aria-label={annotation.accessibility?.ariaLabel ?? (annotationPlainText ? annotationPlainText : undefined)}\n aria-describedby={annotation.accessibility?.ariaDescribedBy}\n data-chart-annotation=\"true\"\n data-annotation-key={key}\n >\n {renderSimpleMarkup(annotationMarkupNodes, `${key}-content`)}\n </div>\n </div>\n </foreignObject>,\n );\n\n if (annotation.connector) {\n const {\n startPadding = DEFAULT_CONNECTOR_START_PADDING,\n endPadding = DEFAULT_CONNECTOR_END_PADDING,\n strokeColor = getDefaultConnectorStrokeColor(theme),\n strokeWidth = DEFAULT_CONNECTOR_STROKE_WIDTH,\n dashArray,\n arrow = DEFAULT_CONNECTOR_ARROW,\n } = annotation.connector;\n\n const dx = resolved.anchor.x - displayPoint.x;\n const dy = resolved.anchor.y - displayPoint.y;\n const distance = Math.sqrt(dx * dx + dy * dy) || 1;\n const ux = dx / distance;\n const uy = dy / distance;\n\n const sizeBasis = Math.max(1, Math.min(width, height));\n const proportionalSize = sizeBasis * ARROW_SIZE_SCALE;\n const maxByPadding = startPadding > 0 ? startPadding * 1.25 : MAX_ARROW_SIZE;\n const maxByDistance = distance * 0.6;\n const markerSize = clamp(proportionalSize, MIN_ARROW_SIZE, Math.min(MAX_ARROW_SIZE, maxByPadding, maxByDistance));\n const markerStrokeWidth = clamp(strokeWidth, 1, markerSize / 2);\n\n const start: IAnnotationPoint = {\n x: displayPoint.x + ux * startPadding,\n y: displayPoint.y + uy * startPadding,\n };\n\n const end: IAnnotationPoint = {\n x: resolved.anchor.x - ux * endPadding,\n y: resolved.anchor.y - uy * endPadding,\n };\n\n connectors.push({\n key: `${key}-connector`,\n start,\n end,\n strokeColor,\n strokeWidth,\n dashArray,\n arrow,\n markerSize,\n markerStrokeWidth,\n });\n }\n });\n\n if (annotationForeignObjects.length === 0 && connectors.length === 0) {\n return null;\n }\n\n const viewBoxWidth = context.svgRect.width || 1;\n const viewBoxHeight = context.svgRect.height || 1;\n\n const markerDefs: React.ReactNode[] = [];\n\n const createMarkerId = (color: string, position: 'start' | 'end', size: number, markerStrokeWidth: number) => {\n const id = `${idPrefix}-${position}-${markerDefs.length}`;\n const refY = size / 2;\n const refX = position === 'end' ? size : 0;\n const pathEnd = `M0 0 L ${size} ${refY} L0 ${size} Z`;\n const pathStart = `M ${size} 0 L0 ${refY} L ${size} ${size} Z`;\n const path = position === 'end' ? pathEnd : pathStart;\n\n markerDefs.push(\n <marker\n key={id}\n id={id}\n markerWidth={size}\n markerHeight={size}\n viewBox={`0 0 ${size} ${size}`}\n refX={refX}\n refY={refY}\n orient=\"auto\"\n markerUnits=\"userSpaceOnUse\"\n >\n <path\n d={path}\n fill={color}\n stroke={color}\n strokeWidth={markerStrokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </marker>,\n );\n\n return id;\n };\n\n const connectorElements = connectors.map(connector => {\n let markerStart: string | undefined;\n let markerEnd: string | undefined;\n\n if (connector.arrow === 'start' || connector.arrow === 'both') {\n markerStart = createMarkerId(connector.strokeColor, 'start', connector.markerSize, connector.markerStrokeWidth);\n }\n if (connector.arrow === 'end' || connector.arrow === 'both') {\n markerEnd = createMarkerId(connector.strokeColor, 'end', connector.markerSize, connector.markerStrokeWidth);\n }\n\n return (\n <line\n key={connector.key}\n x1={connector.start.x}\n y1={connector.start.y}\n x2={connector.end.x}\n y2={connector.end.y}\n stroke={connector.strokeColor}\n strokeWidth={connector.strokeWidth}\n strokeDasharray={connector.dashArray}\n strokeLinecap=\"round\"\n markerStart={markerStart ? `url(#${markerStart})` : undefined}\n markerEnd={markerEnd ? `url(#${markerEnd})` : undefined}\n />\n );\n });\n\n const shouldRenderSvg = connectors.length > 0 || annotationForeignObjects.length > 0;\n return (\n <div className={classNames.root} role=\"presentation\" data-chart-annotation-layer=\"true\">\n {shouldRenderSvg && (\n <svg\n className={classNames.connectorLayer}\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${viewBoxWidth} ${viewBoxHeight}`}\n preserveAspectRatio=\"none\"\n data-chart-annotation-svg=\"true\"\n >\n {markerDefs.length > 0 && <defs>{markerDefs}</defs>}\n {connectorElements.length > 0 && (\n <g aria-hidden=\"true\" className={classNames.connectorGroup}>\n {connectorElements}\n </g>\n )}\n {annotationForeignObjects}\n </svg>\n )}\n {measurementElements}\n </div>\n );\n});\n\nChartAnnotationLayer.displayName = 'ChartAnnotationLayer';\n"]}
@@ -0,0 +1,28 @@
1
+ import { ITheme, IStyle } from '@fluentui/react/lib/Styling';
2
+ import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
+ export interface IChartAnnotationLayerStyleProps {
4
+ theme: ITheme;
5
+ className?: string;
6
+ }
7
+ import { ChartAnnotationArrowHead } from '../../../types/IChartAnnotation';
8
+ export interface IChartAnnotationLayerStyles {
9
+ root?: IStyle;
10
+ annotation?: IStyle;
11
+ connectorLayer?: IStyle;
12
+ measurement?: IStyle;
13
+ annotationContent?: IStyle;
14
+ annotationForeignObject?: IStyle;
15
+ annotationContentInteractive?: IStyle;
16
+ annotationForeignObjectInteractive?: IStyle;
17
+ connectorGroup?: IStyle;
18
+ }
19
+ export declare const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;
20
+ export declare const DEFAULT_ANNOTATION_PADDING = "4px 8px";
21
+ export declare const DEFAULT_CONNECTOR_START_PADDING = 12;
22
+ export declare const DEFAULT_CONNECTOR_END_PADDING = 0;
23
+ export declare const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;
24
+ export declare const DEFAULT_CONNECTOR_ARROW: ChartAnnotationArrowHead;
25
+ export declare const applyOpacityToColor: (color: string | undefined, opacity: number) => string | undefined;
26
+ export declare const getDefaultAnnotationBackgroundColor: (theme: ITheme) => string | undefined;
27
+ export declare const getDefaultConnectorStrokeColor: (theme: ITheme) => string;
28
+ export declare const getStyles: IStyleFunctionOrObject<IChartAnnotationLayerStyleProps, IChartAnnotationLayerStyles>;
@@ -0,0 +1,111 @@
1
+ import { color as d3Color } from 'd3-color';
2
+ export var DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;
3
+ export var DEFAULT_ANNOTATION_PADDING = '4px 8px';
4
+ export var DEFAULT_CONNECTOR_START_PADDING = 12;
5
+ export var DEFAULT_CONNECTOR_END_PADDING = 0;
6
+ export var DEFAULT_CONNECTOR_STROKE_WIDTH = 2;
7
+ export var DEFAULT_CONNECTOR_ARROW = 'end';
8
+ export var applyOpacityToColor = function (color, opacity) {
9
+ if (!color) {
10
+ return undefined;
11
+ }
12
+ var parsed = d3Color(color);
13
+ if (!parsed) {
14
+ return color;
15
+ }
16
+ parsed.opacity = Math.max(0, Math.min(1, opacity));
17
+ return parsed.toString();
18
+ };
19
+ export var getDefaultAnnotationBackgroundColor = function (theme) {
20
+ return applyOpacityToColor(theme.semanticColors.bodyBackground, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);
21
+ };
22
+ export var getDefaultConnectorStrokeColor = function (theme) { return theme.palette.neutralPrimary; };
23
+ export var getStyles = function (props) {
24
+ var theme = props.theme, className = props.className;
25
+ var defaultBackground = getDefaultAnnotationBackgroundColor(theme);
26
+ var defaultTextColor = theme.semanticColors.bodyText;
27
+ var defaultBorderColor = theme.semanticColors.bodyDivider;
28
+ return {
29
+ root: [
30
+ {
31
+ position: 'absolute',
32
+ top: 0,
33
+ left: 0,
34
+ right: 0,
35
+ bottom: 0,
36
+ width: '100%',
37
+ height: '100%',
38
+ pointerEvents: 'none',
39
+ overflow: 'visible',
40
+ zIndex: 1,
41
+ },
42
+ className,
43
+ ],
44
+ annotation: [
45
+ theme.fonts.small,
46
+ {
47
+ position: 'absolute',
48
+ pointerEvents: 'none',
49
+ display: 'flex',
50
+ alignItems: 'center',
51
+ justifyContent: 'center',
52
+ textAlign: 'center',
53
+ backgroundColor: defaultBackground,
54
+ color: defaultTextColor,
55
+ padding: DEFAULT_ANNOTATION_PADDING,
56
+ borderRadius: 4,
57
+ boxShadow: theme.effects.elevation4,
58
+ border: "1px solid ".concat(defaultBorderColor),
59
+ whiteSpace: 'pre-wrap',
60
+ zIndex: 2,
61
+ },
62
+ ],
63
+ connectorLayer: [
64
+ {
65
+ position: 'absolute',
66
+ top: 0,
67
+ left: 0,
68
+ width: '100%',
69
+ height: '100%',
70
+ pointerEvents: 'none',
71
+ overflow: 'visible',
72
+ },
73
+ ],
74
+ measurement: [
75
+ {
76
+ position: 'absolute',
77
+ visibility: 'hidden',
78
+ pointerEvents: 'none',
79
+ },
80
+ ],
81
+ annotationContent: [
82
+ {
83
+ width: '100%',
84
+ height: '100%',
85
+ pointerEvents: 'none',
86
+ },
87
+ ],
88
+ annotationForeignObject: [
89
+ {
90
+ overflow: 'visible',
91
+ pointerEvents: 'none',
92
+ },
93
+ ],
94
+ annotationContentInteractive: [
95
+ {
96
+ pointerEvents: 'auto',
97
+ },
98
+ ],
99
+ annotationForeignObjectInteractive: [
100
+ {
101
+ pointerEvents: 'auto',
102
+ },
103
+ ],
104
+ connectorGroup: [
105
+ {
106
+ pointerEvents: 'none',
107
+ },
108
+ ],
109
+ };
110
+ };
111
+ //# sourceMappingURL=ChartAnnotationLayer.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartAnnotationLayer.styles.js","sourceRoot":"../src/","sources":["components/CommonComponents/Annotations/ChartAnnotationLayer.styles.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AAe5C,MAAM,CAAC,IAAM,qCAAqC,GAAG,GAAG,CAAC;AACzD,MAAM,CAAC,IAAM,0BAA0B,GAAG,SAAS,CAAC;AACpD,MAAM,CAAC,IAAM,+BAA+B,GAAG,EAAE,CAAC;AAClD,MAAM,CAAC,IAAM,6BAA6B,GAAG,CAAC,CAAC;AAC/C,MAAM,CAAC,IAAM,8BAA8B,GAAG,CAAC,CAAC;AAChD,MAAM,CAAC,IAAM,uBAAuB,GAA6B,KAAK,CAAC;AAEvE,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,KAAyB,EAAE,OAAe;IAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC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AAE,MAAM;gBACrB,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,QAAQ;gBACxB,SAAS,EAAE,QAAQ;gBACnB,eAAe,EAAE,iBAAiB;gBAClC,KAAK,EAAE,gBAAgB;gBACvB,OAAO,EAAE,0BAA0B;gBACnC,YAAY,EAAE,CAAC;gBACf,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU;gBACnC,MAAM,EAAE,oBAAa,kBAAkB,CAAE;gBACzC,UAAU,EAAE,UAAU;gBACtB,MAAM,EAAE,CAAC;aACV;SACF;QACD,cAAc,EAAE;YACd;gBACE,QAAQ,EAAE,UAAU;gBACpB,GAAG,EAAE,CAAC;gBACN,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,aAAa,EAAE,MAAM;gBACrB,QAAQ,EAAE,SAAS;aACpB;SACF;QACD,WAAW,EAAE;YACX;gBACE,QAAQ,EAAE,UAAU;gBACpB,UAAU,EAAE,QAAQ;gBACpB,aAAa,EAAE,MAAM;aACtB;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,aAAa,EAAE,MAAM;aACtB;SACF;QACD,uBAAuB,EAAE;YACvB;gBACE,QAAQ,EAAE,SAAS;gBACnB,aAAa,EAAE,MAAM;aACtB;SACF;QACD,4BAA4B,EAAE;YAC5B;gBACE,aAAa,EAAE,MAAM;aACtB;SACF;QACD,kCAAkC,EAAE;YAClC;gBACE,aAAa,EAAE,MAAM;aACtB;SACF;QACD,cAAc,EAAE;YACd;gBACE,aAAa,EAAE,MAAM;aACtB;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { ITheme, IStyle } from '@fluentui/react/lib/Styling';\nimport { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\n\nexport interface IChartAnnotationLayerStyleProps {\n theme: ITheme;\n className?: string;\n}\nimport { color as d3Color } from 'd3-color';\nimport { ChartAnnotationArrowHead } from '../../../types/IChartAnnotation';\n\nexport interface IChartAnnotationLayerStyles {\n root?: IStyle;\n annotation?: IStyle;\n connectorLayer?: IStyle;\n measurement?: IStyle;\n annotationContent?: IStyle;\n annotationForeignObject?: IStyle;\n annotationContentInteractive?: IStyle;\n annotationForeignObjectInteractive?: IStyle;\n connectorGroup?: IStyle;\n}\n\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW: ChartAnnotationArrowHead = 'end';\n\nexport const applyOpacityToColor = (color: string | undefined, opacity: number): string | undefined => {\n if (!color) {\n return undefined;\n }\n\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n\nexport const getDefaultAnnotationBackgroundColor = (theme: ITheme): string | undefined =>\n applyOpacityToColor(theme.semanticColors.bodyBackground, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n\nexport const getDefaultConnectorStrokeColor = (theme: ITheme): string => theme.palette.neutralPrimary;\n\nexport const getStyles: IStyleFunctionOrObject<IChartAnnotationLayerStyleProps, IChartAnnotationLayerStyles> = (\n props: IChartAnnotationLayerStyleProps,\n) => {\n const { theme, className } = props;\n const defaultBackground = getDefaultAnnotationBackgroundColor(theme);\n const defaultTextColor = theme.semanticColors.bodyText;\n const defaultBorderColor = theme.semanticColors.bodyDivider;\n\n return {\n root: [\n {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1,\n },\n className,\n ],\n annotation: [\n theme.fonts.small,\n {\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n backgroundColor: defaultBackground,\n color: defaultTextColor,\n padding: DEFAULT_ANNOTATION_PADDING,\n borderRadius: 4,\n boxShadow: theme.effects.elevation4,\n border: `1px solid ${defaultBorderColor}`,\n whiteSpace: 'pre-wrap',\n zIndex: 2,\n },\n ],\n connectorLayer: [\n {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n },\n ],\n measurement: [\n {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none',\n },\n ],\n annotationContent: [\n {\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n },\n ],\n annotationForeignObject: [\n {\n overflow: 'visible',\n pointerEvents: 'none',\n },\n ],\n annotationContentInteractive: [\n {\n pointerEvents: 'auto',\n },\n ],\n annotationForeignObjectInteractive: [\n {\n pointerEvents: 'auto',\n },\n ],\n connectorGroup: [\n {\n pointerEvents: 'none',\n },\n ],\n };\n};\n"]}
@@ -0,0 +1,52 @@
1
+ import { ITheme } from '@fluentui/react/lib/Styling';
2
+ import { IChartAnnotation, ChartAnnotationArrowHead } from '../../../types/IChartAnnotation';
3
+ export interface IAnnotationPoint {
4
+ x: number;
5
+ y: number;
6
+ }
7
+ export interface IAnnotationPlotRect {
8
+ x: number;
9
+ y: number;
10
+ width: number;
11
+ height: number;
12
+ }
13
+ export interface IChartAnnotationContext {
14
+ /** Rectangle describing the drawable area of the chart (without margins) */
15
+ plotRect: IAnnotationPlotRect;
16
+ /** Size of the owning SVG element */
17
+ svgRect: {
18
+ width: number;
19
+ height: number;
20
+ };
21
+ /** Indicates if layout should be mirrored */
22
+ isRtl?: boolean;
23
+ /** Primary x scale mapping data domain to pixels */
24
+ xScale?: (value: any) => number;
25
+ /** Primary y scale mapping data domain to pixels */
26
+ yScalePrimary?: (value: any) => number;
27
+ /** Secondary y scale when present */
28
+ yScaleSecondary?: (value: any) => number;
29
+ }
30
+ export interface IChartAnnotationLayerProps {
31
+ annotations?: IChartAnnotation[];
32
+ context: IChartAnnotationContext;
33
+ theme: ITheme;
34
+ className?: string;
35
+ }
36
+ export interface IResolvedAnnotationPosition {
37
+ /** Final absolute position after applying layout and offsets */
38
+ point: IAnnotationPoint;
39
+ /** Raw anchor position before offsets (used for connectors) */
40
+ anchor: IAnnotationPoint;
41
+ }
42
+ export type ConnectorRenderData = {
43
+ key: string;
44
+ start: IAnnotationPoint;
45
+ end: IAnnotationPoint;
46
+ strokeColor: string;
47
+ strokeWidth: number;
48
+ dashArray?: string;
49
+ arrow: ChartAnnotationArrowHead;
50
+ markerSize: number;
51
+ markerStrokeWidth: number;
52
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ChartAnnotationLayer.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartAnnotationLayer.types.js","sourceRoot":"../src/","sources":["components/CommonComponents/Annotations/ChartAnnotationLayer.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ITheme } from '@fluentui/react/lib/Styling';\nimport { IChartAnnotation, ChartAnnotationArrowHead } from '../../../types/IChartAnnotation';\n\nexport interface IAnnotationPoint {\n x: number;\n y: number;\n}\n\nexport interface IAnnotationPlotRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface IChartAnnotationContext {\n /** Rectangle describing the drawable area of the chart (without margins) */\n plotRect: IAnnotationPlotRect;\n /** Size of the owning SVG element */\n svgRect: { width: number; height: number };\n /** Indicates if layout should be mirrored */\n isRtl?: boolean;\n /** Primary x scale mapping data domain to pixels */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: (value: any) => number;\n /** Primary y scale mapping data domain to pixels */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary?: (value: any) => number;\n /** Secondary y scale when present */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: (value: any) => number;\n}\n\nexport interface IChartAnnotationLayerProps {\n annotations?: IChartAnnotation[];\n context: IChartAnnotationContext;\n theme: ITheme;\n className?: string;\n}\n\nexport interface IResolvedAnnotationPosition {\n /** Final absolute position after applying layout and offsets */\n point: IAnnotationPoint;\n /** Raw anchor position before offsets (used for connectors) */\n anchor: IAnnotationPoint;\n}\n\nexport type ConnectorRenderData = {\n key: string;\n start: IAnnotationPoint;\n end: IAnnotationPoint;\n strokeColor: string;\n strokeWidth: number;\n dashArray?: string;\n arrow: ChartAnnotationArrowHead;\n markerSize: number;\n markerStrokeWidth: number;\n};\n"]}
@@ -8,6 +8,7 @@ import { formatToLocaleString } from '@fluentui/chart-utilities';
8
8
  import { createNumericXAxis, createStringXAxis, getAccessibleDataObject, createDateXAxis, XAxisTypes, YAxisType, createWrapOfXLabels, rotateXAxisLabels, Points, pointTypes, calculateLongestLabelWidth, createYAxisLabels, ChartTypes, wrapContent, getSecureProps, truncateString, tooltipOfAxislabels, DEFAULT_WRAP_WIDTH, } from '../../utilities/index';
9
9
  import { Shape } from '../Legends/index';
10
10
  import { SVGTooltipText } from '../../utilities/SVGTooltipText';
11
+ import { ChartAnnotationLayer } from './Annotations/ChartAnnotationLayer';
11
12
  var getClassNames = classNamesFunction();
12
13
  var ChartHoverCard = React.lazy(function () {
13
14
  return import('../../utilities/ChartHoverCard/ChartHoverCard').then(function (module) { return ({ default: module.ChartHoverCard }); });
@@ -302,8 +303,8 @@ var CartesianChartBase = /** @class */ (function (_super) {
302
303
  CartesianChartBase.prototype.render = function () {
303
304
  var _a, _b, _c, _d;
304
305
  var _this = this;
305
- var _e, _f, _g, _h, _j, _k, _l, _m, _o;
306
- var _p = this.props, calloutProps = _p.calloutProps, points = _p.points, chartType = _p.chartType, chartHoverProps = _p.chartHoverProps, svgFocusZoneProps = _p.svgFocusZoneProps, svgProps = _p.svgProps, culture = _p.culture, dateLocalizeOptions = _p.dateLocalizeOptions, timeFormatLocale = _p.timeFormatLocale, customDateTimeFormatter = _p.customDateTimeFormatter;
306
+ var _e, _f, _g, _h, _j, _k;
307
+ var _l = this.props, calloutProps = _l.calloutProps, points = _l.points, chartType = _l.chartType, chartHoverProps = _l.chartHoverProps, svgFocusZoneProps = _l.svgFocusZoneProps, svgProps = _l.svgProps, culture = _l.culture, dateLocalizeOptions = _l.dateLocalizeOptions, timeFormatLocale = _l.timeFormatLocale, customDateTimeFormatter = _l.customDateTimeFormatter;
307
308
  if (this.props.parentRef) {
308
309
  this._fitParentContainer();
309
310
  }
@@ -329,36 +330,24 @@ var CartesianChartBase = /** @class */ (function (_super) {
329
330
  });
330
331
  // eslint-disable-next-line @typescript-eslint/no-deprecated
331
332
  var callout = null;
333
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
334
+ var yScalePrimary;
335
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
336
+ var yScaleSecondary;
332
337
  var children = null;
333
338
  if ((this.props.enableFirstRenderOptimization && this.chartContainer) ||
334
339
  !this.props.enableFirstRenderOptimization) {
335
340
  this._isFirstRender = false;
336
- var XAxisParams = {
337
- domainNRangeValues: this.props.getDomainNRangeValues(points, this.props.getDomainMargins ? this.props.getDomainMargins(this.state.containerWidth) : this.margins, this.state.containerWidth, chartType, this._isRtl, this.props.xAxisType, this.props.barwidth, this.props.tickValues,
341
+ var XAxisParams = __assign({ domainNRangeValues: this.props.getDomainNRangeValues(points, this.props.getDomainMargins ? this.props.getDomainMargins(this.state.containerWidth) : this.margins, this.state.containerWidth, chartType, this._isRtl, this.props.xAxisType, this.props.barwidth, this.props.tickValues,
338
342
  // This is only used for Horizontal Bar Chart with Axis for y as string axis
339
- this.state.startFromX),
343
+ this.state.startFromX),
340
344
  // FIXME: In XAxisParams, containerHeight is used by HBWA to generate vertical gridlines.
341
345
  // Since the x-axis in HBWA is numeric, it typically doesn't require transformation.
342
346
  // However, if transformation props are enabled, the updated _removalValueForTextTuncate
343
347
  // will only be available in the next render, as it's set after the axis is created.
344
348
  // Solution: Delay the creation of gridlines until after the transformation has been applied,
345
349
  // or precompute the required height for transformed labels (_removalValueForTextTuncate).
346
- containerHeight: this.state.containerHeight - this._removalValueForTextTuncate,
347
- margins: this.margins,
348
- xAxisElement: this.xAxisElement,
349
- showRoundOffXTickValues: (_e = this.props.showRoundOffXTickValues) !== null && _e !== void 0 ? _e : true,
350
- xAxisCount: this.props.xAxisTickCount,
351
- xAxistickSize: this.props.xAxistickSize,
352
- tickPadding: this.props.tickPadding || this.props.showXAxisLablesTooltip ? 5 : 10,
353
- xAxisPadding: this.props.xAxisPadding,
354
- xAxisInnerPadding: this.props.xAxisInnerPadding,
355
- xAxisOuterPadding: this.props.xAxisOuterPadding,
356
- containerWidth: this.state.containerWidth,
357
- hideTickOverlap: this.props.hideTickOverlap,
358
- calcMaxLabelWidth: this._calcMaxLabelWidthWithTransform,
359
- tickStep: (_f = this.props.xAxis) === null || _f === void 0 ? void 0 : _f.tickStep,
360
- tick0: (_g = this.props.xAxis) === null || _g === void 0 ? void 0 : _g.tick0,
361
- };
350
+ containerHeight: this.state.containerHeight - this._removalValueForTextTuncate, margins: this.margins, xAxisElement: this.xAxisElement, showRoundOffXTickValues: (_e = this.props.showRoundOffXTickValues) !== null && _e !== void 0 ? _e : true, xAxisCount: this.props.xAxisTickCount, xAxistickSize: this.props.xAxistickSize, tickPadding: this.props.tickPadding || this.props.showXAxisLablesTooltip ? 5 : 10, xAxisPadding: this.props.xAxisPadding, xAxisInnerPadding: this.props.xAxisInnerPadding, xAxisOuterPadding: this.props.xAxisOuterPadding, containerWidth: this.state.containerWidth, hideTickOverlap: this.props.hideTickOverlap, calcMaxLabelWidth: this._calcMaxLabelWidthWithTransform }, this.props.xAxis);
362
351
  /**
363
352
  * These scales used for 2 purposes.
364
353
  * 1. To create x and y axis
@@ -384,36 +373,17 @@ var CartesianChartBase = /** @class */ (function (_super) {
384
373
  this._xScale = xScale;
385
374
  this._tickValues = tickValues;
386
375
  this._transformXAxisLabels();
387
- var YAxisParams = {
388
- margins: this.props.getYDomainMargins ? this.props.getYDomainMargins(this.state.containerHeight) : this.margins,
389
- containerWidth: this.state.containerWidth,
390
- containerHeight: this.state.containerHeight - this._removalValueForTextTuncate,
391
- yAxisElement: this.yAxisElement,
392
- yAxisTickFormat: this.props.yAxisTickFormat,
393
- yAxisTickCount: this.props.yAxisTickCount,
394
- yMinValue: this.props.yMinValue || 0,
395
- yMaxValue: this.props.yMaxValue || 0,
396
- tickPadding: 10,
397
- maxOfYVal: this.props.maxOfYVal,
398
- yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType),
376
+ var YAxisParams = __assign({ margins: this.props.getYDomainMargins ? this.props.getYDomainMargins(this.state.containerHeight) : this.margins, containerWidth: this.state.containerWidth, containerHeight: this.state.containerHeight - this._removalValueForTextTuncate, yAxisElement: this.yAxisElement, yAxisTickFormat: this.props.yAxisTickFormat, yAxisTickCount: this.props.yAxisTickCount, yMinValue: this.props.yMinValue || 0, yMaxValue: this.props.yMaxValue || 0, tickPadding: 10, maxOfYVal: this.props.maxOfYVal, yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType),
399
377
  // please note these padding default values must be consistent in here
400
378
  // and the parent chart(HBWA/Vertical etc..) for more details refer example
401
379
  // http://using-d3js.com/04_07_ordinal_scales.html
402
- yAxisPadding: this.props.yAxisPadding || 0,
403
- tickValues: this.props.yAxisTickValues,
404
- tickStep: (_h = this.props.yAxis) === null || _h === void 0 ? void 0 : _h.tickStep,
405
- tick0: (_j = this.props.yAxis) === null || _j === void 0 ? void 0 : _j.tick0,
406
- };
380
+ yAxisPadding: this.props.yAxisPadding || 0, tickValues: this.props.yAxisTickValues }, this.props.yAxis);
407
381
  /**
408
382
  * These scales used for 2 purposes.
409
383
  * 1. To create x and y axis
410
384
  * 2. To draw the graph.
411
385
  * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.
412
386
  */
413
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
414
- var yScalePrimary = void 0;
415
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
416
- var yScaleSecondary = void 0;
417
387
  var axisData = { yAxisDomainValues: [] };
418
388
  if (this.props.yAxisType && this.props.yAxisType === YAxisType.StringAxis) {
419
389
  yScalePrimary = this.props.createStringYAxis(YAxisParams, this.props.stringDatasetForYAxisDomain, this._isRtl, this.props.barwidth, this.props.chartType);
@@ -424,7 +394,7 @@ var CartesianChartBase = /** @class */ (function (_super) {
424
394
  // rendering the secondary y-axis. Therefore, rather than checking the secondaryYScaleOptions
425
395
  // prop to determine whether to create a secondary y-axis, it's more appropriate to check if any
426
396
  // data points are assigned to use the secondary y-scale.
427
- if ((_k = this.props) === null || _k === void 0 ? void 0 : _k.secondaryYScaleOptions) {
397
+ if ((_f = this.props) === null || _f === void 0 ? void 0 : _f.secondaryYScaleOptions) {
428
398
  var YAxisParamsSecondary = {
429
399
  margins: this.margins,
430
400
  containerWidth: this.state.containerWidth,
@@ -432,8 +402,8 @@ var CartesianChartBase = /** @class */ (function (_super) {
432
402
  yAxisElement: this.yAxisElementSecondary,
433
403
  yAxisTickFormat: this.props.yAxisTickFormat,
434
404
  yAxisTickCount: this.props.yAxisTickCount,
435
- yMinValue: ((_l = this.props.secondaryYScaleOptions) === null || _l === void 0 ? void 0 : _l.yMinValue) || 0,
436
- yMaxValue: (_o = (_m = this.props.secondaryYScaleOptions) === null || _m === void 0 ? void 0 : _m.yMaxValue) !== null && _o !== void 0 ? _o : 100,
405
+ yMinValue: ((_g = this.props.secondaryYScaleOptions) === null || _g === void 0 ? void 0 : _g.yMinValue) || 0,
406
+ yMaxValue: (_j = (_h = this.props.secondaryYScaleOptions) === null || _h === void 0 ? void 0 : _h.yMaxValue) !== null && _j !== void 0 ? _j : 100,
437
407
  tickPadding: 10,
438
408
  yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType, true),
439
409
  yAxisPadding: this.props.yAxisPadding,
@@ -487,6 +457,27 @@ var CartesianChartBase = /** @class */ (function (_super) {
487
457
  width: this.state.containerWidth,
488
458
  height: this.state.containerHeight,
489
459
  };
460
+ var startFromX = this.state.startFromX || 0;
461
+ var plotWidth = Math.max(0, svgDimensions.width - this.margins.left - this.margins.right - startFromX);
462
+ var plotHeight = Math.max(0, svgDimensions.height - this.margins.top - this.margins.bottom - this._removalValueForTextTuncate);
463
+ var plotRect = {
464
+ x: this._isRtl ? this.margins.left : this.margins.left + startFromX,
465
+ y: this.margins.top,
466
+ width: plotWidth,
467
+ height: plotHeight,
468
+ };
469
+ var annotations = (_k = this.props.annotations) !== null && _k !== void 0 ? _k : [];
470
+ var hasAnnotations = annotations.length > 0;
471
+ var annotationContext = hasAnnotations
472
+ ? {
473
+ plotRect: plotRect,
474
+ svgRect: svgDimensions,
475
+ isRtl: this._isRtl,
476
+ xScale: this._xScale,
477
+ yScalePrimary: yScalePrimary,
478
+ yScaleSecondary: yScaleSecondary,
479
+ }
480
+ : undefined;
490
481
  var focusDirection;
491
482
  if (this.props.focusZoneDirection === FocusZoneDirection.vertical) {
492
483
  focusDirection = this.props.focusZoneDirection;
@@ -599,7 +590,8 @@ var CartesianChartBase = /** @class */ (function (_super) {
599
590
  : this.margins.right / 2 + this.titleMargin, ",\n ").concat(svgDimensions.height - this.margins.bottom - this.margins.top - this.titleMargin, ")rotate(-90)"),
600
591
  className: this._classNames.axisAnnotation,
601
592
  'aria-hidden': true,
602
- }, maxWidth: yAxisTitleMaximumAllowedHeight }, commonSvgToolTipProps))))),
593
+ }, maxWidth: yAxisTitleMaximumAllowedHeight }, commonSvgToolTipProps)))),
594
+ hasAnnotations && annotationContext && (React.createElement(ChartAnnotationLayer, { annotations: annotations, context: annotationContext, theme: this.props.theme, className: this._classNames.annotationLayer }))),
603
595
  !this.props.hideLegend && (React.createElement("div", { ref: function (e) { return (_this.legendContainer = e); }, className: this._classNames.legendContainer }, this.props.legendBars)),
604
596
  callout && React.createElement(React.Suspense, { fallback: React.createElement("div", null, "Loading...") }, callout)));
605
597
  };