@fluentui/react-charting 5.23.86 → 5.23.88

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 (107) hide show
  1. package/CHANGELOG.json +67 -1
  2. package/CHANGELOG.md +26 -2
  3. package/dist/react-charting.d.ts +13 -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 +2 -0
  7. package/lib/components/AreaChart/AreaChart.base.js +3 -3
  8. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  9. package/lib/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  10. package/lib/components/CommonComponents/CartesianChart.base.js +51 -20
  11. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  12. package/lib/components/CommonComponents/CartesianChart.styles.js +1 -0
  13. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  14. package/lib/components/DeclarativeChart/DeclarativeChart.d.ts +8 -0
  15. package/lib/components/DeclarativeChart/DeclarativeChart.js +11 -7
  16. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  17. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -7
  18. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +95 -30
  19. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  20. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -3
  21. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  22. package/lib/components/HeatMapChart/HeatMapChart.types.d.ts +5 -0
  23. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  24. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +0 -2
  25. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +0 -67
  26. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  27. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +1 -3
  28. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  29. package/lib/components/LineChart/LineChart.base.js +3 -3
  30. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  31. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +7 -7
  32. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  33. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -3
  34. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  35. package/lib/utilities/SVGTooltipText.js +4 -5
  36. package/lib/utilities/SVGTooltipText.js.map +1 -1
  37. package/lib/utilities/utilities.d.ts +2 -1
  38. package/lib/utilities/utilities.js +12 -5
  39. package/lib/utilities/utilities.js.map +1 -1
  40. package/lib-amd/components/AreaChart/AreaChart.base.js +2 -2
  41. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  42. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  43. package/lib-amd/components/CommonComponents/CartesianChart.base.js +50 -20
  44. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  45. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +1 -0
  46. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  47. package/lib-amd/components/DeclarativeChart/DeclarativeChart.d.ts +8 -0
  48. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +11 -7
  49. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  50. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -7
  51. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +99 -32
  52. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  53. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -2
  54. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  55. package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +5 -0
  56. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  57. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +0 -2
  58. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -67
  59. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  60. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +2 -3
  61. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  62. package/lib-amd/components/LineChart/LineChart.base.js +2 -2
  63. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  64. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +6 -6
  65. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  66. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  67. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  68. package/lib-amd/utilities/SVGTooltipText.js +5 -5
  69. package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
  70. package/lib-amd/utilities/utilities.d.ts +2 -1
  71. package/lib-amd/utilities/utilities.js +15 -7
  72. package/lib-amd/utilities/utilities.js.map +1 -1
  73. package/lib-commonjs/components/AreaChart/AreaChart.base.js +2 -2
  74. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  75. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  76. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +50 -19
  77. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  78. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +1 -0
  79. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  80. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.d.ts +8 -0
  81. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +11 -7
  82. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  83. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -7
  84. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +99 -31
  85. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  86. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -2
  87. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  88. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.d.ts +5 -0
  89. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  90. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +0 -2
  91. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +0 -67
  92. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  93. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +1 -3
  94. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  95. package/lib-commonjs/components/LineChart/LineChart.base.js +2 -2
  96. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  97. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +6 -6
  98. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  99. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  100. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  101. package/lib-commonjs/utilities/SVGTooltipText.js +4 -5
  102. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  103. package/lib-commonjs/utilities/utilities.d.ts +2 -1
  104. package/lib-commonjs/utilities/utilities.js +16 -8
  105. package/lib-commonjs/utilities/utilities.js.map +1 -1
  106. package/package.json +5 -5
  107. package/src/components/HeatMapChart/HeatMapChart.types.ts +6 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CartesianChart.base.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAE/B,2DAAkF;AAClF,uDAAsD;AACtD,qDAAsE;AAStE,2DAAoE;AACpE,+CAkB+B;AAC/B,0CAAsD;AACtD,iEAAgE;AAGhE,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAoD,CAAC;AAC7F,IAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC;IAChC,OAAA,oDAAO,+CAA+C,MAAE,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,EAApC,CAAoC,CAAC;AAA5G,CAA4G,CAC7G,CAAC;AACF,IAAM,iBAAiB,GAAG,CAAC,kBAAU,CAAC,0BAA0B,EAAE,kBAAU,CAAC,YAAY,CAAC,CAAC;AAqB3F;;;;;GAKG;AACH;IACU,8CAAmE;IAuB3E,4BAAY,KAAmC;;QAC7C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QAlBP,8BAAwB,GAAW,EAAE,CAAC;QAQtC,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;QAG3B,oBAAc,GAAY,IAAI,CAAC;QAI/B,uBAAiB,GAAY,IAAI,CAAC;QAgInC,kCAA4B,GAAG,UACpC,SAAqB;QACrB,8DAA8D;QAC9D,MAAa,EACb,SAAiB;YAEjB,IAAI,SAAS,KAAK,kBAAU,CAAC,YAAY,EAAE,CAAC;gBAC1C,OAAO,IAAA,kCAA0B,EAC/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,EAAE,sBAAsB,GAAG,qBAAqB;qBAChE,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAoGH,yBAAC;AAAD,CAAC,AA35BD,CACU,KAAK,CAAC,SAAS,GA05BxB;AA35BY,gDAAkB","sourcesContent":["import * as React from 'react';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { Callout } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ICartesianChartStyles,\n ICartesianChartStyleProps,\n IModifiedCartesianChartProps,\n IYValueHover,\n IHorizontalBarChartWithAxisDataPoint,\n IHeatMapChartDataPoint,\n} from '../../index';\nimport { convertToLocaleString } from '../../utilities/locale-util';\nimport {\n createNumericXAxis,\n createStringXAxis,\n IAxisData,\n getAccessibleDataObject,\n createDateXAxis,\n IMargins,\n XAxisTypes,\n YAxisType,\n createWrapOfXLabels,\n rotateXAxisLabels,\n Points,\n pointTypes,\n calculateLongestLabelWidth,\n createYAxisLabels,\n ChartTypes,\n wrapContent,\n getSecureProps,\n} from '../../utilities/index';\nimport { LegendShape, Shape } from '../Legends/index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { IChart } from '../../types/index';\n\nconst getClassNames = classNamesFunction<ICartesianChartStyleProps, ICartesianChartStyles>();\nconst ChartHoverCard = React.lazy(() =>\n import('../../utilities/ChartHoverCard/ChartHoverCard').then(module => ({ default: module.ChartHoverCard })),\n);\nconst chartTypesToCheck = [ChartTypes.HorizontalBarChartWithAxis, ChartTypes.HeatMapChart];\n\nexport interface ICartesianChartState {\n containerWidth: number;\n containerHeight: number;\n _width: number;\n _height: number;\n /* To update this values using setState in render method.\n * To avoid multiple re renders, Only first time setting the value.\n */\n isRemoveValCalculated?: boolean;\n /* Used for when WrapXAxisLabels props appeared.\n * To display the total word (space separated words), Need to have more space than usual.\n * This height will get total height need to disaply total word.\n * These value need to be removed from actual svg height/graph height.\n * Defalut value is 0. And this values calculted when 'wrapXAxisLables' or 'showXAxisLablesTooltip' is true.\n */\n _removalValueForTextTuncate?: number;\n startFromX: number;\n}\n\n/**\n * Cartesian chart used for\n * 1.draw X and Y axis of the chart\n * 2.Callout\n * 3.Fit parent Continer\n */\nexport class CartesianChartBase\n extends React.Component<IModifiedCartesianChartProps, ICartesianChartState>\n implements IChart\n{\n public chartContainer: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ICartesianChartStyles>;\n private legendContainer: HTMLDivElement;\n private minLegendContainerHeight: number = 32;\n private xAxisElement: SVGSVGElement | null;\n private yAxisElement: SVGSVGElement | null;\n private yAxisElementSecondary: SVGSVGElement | null;\n private margins: IMargins;\n private idForGraph: string;\n private idForDefaultTabbableElement: string;\n private _reqID: number;\n private _isRtl: boolean = getRTL();\n private _tickValues: (string | number)[];\n private titleMargin: number;\n private _isFirstRender: boolean = true;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xScale: any;\n private isIntegralDataset: boolean = true;\n\n constructor(props: IModifiedCartesianChartProps) {\n super(props);\n this.state = {\n containerHeight: 0,\n containerWidth: 0,\n _width: this.props.width || 600,\n _height: this.props.height || 350,\n _removalValueForTextTuncate: 0,\n isRemoveValCalculated: true,\n startFromX: 0,\n };\n this.idForGraph = getId('chart_');\n this.titleMargin = 8;\n this.idForDefaultTabbableElement = getId('defaultTabbableElement_');\n /**\n * In RTL mode, Only graph will be rendered left/right. We need to provide left and right margins manually.\n * So that, in RTL, left margins becomes right margins and viceversa.\n * As graph needs to be drawn perfecty, these values consider as default values.\n * Same margins using for all other cartesian charts. Can be accessible through 'getMargins' call back method.\n */\n this.margins = {\n top: this.props.margins?.top ?? 20,\n bottom: this.props.margins?.bottom ?? 35,\n right: this._isRtl\n ? this.props.margins?.left ?? 40\n : this.props.margins?.right ?? this.props?.secondaryYScaleOptions\n ? 40\n : 20,\n left: this._isRtl\n ? this.props.margins?.right ?? this.props?.secondaryYScaleOptions\n ? 40\n : 20\n : this.props.margins?.left ?? 40,\n };\n if (this.props.xAxisTitle !== undefined && this.props.xAxisTitle !== '') {\n this.margins.bottom! = this.props.margins?.bottom ?? 55;\n }\n if (this.props.yAxisTitle !== undefined && this.props.yAxisTitle !== '') {\n this.margins.left! = this._isRtl\n ? this.props.margins?.right ?? this.props?.secondaryYAxistitle\n ? 80\n : 40\n : this.props.margins?.left ?? 60;\n this.margins.right! = this._isRtl\n ? this.props.margins?.left ?? 60\n : this.props.margins?.right ?? this.props?.secondaryYAxistitle\n ? 80\n : 40;\n }\n }\n\n public componentDidMount(): void {\n this._fitParentContainer();\n if (chartTypesToCheck.includes(this.props.chartType) && this.props.showYAxisLables && this.yAxisElement) {\n const maxYAxisLabelLength = this.calculateMaxYAxisLabelLength(\n this.props.chartType,\n this.props.points,\n this._classNames.yAxis!,\n );\n if (this.state.startFromX !== maxYAxisLabelLength) {\n this.setState({\n startFromX: maxYAxisLabelLength,\n });\n }\n } else if (this.state.startFromX !== 0) {\n this.setState({\n startFromX: 0,\n });\n }\n this.isIntegralDataset = !this.props.points.some((point: { y: number }) => {\n return point.y % 1 !== 0;\n });\n }\n\n public componentWillUnmount(): void {\n cancelAnimationFrame(this._reqID);\n }\n\n public componentDidUpdate(prevProps: IModifiedCartesianChartProps): void {\n if (prevProps.height !== this.props.height || prevProps.width !== this.props.width) {\n this._fitParentContainer();\n }\n if (\n !this.props.wrapXAxisLables &&\n this.props.rotateXAxisLables &&\n this.props.xAxisType! === XAxisTypes.StringAxis\n ) {\n const rotateLabelProps = {\n node: this.xAxisElement,\n xAxis: this._xScale,\n };\n const rotatedHeight = rotateXAxisLabels(rotateLabelProps);\n if (\n this.state.isRemoveValCalculated &&\n this.state._removalValueForTextTuncate !== rotatedHeight! + this.margins.bottom! &&\n rotatedHeight! > 0\n ) {\n this.setState({\n _removalValueForTextTuncate: rotatedHeight! + this.margins.bottom!,\n isRemoveValCalculated: false,\n });\n }\n }\n if (chartTypesToCheck.includes(this.props.chartType) && this.props.showYAxisLables && this.yAxisElement) {\n const maxYAxisLabelLength = this.calculateMaxYAxisLabelLength(\n this.props.chartType,\n this.props.points,\n this._classNames.yAxis!,\n );\n if (this.state.startFromX !== maxYAxisLabelLength) {\n this.setState({\n startFromX: maxYAxisLabelLength,\n });\n }\n } else if (this.state.startFromX !== 0) {\n this.setState({\n startFromX: 0,\n });\n }\n if (prevProps.points !== this.props.points) {\n this.isIntegralDataset = !this.props.points.some((point: { y: number }) => {\n return point.y % 1 !== 0;\n });\n }\n }\n\n public calculateMaxYAxisLabelLength = (\n chartType: ChartTypes,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any[],\n className: string,\n ): number => {\n if (chartType === ChartTypes.HeatMapChart) {\n return calculateLongestLabelWidth(\n points[0].data.map((point: IHeatMapChartDataPoint) => point.y),\n `.${className} text`,\n );\n } else {\n return calculateLongestLabelWidth(\n points.map((point: IHorizontalBarChartWithAxisDataPoint) => point.y),\n `.${className} text`,\n );\n }\n };\n\n public render(): JSX.Element {\n const {\n calloutProps,\n points,\n chartType,\n chartHoverProps,\n svgFocusZoneProps,\n svgProps,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n } = this.props;\n if (this.props.parentRef) {\n this._fitParentContainer();\n }\n\n const margin = { ...this.margins };\n if (chartTypesToCheck.includes(this.props.chartType)) {\n if (!this._isRtl) {\n margin.left! += this.state.startFromX;\n } else {\n margin.right! += this.state.startFromX;\n }\n }\n // Callback for margins to the chart\n this.props.getmargins && this.props.getmargins(margin);\n\n let callout: JSX.Element | null = null;\n\n let children = null;\n if (\n (this.props.enableFirstRenderOptimization && this.chartContainer) ||\n !this.props.enableFirstRenderOptimization\n ) {\n this._isFirstRender = false;\n const XAxisParams = {\n domainNRangeValues: this.props.getDomainNRangeValues(\n points,\n this.props.getDomainMargins ? this.props.getDomainMargins(this.state.containerWidth) : this.margins,\n this.state.containerWidth,\n chartType,\n this._isRtl,\n this.props.xAxisType,\n this.props.barwidth!,\n this.props.tickValues!,\n // This is only used for Horizontal Bar Chart with Axis for y as string axis\n this.state.startFromX,\n ),\n containerHeight: this.state.containerHeight - this.state._removalValueForTextTuncate!,\n margins: this.margins,\n xAxisElement: this.xAxisElement!,\n showRoundOffXTickValues: this.props.showRoundOffXTickValues ?? true,\n xAxisCount: this.props.xAxisTickCount,\n xAxistickSize: this.props.xAxistickSize,\n tickPadding: this.props.tickPadding || this.props.showXAxisLablesTooltip ? 5 : 10,\n xAxisPadding: this.props.xAxisPadding,\n xAxisInnerPadding: this.props.xAxisInnerPadding,\n xAxisOuterPadding: this.props.xAxisOuterPadding,\n containerWidth: this.state.containerWidth,\n hideTickOverlap:\n this.props.hideTickOverlap &&\n !this.props.rotateXAxisLables &&\n !this.props.showXAxisLablesTooltip &&\n !this.props.wrapXAxisLables,\n };\n\n const YAxisParams = {\n margins: this.props.getYDomainMargins ? this.props.getYDomainMargins(this.state.containerHeight) : this.margins,\n containerWidth: this.state.containerWidth,\n containerHeight: this.state.containerHeight - this.state._removalValueForTextTuncate!,\n yAxisElement: this.yAxisElement,\n yAxisTickFormat: this.props.yAxisTickFormat!,\n yAxisTickCount: this.props.yAxisTickCount!,\n yMinValue: this.props.yMinValue || 0,\n yMaxValue: this.props.yMaxValue || 0,\n tickPadding: 10,\n maxOfYVal: this.props.maxOfYVal,\n yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType),\n // please note these padding default values must be consistent in here\n // and the parent chart(HBWA/Vertical etc..) for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n yAxisPadding: this.props.yAxisPadding || 0,\n };\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xScale: any;\n let tickValues: (string | number)[];\n switch (this.props.xAxisType!) {\n case XAxisTypes.NumericAxis:\n ({ xScale, tickValues } = createNumericXAxis(\n XAxisParams,\n this.props.tickParams!,\n this.props.chartType,\n culture,\n ));\n break;\n case XAxisTypes.DateAxis:\n ({ xScale, tickValues } = createDateXAxis(\n XAxisParams,\n this.props.tickParams!,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n this.props.useUTC,\n ));\n break;\n case XAxisTypes.StringAxis:\n ({ xScale, tickValues } = createStringXAxis(\n XAxisParams,\n this.props.tickParams!,\n this.props.datasetForXAxisDomain!,\n culture,\n ));\n break;\n default:\n ({ xScale, tickValues } = createNumericXAxis(\n XAxisParams,\n this.props.tickParams!,\n this.props.chartType,\n culture,\n ));\n }\n this._xScale = xScale;\n this._tickValues = tickValues;\n\n /*\n * To enable wrapping of x axis tick values or to display complete x axis tick values,\n * we need to calculate how much space it needed to render the text.\n * No need to re-calculate every time the chart renders and same time need to get an update. So using setState.\n * Required space will be calculated first time chart rendering and if any width/height of chart updated.\n * */\n if (this.props.wrapXAxisLables || this.props.showXAxisLablesTooltip) {\n const wrapLabelProps = {\n node: this.xAxisElement,\n xAxis: xScale,\n showXAxisLablesTooltip: this.props.showXAxisLablesTooltip || false,\n noOfCharsToTruncate: this.props.noOfCharsToTruncate || 4,\n };\n const temp = xScale && (createWrapOfXLabels(wrapLabelProps) as number);\n // this value need to be updated for draw graph updated. So instead of using private value, using set state.\n if (this.state.isRemoveValCalculated && this.state._removalValueForTextTuncate !== temp) {\n this.setState({ _removalValueForTextTuncate: temp, isRemoveValCalculated: false });\n }\n }\n\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScalePrimary: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScaleSecondary: any;\n const axisData: IAxisData = { yAxisDomainValues: [] };\n if (this.props.yAxisType && this.props.yAxisType === YAxisType.StringAxis) {\n yScalePrimary = this.props.createStringYAxis(\n YAxisParams,\n this.props.stringDatasetForYAxisDomain!,\n this._isRtl,\n this.props.barwidth,\n );\n } else {\n // TODO: Since the scale domain values are now computed independently for both the primary and\n // secondary y-axes, the yMinValue and yMaxValue props are no longer necessary for accurately\n // rendering the secondary y-axis. Therefore, rather than checking the secondaryYScaleOptions\n // prop to determine whether to create a secondary y-axis, it's more appropriate to check if any\n // data points are assigned to use the secondary y-scale.\n if (this.props?.secondaryYScaleOptions) {\n const YAxisParamsSecondary = {\n margins: this.margins,\n containerWidth: this.state.containerWidth,\n containerHeight: this.state.containerHeight - this.state._removalValueForTextTuncate!,\n yAxisElement: this.yAxisElementSecondary,\n yAxisTickFormat: this.props.yAxisTickFormat!,\n yAxisTickCount: this.props.yAxisTickCount!,\n yMinValue: this.props.secondaryYScaleOptions?.yMinValue || 0,\n yMaxValue: this.props.secondaryYScaleOptions?.yMaxValue ?? 100,\n tickPadding: 10,\n yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType, true),\n yAxisPadding: this.props.yAxisPadding,\n };\n\n yScaleSecondary = this.props.createYAxis(\n YAxisParamsSecondary,\n this._isRtl,\n axisData,\n this.isIntegralDataset,\n true,\n this.props.supportNegativeData!,\n this.props.roundedTicks!,\n );\n }\n yScalePrimary = this.props.createYAxis(\n YAxisParams,\n this._isRtl,\n axisData,\n this.isIntegralDataset,\n false,\n this.props.supportNegativeData!,\n this.props.roundedTicks!,\n );\n }\n\n /*\n * To create y axis tick values by if specified\n truncating the rest of the text and showing elipsis\n or showing the whole string,\n * */\n chartTypesToCheck.includes(this.props.chartType) &&\n yScalePrimary &&\n createYAxisLabels(\n this.yAxisElement,\n yScalePrimary,\n this.props.noOfCharsToTruncate || 4,\n this.props.showYAxisLablesTooltip || false,\n this._isRtl,\n );\n\n this.props.getAxisData && this.props.getAxisData(axisData);\n // Callback function for chart, returns axis\n this._getData(xScale, yScalePrimary, yScaleSecondary);\n\n children = this.props.children({\n ...this.state,\n xScale,\n yScalePrimary,\n yScaleSecondary,\n });\n\n if (!this.props.hideTooltip && calloutProps!.isCalloutVisible) {\n callout = this._generateCallout(calloutProps, chartHoverProps);\n }\n }\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.state._width,\n height: this.state._height,\n className: this.props.className,\n isRtl: this._isRtl,\n enableReflow: this.props.enableReflow,\n });\n\n const svgDimensions = {\n width: this.state.containerWidth,\n height: this.state.containerHeight,\n };\n\n let focusDirection;\n if (this.props.focusZoneDirection === FocusZoneDirection.vertical) {\n focusDirection = this.props.focusZoneDirection;\n } else if (this.props.focusZoneDirection) {\n focusDirection = this.props.focusZoneDirection;\n } else {\n focusDirection = FocusZoneDirection.horizontal;\n }\n\n const xAxisTitleMaximumAllowedWidth =\n svgDimensions.width - this.margins.left! - this.margins.right! - this.state.startFromX!;\n const yAxisTitleMaximumAllowedHeight =\n svgDimensions.height -\n this.margins.bottom! -\n this.margins.top! -\n this.state._removalValueForTextTuncate! -\n this.titleMargin;\n /**\n * We have use the {@link defaultTabbableElement } to fix\n * the Focus not landing on chart while tabbing, instead goes to legend.\n * This issue is observed in Area, line chart after performance optimization done in the PR {@link https://github.com/microsoft/fluentui/pull/27721 }\n * This issue is observed in Bar charts after the changes done by FocusZone team in the PR: {@link https://github.com/microsoft/fluentui/pull/24175 }\n * The issue in Bar Charts(VB and VSB) is due to a {@link FocusZone } update where previously an event listener was\n * attached on keydown to the window, so that whenever the tab key is pressed all outer FocusZone's\n * tab-indexes are updated (an outer FocusZone is a FocusZone that is not within another one).\n * But now after the above PR : they are attaching the\n * listeners to the FocusZone elements instead of the window. So in the first render cycle in Bar charts\n * bars are not created as in the first render cycle the size of the chart container is not known( or is 0)\n * which creates bars of height 0 so instead we do not create any bars and instead return empty fragments.\n *\n * We have tried 2 Approaches to fix the issue:\n * 1. Using the {@link elementRef} property of FocusZone where we dispatch event for tab keydown\n * after the second render cycle which triggers an update of the tab index in FocusZone.\n * But this is a hacky solution and not a proper fix and also elementRef is deprecated.\n * 2. Using the default tabbable element to fix the issue.\n */\n\n return (\n <div\n id={this.idForGraph}\n className={this._classNames.root}\n ref={(rootElem: HTMLDivElement) => (this.chartContainer = rootElem)}\n onMouseLeave={this._onChartLeave}\n >\n {!this._isFirstRender && <div id={this.idForDefaultTabbableElement} />}\n <FocusZone\n direction={focusDirection}\n className={this._classNames.chartWrapper}\n defaultTabbableElement={`#${this.idForDefaultTabbableElement}`}\n {...svgFocusZoneProps}\n >\n {this._isFirstRender && <div id={this.idForDefaultTabbableElement} />}\n <svg\n width={svgDimensions.width}\n height={svgDimensions.height}\n role=\"region\"\n aria-label={this._getChartDescription()}\n style={{ display: 'block' }}\n {...getSecureProps(svgProps)}\n >\n <g\n ref={(e: SVGSVGElement | null) => {\n this.xAxisElement = e;\n }}\n id={`xAxisGElement${this.idForGraph}`}\n // To add wrap of x axis lables feature, need to remove word height from svg height.\n transform={`translate(0, ${\n svgDimensions.height - this.margins.bottom! - this.state._removalValueForTextTuncate!\n })`}\n className={this._classNames.xAxis}\n />\n {this.props.xAxisTitle !== undefined && this.props.xAxisTitle !== '' && (\n <SVGTooltipText\n content={this.props.xAxisTitle}\n textProps={{\n x: this.margins.left! + this.state.startFromX + xAxisTitleMaximumAllowedWidth / 2,\n y: svgDimensions.height - this.titleMargin,\n className: this._classNames.axisTitle!,\n textAnchor: 'middle',\n 'aria-hidden': true,\n }}\n maxWidth={xAxisTitleMaximumAllowedWidth}\n wrapContent={wrapContent}\n theme={this.props.theme}\n showBackground={true}\n />\n )}\n <g\n ref={(e: SVGSVGElement | null) => {\n this.yAxisElement = e;\n }}\n id={`yAxisGElement${this.idForGraph}`}\n transform={`translate(${\n this._isRtl\n ? svgDimensions.width - this.margins.right! - this.state.startFromX\n : this.margins.left! + this.state.startFromX\n }, 0)`}\n className={this._classNames.yAxis}\n />\n {this.props.secondaryYScaleOptions && (\n <g>\n <g\n ref={(e: SVGSVGElement | null) => {\n this.yAxisElementSecondary = e;\n }}\n id={`yAxisGElementSecondary${this.idForGraph}`}\n transform={`translate(${\n this._isRtl\n ? this.margins.left! + this.state.startFromX\n : svgDimensions.width - this.margins.right! - this.state.startFromX\n }, 0)`}\n className={this._classNames.yAxis}\n />\n {this.props.secondaryYAxistitle !== undefined && this.props.secondaryYAxistitle !== '' && (\n <SVGTooltipText\n content={this.props.secondaryYAxistitle}\n textProps={{\n x:\n (yAxisTitleMaximumAllowedHeight - this.margins.bottom!) / 2 +\n this.state._removalValueForTextTuncate!,\n y: this._isRtl\n ? this.state.startFromX - this.titleMargin\n : svgDimensions.width - this.margins.right!,\n textAnchor: 'middle',\n transform: `translate(${\n this._isRtl\n ? this.margins.right! / 2 - this.titleMargin\n : this.margins.right! / 2 + this.titleMargin\n },\n ${svgDimensions.height - this.margins.bottom! - this.margins.top! - this.titleMargin})rotate(-90)`,\n className: this._classNames.axisTitle!,\n 'aria-hidden': true,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n wrapContent={wrapContent}\n theme={this.props.theme}\n showBackground={true}\n />\n )}\n </g>\n )}\n {children}\n {this.props.yAxisTitle !== undefined && this.props.yAxisTitle !== '' && (\n <SVGTooltipText\n content={this.props.yAxisTitle}\n textProps={{\n x:\n (yAxisTitleMaximumAllowedHeight - this.margins.bottom!) / 2 +\n this.state._removalValueForTextTuncate!,\n y: this._isRtl\n ? svgDimensions.width - this.margins.right! / 2 + this.titleMargin\n : this.margins.left! / 2 + this.state.startFromX - this.titleMargin,\n textAnchor: 'middle',\n transform: `translate(0,\n ${svgDimensions.height - this.margins.bottom! - this.margins.top! - this.titleMargin})rotate(-90)`,\n className: this._classNames.axisTitle!,\n 'aria-hidden': true,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n wrapContent={wrapContent}\n theme={this.props.theme}\n showBackground={true}\n />\n )}\n </svg>\n </FocusZone>\n\n {!this.props.hideLegend && (\n <div ref={(e: HTMLDivElement) => (this.legendContainer = e)} className={this._classNames.legendContainer}>\n {this.props.legendBars}\n </div>\n )}\n {/** The callout is used for narration, so keep it mounted on the DOM */}\n {callout && <React.Suspense fallback={<div>Loading...</div>}>{callout}</React.Suspense>}\n </div>\n );\n }\n\n /**\n * Dedicated function to return the Callout JSX Element , which can further be used to only call this when\n * only the calloutprops and charthover props changes.\n * @param calloutProps\n * @param chartHoverProps\n * @returns\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _generateCallout(calloutProps: any, chartHoverProps: any): JSX.Element {\n return (\n <Callout\n hidden={!(!this.props.hideTooltip && calloutProps!.isCalloutVisible)}\n /** Keep the callout updated with details of focused/hovered chart element */\n shouldUpdateWhenHidden={true}\n {...calloutProps}\n >\n {/** Given custom callout, then it will render */}\n {this.props.customizedCallout && this.props.customizedCallout}\n {/** single x point its corresponding y points of all the bars/lines in chart will render in callout */}\n {!this.props.customizedCallout && this.props.isCalloutForStack && this._multiValueCallout(calloutProps)}\n {/** single x point its corresponding y point of single line/bar in the chart will render in callout */}\n {!this.props.customizedCallout && !this.props.isCalloutForStack && (\n <ChartHoverCard\n XValue={calloutProps.XValue}\n Legend={calloutProps.legend!}\n YValue={calloutProps.YValue!}\n color={calloutProps.color!}\n culture={this.props.culture}\n {...chartHoverProps}\n />\n )}\n </Callout>\n );\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 width: this.state._width,\n height: this.state._height,\n className: this.props.className,\n isRtl: this._isRtl,\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 /**\n * When screen resizes, along with screen, chart also auto adjusted.\n * This method used to adjust height and width of the charts.\n */\n private _fitParentContainer(): void {\n const { containerWidth, containerHeight } = this.state;\n this._reqID = requestAnimationFrame(() => {\n let legendContainerHeight;\n if (this.props.hideLegend) {\n // If there is no legend, need not to allocate some space from total chart space.\n legendContainerHeight = 0;\n } else {\n const legendContainerComputedStyles = this.legendContainer && getComputedStyle(this.legendContainer);\n legendContainerHeight =\n ((this.legendContainer && this.legendContainer.getBoundingClientRect().height) ||\n this.minLegendContainerHeight) +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginTop) || '0') +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginBottom) || '0');\n }\n if (this.props.parentRef || this.chartContainer) {\n const container = this.props.parentRef ? this.props.parentRef : this.chartContainer;\n const currentContainerWidth =\n this.props.enableReflow && !this._isFirstRender\n ? Math.max(container.getBoundingClientRect().width, this._calculateChartMinWidth())\n : container.getBoundingClientRect().width;\n const currentContainerHeight =\n container.getBoundingClientRect().height > legendContainerHeight\n ? container.getBoundingClientRect().height\n : 350;\n const shouldResize =\n containerWidth !== currentContainerWidth ||\n containerHeight !== currentContainerHeight - legendContainerHeight;\n if (shouldResize) {\n this.setState({\n containerWidth: currentContainerWidth,\n containerHeight: currentContainerHeight - legendContainerHeight,\n });\n }\n }\n });\n }\n\n // Call back to the chart.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getData = (xScale: any, yScalePrimary: any, yScaleSecondary: any) => {\n this.props.getGraphData &&\n this.props.getGraphData(\n xScale,\n yScalePrimary,\n this.state.containerHeight - this.state._removalValueForTextTuncate!,\n this.state.containerWidth,\n this.xAxisElement,\n this.yAxisElement,\n yScaleSecondary,\n );\n };\n\n private _onChartLeave = (): void => {\n this.props.onChartMouseLeave && this.props.onChartMouseLeave();\n };\n\n private _calculateChartMinWidth = (): number => {\n let labelWidth = 10; // Total padding on the left and right sides of the label\n\n // Case: rotated labels\n if (\n !this.props.wrapXAxisLables &&\n this.props.rotateXAxisLables &&\n this.props.xAxisType! === XAxisTypes.StringAxis\n ) {\n const longestLabelWidth = calculateLongestLabelWidth(this._tickValues, `.${this._classNames.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth * Math.cos(Math.PI / 4));\n }\n // Case: truncated labels\n else if (this.props.showXAxisLablesTooltip) {\n const tickValues = this._tickValues.map(val => {\n const numChars = this.props.noOfCharsToTruncate || 4;\n return val.toString().length > numChars ? `${val.toString().slice(0, numChars)}...` : val;\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(tickValues, `.${this._classNames.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth);\n }\n // Case: wrapped labels\n else if (this.props.wrapXAxisLables) {\n const words: string[] = [];\n this._tickValues.forEach((val: string) => {\n words.push(...val.toString().split(/\\s+/));\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(words, `.${this._classNames.xAxis} text`);\n labelWidth += Math.max(Math.ceil(longestLabelWidth), 10);\n }\n // Default case\n else {\n const longestLabelWidth = calculateLongestLabelWidth(this._tickValues, `.${this._classNames.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth);\n }\n\n let minChartWidth = this.margins.left! + this.margins.right! + labelWidth * (this._tickValues.length - 1);\n\n if (\n [ChartTypes.GroupedVerticalBarChart, ChartTypes.VerticalBarChart, ChartTypes.VerticalStackedBarChart].includes(\n this.props.chartType,\n )\n ) {\n const minDomainMargin = 8;\n minChartWidth += minDomainMargin * 2;\n }\n\n return minChartWidth;\n };\n\n private _getChartDescription = (): string => {\n return (\n (this.props.chartTitle || 'Chart. ') +\n this._getAxisTitle('X', this.props.xAxisTitle, this.props.xAxisType) +\n this._getAxisTitle('Y', this.props.yAxisTitle, this.props.yAxisType || YAxisType.NumericAxis) +\n (this.props.secondaryYScaleOptions\n ? this._getAxisTitle('secondary Y', this.props.secondaryYAxistitle, YAxisType.NumericAxis)\n : '')\n );\n };\n\n private _getAxisTitle = (\n axisLabel: string,\n axisTitle: string | undefined,\n axisType: XAxisTypes | YAxisType,\n ): string => {\n return (\n `The ${axisLabel} axis displays ` +\n (axisTitle ||\n (axisType === XAxisTypes.StringAxis || axisType === YAxisType.StringAxis\n ? 'categories'\n : axisType === XAxisTypes.DateAxis || axisType === YAxisType.DateAxis\n ? 'time'\n : 'values')) +\n '. '\n );\n };\n}\n"]}
1
+ {"version":3,"file":"CartesianChart.base.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAE/B,2DAAkF;AAClF,uDAAsD;AACtD,qDAAsE;AACtE,6CAAkD;AASlD,2DAAoE;AACp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React from 'react';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { Callout } from '@fluentui/react/lib/Callout';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { select as d3Select } from 'd3-selection';\nimport {\n ICartesianChartStyles,\n ICartesianChartStyleProps,\n IModifiedCartesianChartProps,\n IYValueHover,\n IHorizontalBarChartWithAxisDataPoint,\n IHeatMapChartDataPoint,\n} from '../../index';\nimport { convertToLocaleString } from '../../utilities/locale-util';\nimport {\n createNumericXAxis,\n createStringXAxis,\n IAxisData,\n getAccessibleDataObject,\n createDateXAxis,\n IMargins,\n XAxisTypes,\n YAxisType,\n createWrapOfXLabels,\n rotateXAxisLabels,\n Points,\n pointTypes,\n calculateLongestLabelWidth,\n createYAxisLabels,\n ChartTypes,\n wrapContent,\n getSecureProps,\n truncateString,\n tooltipOfAxislabels,\n} from '../../utilities/index';\nimport { LegendShape, Shape } from '../Legends/index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { IChart } from '../../types/index';\n\nconst getClassNames = classNamesFunction<ICartesianChartStyleProps, ICartesianChartStyles>();\nconst ChartHoverCard = React.lazy(() =>\n import('../../utilities/ChartHoverCard/ChartHoverCard').then(module => ({ default: module.ChartHoverCard })),\n);\nconst chartTypesToCheck = [ChartTypes.HorizontalBarChartWithAxis, ChartTypes.HeatMapChart];\n\nexport interface ICartesianChartState {\n containerWidth: number;\n containerHeight: number;\n _width: number;\n _height: number;\n /* To update this values using setState in render method.\n * To avoid multiple re renders, Only first time setting the value.\n */\n isRemoveValCalculated?: boolean;\n /* Used for when WrapXAxisLabels props appeared.\n * To display the total word (space separated words), Need to have more space than usual.\n * This height will get total height need to disaply total word.\n * These value need to be removed from actual svg height/graph height.\n * Defalut value is 0. And this values calculted when 'wrapXAxisLables' or 'showXAxisLablesTooltip' is true.\n */\n _removalValueForTextTuncate?: number;\n startFromX: number;\n}\n\n/**\n * Cartesian chart used for\n * 1.draw X and Y axis of the chart\n * 2.Callout\n * 3.Fit parent Continer\n */\nexport class CartesianChartBase\n extends React.Component<IModifiedCartesianChartProps, ICartesianChartState>\n implements IChart\n{\n public chartContainer: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ICartesianChartStyles>;\n private legendContainer: HTMLDivElement;\n private minLegendContainerHeight: number = 32;\n private xAxisElement: SVGSVGElement | null;\n private yAxisElement: SVGSVGElement | null;\n private yAxisElementSecondary: SVGSVGElement | null;\n private margins: IMargins;\n private idForGraph: string;\n private idForDefaultTabbableElement: string;\n private _reqID: number;\n private _isRtl: boolean = getRTL();\n private _tickValues: (string | number)[];\n private titleMargin: number;\n private _isFirstRender: boolean = true;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xScale: any;\n private isIntegralDataset: boolean = true;\n private _tooltipId: string;\n\n constructor(props: IModifiedCartesianChartProps) {\n super(props);\n this.state = {\n containerHeight: 0,\n containerWidth: 0,\n _width: this.props.width || 600,\n _height: this.props.height || 350,\n _removalValueForTextTuncate: 0,\n isRemoveValCalculated: true,\n startFromX: 0,\n };\n this.idForGraph = getId('chart_');\n this.titleMargin = 8;\n this.idForDefaultTabbableElement = getId('defaultTabbableElement_');\n this._tooltipId = getId('tooltip_');\n /**\n * In RTL mode, Only graph will be rendered left/right. We need to provide left and right margins manually.\n * So that, in RTL, left margins becomes right margins and viceversa.\n * As graph needs to be drawn perfecty, these values consider as default values.\n * Same margins using for all other cartesian charts. Can be accessible through 'getMargins' call back method.\n */\n this.margins = {\n top: this.props.margins?.top ?? 20,\n bottom: this.props.margins?.bottom ?? 35,\n right: this._isRtl\n ? this.props.margins?.left ?? 40\n : this.props.margins?.right ?? this.props?.secondaryYScaleOptions\n ? 40\n : 20,\n left: this._isRtl\n ? this.props.margins?.right ?? this.props?.secondaryYScaleOptions\n ? 40\n : 20\n : this.props.margins?.left ?? 40,\n };\n if (this.props.xAxisTitle !== undefined && this.props.xAxisTitle !== '') {\n this.margins.bottom! = this.props.margins?.bottom ?? 55;\n }\n if (this.props.yAxisTitle !== undefined && this.props.yAxisTitle !== '') {\n this.margins.left! = this._isRtl\n ? this.props.margins?.right ?? this.props?.secondaryYAxistitle\n ? 80\n : 40\n : this.props.margins?.left ?? 60;\n this.margins.right! = this._isRtl\n ? this.props.margins?.left ?? 60\n : this.props.margins?.right ?? this.props?.secondaryYAxistitle\n ? 80\n : 40;\n }\n }\n\n public componentDidMount(): void {\n this._fitParentContainer();\n if (chartTypesToCheck.includes(this.props.chartType) && this.props.showYAxisLables && this.yAxisElement) {\n const maxYAxisLabelLength = this.calculateMaxYAxisLabelLength(\n this.props.chartType,\n this.props.points,\n this._classNames.yAxis!,\n );\n if (this.state.startFromX !== maxYAxisLabelLength) {\n this.setState({\n startFromX: maxYAxisLabelLength,\n });\n }\n } else if (this.state.startFromX !== 0) {\n this.setState({\n startFromX: 0,\n });\n }\n this.isIntegralDataset = !this.props.points.some((point: { y: number }) => {\n return point.y % 1 !== 0;\n });\n }\n\n public componentWillUnmount(): void {\n cancelAnimationFrame(this._reqID);\n }\n\n public componentDidUpdate(prevProps: IModifiedCartesianChartProps): void {\n if (prevProps.height !== this.props.height || prevProps.width !== this.props.width) {\n this._fitParentContainer();\n }\n if (\n !this.props.wrapXAxisLables &&\n this.props.rotateXAxisLables &&\n this.props.xAxisType! === XAxisTypes.StringAxis\n ) {\n const rotateLabelProps = {\n node: this.xAxisElement,\n xAxis: this._xScale,\n };\n const rotatedHeight = rotateXAxisLabels(rotateLabelProps);\n if (\n this.state.isRemoveValCalculated &&\n this.state._removalValueForTextTuncate !== rotatedHeight! + this.margins.bottom! &&\n rotatedHeight! > 0\n ) {\n this.setState({\n _removalValueForTextTuncate: rotatedHeight! + this.margins.bottom!,\n isRemoveValCalculated: false,\n });\n }\n }\n if (chartTypesToCheck.includes(this.props.chartType) && this.props.showYAxisLables && this.yAxisElement) {\n const maxYAxisLabelLength = this.calculateMaxYAxisLabelLength(\n this.props.chartType,\n this.props.points,\n this._classNames.yAxis!,\n );\n if (this.state.startFromX !== maxYAxisLabelLength) {\n this.setState({\n startFromX: maxYAxisLabelLength,\n });\n }\n } else if (this.state.startFromX !== 0) {\n this.setState({\n startFromX: 0,\n });\n }\n if (prevProps.points !== this.props.points) {\n this.isIntegralDataset = !this.props.points.some((point: { y: number }) => {\n return point.y % 1 !== 0;\n });\n }\n }\n\n public calculateMaxYAxisLabelLength = (\n chartType: ChartTypes,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any[],\n className: string,\n ): number => {\n const formatTickLabel = (str: string) => {\n if (this.props.showYAxisLablesTooltip) {\n return truncateString(str, this.props.noOfCharsToTruncate || 4);\n }\n\n return str;\n };\n\n if (chartType === ChartTypes.HeatMapChart) {\n return calculateLongestLabelWidth(\n points[0].data.map((point: IHeatMapChartDataPoint) => formatTickLabel(`${point.y}`)),\n `.${className} text`,\n );\n } else {\n return calculateLongestLabelWidth(\n points.map((point: IHorizontalBarChartWithAxisDataPoint) => formatTickLabel(`${point.y}`)),\n `.${className} text`,\n );\n }\n };\n\n public render(): JSX.Element {\n const {\n calloutProps,\n points,\n chartType,\n chartHoverProps,\n svgFocusZoneProps,\n svgProps,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n } = this.props;\n if (this.props.parentRef) {\n this._fitParentContainer();\n }\n\n const margin = { ...this.margins };\n if (chartTypesToCheck.includes(this.props.chartType)) {\n if (!this._isRtl) {\n margin.left! += this.state.startFromX;\n } else {\n margin.right! += this.state.startFromX;\n }\n }\n // Callback for margins to the chart\n this.props.getmargins && this.props.getmargins(margin);\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.state._width,\n height: this.state._height,\n className: this.props.className,\n isRtl: this._isRtl,\n enableReflow: this.props.enableReflow,\n });\n\n let callout: JSX.Element | null = null;\n\n let children = null;\n if (\n (this.props.enableFirstRenderOptimization && this.chartContainer) ||\n !this.props.enableFirstRenderOptimization\n ) {\n this._isFirstRender = false;\n const XAxisParams = {\n domainNRangeValues: this.props.getDomainNRangeValues(\n points,\n this.props.getDomainMargins ? this.props.getDomainMargins(this.state.containerWidth) : this.margins,\n this.state.containerWidth,\n chartType,\n this._isRtl,\n this.props.xAxisType,\n this.props.barwidth!,\n this.props.tickValues!,\n // This is only used for Horizontal Bar Chart with Axis for y as string axis\n this.state.startFromX,\n ),\n containerHeight: this.state.containerHeight - this.state._removalValueForTextTuncate!,\n margins: this.margins,\n xAxisElement: this.xAxisElement!,\n showRoundOffXTickValues: this.props.showRoundOffXTickValues ?? true,\n xAxisCount: this.props.xAxisTickCount,\n xAxistickSize: this.props.xAxistickSize,\n tickPadding: this.props.tickPadding || this.props.showXAxisLablesTooltip ? 5 : 10,\n xAxisPadding: this.props.xAxisPadding,\n xAxisInnerPadding: this.props.xAxisInnerPadding,\n xAxisOuterPadding: this.props.xAxisOuterPadding,\n containerWidth: this.state.containerWidth,\n hideTickOverlap:\n this.props.hideTickOverlap &&\n !this.props.rotateXAxisLables &&\n !this.props.showXAxisLablesTooltip &&\n !this.props.wrapXAxisLables,\n };\n\n const YAxisParams = {\n margins: this.props.getYDomainMargins ? this.props.getYDomainMargins(this.state.containerHeight) : this.margins,\n containerWidth: this.state.containerWidth,\n containerHeight: this.state.containerHeight - this.state._removalValueForTextTuncate!,\n yAxisElement: this.yAxisElement,\n yAxisTickFormat: this.props.yAxisTickFormat!,\n yAxisTickCount: this.props.yAxisTickCount!,\n yMinValue: this.props.yMinValue || 0,\n yMaxValue: this.props.yMaxValue || 0,\n tickPadding: this.props.showYAxisLablesTooltip ? 15 : 10,\n maxOfYVal: this.props.maxOfYVal,\n yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType),\n // please note these padding default values must be consistent in here\n // and the parent chart(HBWA/Vertical etc..) for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n yAxisPadding: this.props.yAxisPadding || 0,\n };\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xScale: any;\n let tickValues: (string | number)[];\n switch (this.props.xAxisType!) {\n case XAxisTypes.NumericAxis:\n ({ xScale, tickValues } = createNumericXAxis(\n XAxisParams,\n this.props.tickParams!,\n this.props.chartType,\n culture,\n ));\n break;\n case XAxisTypes.DateAxis:\n ({ xScale, tickValues } = createDateXAxis(\n XAxisParams,\n this.props.tickParams!,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n this.props.useUTC,\n ));\n break;\n case XAxisTypes.StringAxis:\n ({ xScale, tickValues } = createStringXAxis(\n XAxisParams,\n this.props.tickParams!,\n this.props.datasetForXAxisDomain!,\n culture,\n ));\n break;\n default:\n ({ xScale, tickValues } = createNumericXAxis(\n XAxisParams,\n this.props.tickParams!,\n this.props.chartType,\n culture,\n ));\n }\n this._xScale = xScale;\n this._tickValues = tickValues;\n\n /*\n * To enable wrapping of x axis tick values or to display complete x axis tick values,\n * we need to calculate how much space it needed to render the text.\n * No need to re-calculate every time the chart renders and same time need to get an update. So using setState.\n * Required space will be calculated first time chart rendering and if any width/height of chart updated.\n * */\n if (this.props.wrapXAxisLables || this.props.showXAxisLablesTooltip) {\n const wrapLabelProps = {\n node: this.xAxisElement,\n xAxis: xScale,\n showXAxisLablesTooltip: this.props.showXAxisLablesTooltip || false,\n noOfCharsToTruncate: this.props.noOfCharsToTruncate || 4,\n };\n const temp = xScale && (createWrapOfXLabels(wrapLabelProps) as number);\n // this value need to be updated for draw graph updated. So instead of using private value, using set state.\n if (this.state.isRemoveValCalculated && this.state._removalValueForTextTuncate !== temp) {\n this.setState({ _removalValueForTextTuncate: temp, isRemoveValCalculated: false });\n }\n }\n\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScalePrimary: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScaleSecondary: any;\n const axisData: IAxisData = { yAxisDomainValues: [] };\n if (this.props.yAxisType && this.props.yAxisType === YAxisType.StringAxis) {\n yScalePrimary = this.props.createStringYAxis(\n YAxisParams,\n this.props.stringDatasetForYAxisDomain!,\n this._isRtl,\n this.props.barwidth,\n );\n } else {\n // TODO: Since the scale domain values are now computed independently for both the primary and\n // secondary y-axes, the yMinValue and yMaxValue props are no longer necessary for accurately\n // rendering the secondary y-axis. Therefore, rather than checking the secondaryYScaleOptions\n // prop to determine whether to create a secondary y-axis, it's more appropriate to check if any\n // data points are assigned to use the secondary y-scale.\n if (this.props?.secondaryYScaleOptions) {\n const YAxisParamsSecondary = {\n margins: this.margins,\n containerWidth: this.state.containerWidth,\n containerHeight: this.state.containerHeight - this.state._removalValueForTextTuncate!,\n yAxisElement: this.yAxisElementSecondary,\n yAxisTickFormat: this.props.yAxisTickFormat!,\n yAxisTickCount: this.props.yAxisTickCount!,\n yMinValue: this.props.secondaryYScaleOptions?.yMinValue || 0,\n yMaxValue: this.props.secondaryYScaleOptions?.yMaxValue ?? 100,\n tickPadding: 10,\n yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType, true),\n yAxisPadding: this.props.yAxisPadding,\n };\n\n yScaleSecondary = this.props.createYAxis(\n YAxisParamsSecondary,\n this._isRtl,\n axisData,\n this.isIntegralDataset,\n true,\n this.props.supportNegativeData!,\n this.props.roundedTicks!,\n );\n }\n yScalePrimary = this.props.createYAxis(\n YAxisParams,\n this._isRtl,\n axisData,\n this.isIntegralDataset,\n false,\n this.props.supportNegativeData!,\n this.props.roundedTicks!,\n );\n }\n\n if (chartTypesToCheck.includes(this.props.chartType)) {\n // To create y axis tick values by if specified truncating the rest of the text\n // and showing elipsis or showing the whole string,\n yScalePrimary &&\n createYAxisLabels(\n this.yAxisElement,\n yScalePrimary,\n this.props.noOfCharsToTruncate || 4,\n this.props.showYAxisLablesTooltip || false,\n this._isRtl,\n );\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)\n if (!this.props.showYAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at y axis labels.\n if (this.props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(this.yAxisElement).call(yScalePrimary);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n const ytooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n axis: yAxisElement,\n };\n yAxisElement && tooltipOfAxislabels(ytooltipProps);\n }\n }\n\n this.props.getAxisData && this.props.getAxisData(axisData);\n // Callback function for chart, returns axis\n this._getData(xScale, yScalePrimary, yScaleSecondary);\n\n children = this.props.children({\n ...this.state,\n xScale,\n yScalePrimary,\n yScaleSecondary,\n });\n\n if (!this.props.hideTooltip && calloutProps!.isCalloutVisible) {\n callout = this._generateCallout(calloutProps, chartHoverProps);\n }\n }\n\n const svgDimensions = {\n width: this.state.containerWidth,\n height: this.state.containerHeight,\n };\n\n let focusDirection;\n if (this.props.focusZoneDirection === FocusZoneDirection.vertical) {\n focusDirection = this.props.focusZoneDirection;\n } else if (this.props.focusZoneDirection) {\n focusDirection = this.props.focusZoneDirection;\n } else {\n focusDirection = FocusZoneDirection.horizontal;\n }\n\n const xAxisTitleMaximumAllowedWidth =\n svgDimensions.width - this.margins.left! - this.margins.right! - this.state.startFromX!;\n const yAxisTitleMaximumAllowedHeight =\n svgDimensions.height -\n this.margins.bottom! -\n this.margins.top! -\n this.state._removalValueForTextTuncate! -\n this.titleMargin;\n /**\n * We have use the {@link defaultTabbableElement } to fix\n * the Focus not landing on chart while tabbing, instead goes to legend.\n * This issue is observed in Area, line chart after performance optimization done in the PR {@link https://github.com/microsoft/fluentui/pull/27721 }\n * This issue is observed in Bar charts after the changes done by FocusZone team in the PR: {@link https://github.com/microsoft/fluentui/pull/24175 }\n * The issue in Bar Charts(VB and VSB) is due to a {@link FocusZone } update where previously an event listener was\n * attached on keydown to the window, so that whenever the tab key is pressed all outer FocusZone's\n * tab-indexes are updated (an outer FocusZone is a FocusZone that is not within another one).\n * But now after the above PR : they are attaching the\n * listeners to the FocusZone elements instead of the window. So in the first render cycle in Bar charts\n * bars are not created as in the first render cycle the size of the chart container is not known( or is 0)\n * which creates bars of height 0 so instead we do not create any bars and instead return empty fragments.\n *\n * We have tried 2 Approaches to fix the issue:\n * 1. Using the {@link elementRef} property of FocusZone where we dispatch event for tab keydown\n * after the second render cycle which triggers an update of the tab index in FocusZone.\n * But this is a hacky solution and not a proper fix and also elementRef is deprecated.\n * 2. Using the default tabbable element to fix the issue.\n */\n\n return (\n <div\n id={this.idForGraph}\n className={this._classNames.root}\n ref={(rootElem: HTMLDivElement) => (this.chartContainer = rootElem)}\n onMouseLeave={this._onChartLeave}\n >\n {!this._isFirstRender && <div id={this.idForDefaultTabbableElement} />}\n <FocusZone\n direction={focusDirection}\n className={this._classNames.chartWrapper}\n defaultTabbableElement={`#${this.idForDefaultTabbableElement}`}\n {...svgFocusZoneProps}\n >\n {this._isFirstRender && <div id={this.idForDefaultTabbableElement} />}\n <svg\n width={svgDimensions.width}\n height={svgDimensions.height}\n role=\"region\"\n aria-label={this._getChartDescription()}\n style={{ display: 'block' }}\n {...getSecureProps(svgProps)}\n >\n <g\n ref={(e: SVGSVGElement | null) => {\n this.xAxisElement = e;\n }}\n id={`xAxisGElement${this.idForGraph}`}\n // To add wrap of x axis lables feature, need to remove word height from svg height.\n transform={`translate(0, ${\n svgDimensions.height - this.margins.bottom! - this.state._removalValueForTextTuncate!\n })`}\n className={this._classNames.xAxis}\n />\n {this.props.xAxisTitle !== undefined && this.props.xAxisTitle !== '' && (\n <SVGTooltipText\n content={this.props.xAxisTitle}\n textProps={{\n x: this.margins.left! + this.state.startFromX + xAxisTitleMaximumAllowedWidth / 2,\n y: svgDimensions.height - this.titleMargin,\n className: this._classNames.axisTitle!,\n textAnchor: 'middle',\n 'aria-hidden': true,\n }}\n maxWidth={xAxisTitleMaximumAllowedWidth}\n wrapContent={wrapContent}\n theme={this.props.theme}\n showBackground={true}\n />\n )}\n <g\n ref={(e: SVGSVGElement | null) => {\n this.yAxisElement = e;\n }}\n id={`yAxisGElement${this.idForGraph}`}\n transform={`translate(${\n this._isRtl\n ? svgDimensions.width - this.margins.right! - this.state.startFromX\n : this.margins.left! + this.state.startFromX\n }, 0)`}\n className={this._classNames.yAxis}\n />\n {this.props.secondaryYScaleOptions && (\n <g>\n <g\n ref={(e: SVGSVGElement | null) => {\n this.yAxisElementSecondary = e;\n }}\n id={`yAxisGElementSecondary${this.idForGraph}`}\n transform={`translate(${\n this._isRtl\n ? this.margins.left! + this.state.startFromX\n : svgDimensions.width - this.margins.right! - this.state.startFromX\n }, 0)`}\n className={this._classNames.yAxis}\n />\n {this.props.secondaryYAxistitle !== undefined && this.props.secondaryYAxistitle !== '' && (\n <SVGTooltipText\n content={this.props.secondaryYAxistitle}\n textProps={{\n x:\n (yAxisTitleMaximumAllowedHeight - this.margins.bottom!) / 2 +\n this.state._removalValueForTextTuncate!,\n y: this._isRtl\n ? this.state.startFromX - this.titleMargin\n : svgDimensions.width - this.margins.right!,\n textAnchor: 'middle',\n transform: `translate(${\n this._isRtl\n ? this.margins.right! / 2 - this.titleMargin\n : this.margins.right! / 2 + this.titleMargin\n },\n ${svgDimensions.height - this.margins.bottom! - this.margins.top! - this.titleMargin})rotate(-90)`,\n className: this._classNames.axisTitle!,\n 'aria-hidden': true,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n wrapContent={wrapContent}\n theme={this.props.theme}\n showBackground={true}\n />\n )}\n </g>\n )}\n {children}\n {this.props.yAxisTitle !== undefined && this.props.yAxisTitle !== '' && (\n <SVGTooltipText\n content={this.props.yAxisTitle}\n textProps={{\n x:\n (yAxisTitleMaximumAllowedHeight - this.margins.bottom!) / 2 +\n this.state._removalValueForTextTuncate!,\n y: this._isRtl\n ? svgDimensions.width - this.margins.right! / 2 + this.titleMargin\n : this.margins.left! / 2 - this.titleMargin,\n textAnchor: 'middle',\n transform: `translate(0,\n ${svgDimensions.height - this.margins.bottom! - this.margins.top! - this.titleMargin})rotate(-90)`,\n className: this._classNames.axisTitle!,\n 'aria-hidden': true,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n wrapContent={wrapContent}\n theme={this.props.theme}\n showBackground={true}\n />\n )}\n </svg>\n </FocusZone>\n\n {!this.props.hideLegend && (\n <div ref={(e: HTMLDivElement) => (this.legendContainer = e)} className={this._classNames.legendContainer}>\n {this.props.legendBars}\n </div>\n )}\n {/** The callout is used for narration, so keep it mounted on the DOM */}\n {callout && <React.Suspense fallback={<div>Loading...</div>}>{callout}</React.Suspense>}\n </div>\n );\n }\n\n /**\n * Dedicated function to return the Callout JSX Element , which can further be used to only call this when\n * only the calloutprops and charthover props changes.\n * @param calloutProps\n * @param chartHoverProps\n * @returns\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _generateCallout(calloutProps: any, chartHoverProps: any): JSX.Element {\n return (\n <Callout\n hidden={!(!this.props.hideTooltip && calloutProps!.isCalloutVisible)}\n /** Keep the callout updated with details of focused/hovered chart element */\n shouldUpdateWhenHidden={true}\n {...calloutProps}\n >\n {/** Given custom callout, then it will render */}\n {this.props.customizedCallout && this.props.customizedCallout}\n {/** single x point its corresponding y points of all the bars/lines in chart will render in callout */}\n {!this.props.customizedCallout && this.props.isCalloutForStack && this._multiValueCallout(calloutProps)}\n {/** single x point its corresponding y point of single line/bar in the chart will render in callout */}\n {!this.props.customizedCallout && !this.props.isCalloutForStack && (\n <ChartHoverCard\n XValue={calloutProps.XValue}\n Legend={calloutProps.legend!}\n YValue={calloutProps.YValue!}\n color={calloutProps.color!}\n culture={this.props.culture}\n {...chartHoverProps}\n />\n )}\n </Callout>\n );\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 width: this.state._width,\n height: this.state._height,\n className: this.props.className,\n isRtl: this._isRtl,\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 /**\n * When screen resizes, along with screen, chart also auto adjusted.\n * This method used to adjust height and width of the charts.\n */\n private _fitParentContainer(): void {\n const { containerWidth, containerHeight } = this.state;\n this._reqID = requestAnimationFrame(() => {\n let legendContainerHeight;\n if (this.props.hideLegend) {\n // If there is no legend, need not to allocate some space from total chart space.\n legendContainerHeight = 0;\n } else {\n const legendContainerComputedStyles = this.legendContainer && getComputedStyle(this.legendContainer);\n legendContainerHeight =\n ((this.legendContainer && this.legendContainer.getBoundingClientRect().height) ||\n this.minLegendContainerHeight) +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginTop) || '0') +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginBottom) || '0');\n }\n if (this.props.parentRef || this.chartContainer) {\n const container = this.props.parentRef ? this.props.parentRef : this.chartContainer;\n const currentContainerWidth =\n this.props.enableReflow && !this._isFirstRender\n ? Math.max(container.getBoundingClientRect().width, this._calculateChartMinWidth())\n : container.getBoundingClientRect().width;\n const currentContainerHeight =\n container.getBoundingClientRect().height > legendContainerHeight\n ? container.getBoundingClientRect().height\n : 350;\n const shouldResize =\n containerWidth !== currentContainerWidth ||\n containerHeight !== currentContainerHeight - legendContainerHeight;\n if (shouldResize) {\n this.setState({\n containerWidth: currentContainerWidth,\n containerHeight: currentContainerHeight - legendContainerHeight,\n });\n }\n }\n });\n }\n\n // Call back to the chart.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _getData = (xScale: any, yScalePrimary: any, yScaleSecondary: any) => {\n this.props.getGraphData &&\n this.props.getGraphData(\n xScale,\n yScalePrimary,\n this.state.containerHeight - this.state._removalValueForTextTuncate!,\n this.state.containerWidth,\n this.xAxisElement,\n this.yAxisElement,\n yScaleSecondary,\n );\n };\n\n private _onChartLeave = (): void => {\n this.props.onChartMouseLeave && this.props.onChartMouseLeave();\n };\n\n private _calculateChartMinWidth = (): number => {\n let labelWidth = 10; // Total padding on the left and right sides of the label\n\n // Case: rotated labels\n if (\n !this.props.wrapXAxisLables &&\n this.props.rotateXAxisLables &&\n this.props.xAxisType! === XAxisTypes.StringAxis\n ) {\n const longestLabelWidth = calculateLongestLabelWidth(this._tickValues, `.${this._classNames.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth * Math.cos(Math.PI / 4));\n }\n // Case: truncated labels\n else if (this.props.showXAxisLablesTooltip) {\n const tickValues = this._tickValues.map(val => {\n const numChars = this.props.noOfCharsToTruncate || 4;\n return val.toString().length > numChars ? `${val.toString().slice(0, numChars)}...` : val;\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(tickValues, `.${this._classNames.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth);\n }\n // Case: wrapped labels\n else if (this.props.wrapXAxisLables) {\n const words: string[] = [];\n this._tickValues.forEach((val: string) => {\n words.push(...val.toString().split(/\\s+/));\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(words, `.${this._classNames.xAxis} text`);\n labelWidth += Math.max(Math.ceil(longestLabelWidth), 10);\n }\n // Default case\n else {\n const longestLabelWidth = calculateLongestLabelWidth(this._tickValues, `.${this._classNames.xAxis} text`);\n labelWidth += Math.ceil(longestLabelWidth);\n }\n\n let minChartWidth = this.margins.left! + this.margins.right! + labelWidth * (this._tickValues.length - 1);\n\n if (\n [ChartTypes.GroupedVerticalBarChart, ChartTypes.VerticalBarChart, ChartTypes.VerticalStackedBarChart].includes(\n this.props.chartType,\n )\n ) {\n const minDomainMargin = 8;\n minChartWidth += minDomainMargin * 2;\n }\n\n return minChartWidth;\n };\n\n private _getChartDescription = (): string => {\n return (\n (this.props.chartTitle || 'Chart. ') +\n this._getAxisTitle('X', this.props.xAxisTitle, this.props.xAxisType) +\n this._getAxisTitle('Y', this.props.yAxisTitle, this.props.yAxisType || YAxisType.NumericAxis) +\n (this.props.secondaryYScaleOptions\n ? this._getAxisTitle('secondary Y', this.props.secondaryYAxistitle, YAxisType.NumericAxis)\n : '')\n );\n };\n\n private _getAxisTitle = (\n axisLabel: string,\n axisTitle: string | undefined,\n axisType: XAxisTypes | YAxisType,\n ): string => {\n return (\n `The ${axisLabel} axis displays ` +\n (axisTitle ||\n (axisType === XAxisTypes.StringAxis || axisType === YAxisType.StringAxis\n ? 'categories'\n : axisType === XAxisTypes.DateAxis || axisType === YAxisType.DateAxis\n ? 'time'\n : 'values')) +\n '. '\n );\n };\n}\n"]}
@@ -173,6 +173,7 @@ var getStyles = function (props) {
173
173
  borderTop: "1px solid ".concat(theme.semanticColors.menuDivider),
174
174
  },
175
175
  ],
176
+ tooltip: tslib_1.__assign(tslib_1.__assign({}, theme.fonts.medium), { display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', top: '0px', background: theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none' }),
176
177
  };
177
178
  };
178
179
  exports.getStyles = getStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"CartesianChart.styles.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.styles.ts"],"names":[],"mappings":";;;;AACA,uDAA2F;AAC3F,yCAAwD;AAExD,IAAM,SAAS,GAAY,IAAA,cAAM,GAAE,CAAC;AAE7B,IAAM,SAAS,GAAG,UAAC,KAAgC;;IAEtD,IAAA,SAAS,GAQP,KAAK,UARE,EACT,KAAK,GAOH,KAAK,MAPF,EACL,KAAK,GAMH,KAAK,MANF,EACL,eAAe,GAKb,KAAK,gBALQ,EACf,IAAI,GAIF,KAAK,KAJH,EACJ,KAGE,KAAK,UAHkB,EAAzB,SAAS,mBAAG,aAAa,KAAA,EACzB,WAAW,GAET,KAAK,YAFI,EACX,YAAY,GACV,KAAK,aADK,CACJ;IACF,IAAA,KAAK,GAAK,KAAM,MAAX,CAAY;IACzB,OAAO;QACL,IAAI,EAA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,EAAE;YACrB,KAAK,CAAC,KAAK,CAAC,UAAU;YACtB;gBACE,SAAS,EAAE,MAAM;gBACjB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ;aACrC;YACD,CAAC,WAAW,IAAI;gBACd,SAAS;oBACP,GAAC,8BAAoB,IAAG;wBACtB,iBAAiB,EAAE,MAAM;qBAC1B;uBACF;gBACD,UAAU,EAAE,oBAAa,SAAS,CAAE;gBACpC,WAAW,EAAE,KAAK;aACnB;YACD,WAAW,IAAI;gBACb,OAAO,EAAE,MAAM;aAChB;SACF;QACD,WAAW,EAAE;YACX,WAAW,EAAE,KAAK;SACnB;QACD,iBAAiB,wCACZ,KAAK,CAAC,KAAK,KACd,UAAU,EAAE,MAAM,EAClB,SAAS;gBACP,GAAC,8BAAoB,IAAG;oBACtB,KAAK,EAAE,YAAY;iBACpB;qBAEH,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,GACxC;QACD,eAAe,EAAE;kDAEV,KAAK,CAAC,UAAU,KACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,SAAS;oBACP,GAAC,8BAAoB,IAAG;wBACtB,KAAK,EAAE,YAAY;qBACpB;;SAGN;QACD,kBAAkB,EAAE;YAClB,KAAK,CAAC,KAAK,CAAC,KAAK;YACjB;gBACE,SAAS;oBACP,GAAC,8BAAoB,IAAG;wBACtB,KAAK,EAAE,YAAY;qBACpB;uBACF;gBACD,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ;gBACpC,SAAS,EAAE,MAAM;gBACjB,UAAU,EAAE,MAAM;gBAClB,SAAS,EAAE,oBAAa,KAAK,CAAC,cAAc,CAAC,WAAW,CAAE;aAC3D;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AApMW,QAAA,SAAS,aAoMpB","sourcesContent":["import { ICartesianChartStyleProps, ICartesianChartStyles } from './CartesianChart.types';\nimport { FontSizes, FontWeights, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { NeutralColors, isIE11 } from '@fluentui/react';\n\nconst isIE11Var: boolean = isIE11();\n\nexport const getStyles = (props: ICartesianChartStyleProps): ICartesianChartStyles => {\n const {\n className,\n theme,\n isRtl,\n shouldHighlight,\n href,\n lineColor = 'transparent',\n toDrawShape,\n enableReflow,\n } = props;\n const { fonts } = theme!;\n return {\n root: [\n theme.fonts.medium,\n {\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n },\n className,\n ],\n chartWrapper: {\n ...(enableReflow ? { overflow: 'auto' } : {}),\n },\n axisTitle: [\n theme.fonts.xSmall,\n {\n textAlign: 'center',\n fontWeight: FontWeights.semibold,\n fontStyle: 'normal',\n lineHeight: FontSizes.medium,\n color: NeutralColors.gray160,\n fill: theme.semanticColors.bodyText,\n },\n ],\n xAxis: {\n selectors: {\n text: [\n theme.fonts.tiny,\n {\n fill: theme.semanticColors.bodyText,\n fontWeight: '600',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n ],\n line: {\n opacity: 0.2,\n stroke: theme.semanticColors.bodyText,\n width: '1px',\n selectors: {\n [HighContrastSelector]: {\n opacity: 0.1,\n stroke: 'CanvasText',\n },\n },\n },\n path: {\n display: 'none',\n },\n },\n },\n yAxis: {\n selectors: {\n text: [\n theme.fonts.tiny,\n {\n fill: theme.semanticColors.bodyText,\n fontWeight: '600',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n ],\n path: {\n display: 'none',\n },\n line: {\n opacity: 0.2,\n stroke: theme.semanticColors.bodyText,\n selectors: {\n [HighContrastSelector]: {\n opacity: 0.1,\n stroke: 'CanvasText',\n },\n },\n },\n g: [\n isRtl &&\n !isIE11Var && {\n textAnchor: 'end',\n },\n ],\n },\n },\n\n opacityChangeOnHover: {\n opacity: shouldHighlight ? '' : '0.1',\n cursor: href ? 'pointer' : 'default',\n },\n\n legendContainer: [\n {\n marginTop: '8px',\n marginLeft: '20px',\n },\n ],\n calloutContentRoot: [\n {\n display: 'grid',\n overflow: 'hidden',\n padding: '11px 16px 10px 16px',\n backgroundColor: theme.semanticColors.bodyBackground,\n backgroundBlendMode: 'normal, luminosity',\n },\n ],\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n calloutContentX: [\n {\n ...fonts.small,\n lineHeight: '16px',\n opacity: '0.85',\n color: theme.semanticColors.bodySubtext,\n },\n ],\n calloutBlockContainer: [\n theme.fonts.mediumPlus,\n {\n marginTop: '13px',\n color: theme.semanticColors.bodyText,\n },\n !toDrawShape && {\n selectors: {\n [HighContrastSelector]: {\n forcedColorAdjust: 'none',\n },\n },\n borderLeft: `4px solid ${lineColor}`,\n paddingLeft: '8px',\n },\n toDrawShape && {\n display: 'flex',\n },\n ],\n shapeStyles: {\n marginRight: '8px',\n },\n calloutlegendText: {\n ...fonts.small,\n lineHeight: '16px',\n selectors: {\n [HighContrastSelector]: {\n color: 'CanvasText',\n },\n },\n color: theme.semanticColors.bodySubtext,\n },\n calloutContentY: [\n {\n ...fonts.mediumPlus,\n fontWeight: 'bold',\n lineHeight: '22px',\n selectors: {\n [HighContrastSelector]: {\n color: 'CanvasText',\n },\n },\n },\n ],\n descriptionMessage: [\n theme.fonts.small,\n {\n selectors: {\n [HighContrastSelector]: {\n color: 'CanvasText',\n },\n },\n color: theme.semanticColors.bodyText,\n marginTop: '10px',\n paddingTop: '10px',\n borderTop: `1px solid ${theme.semanticColors.menuDivider}`,\n },\n ],\n };\n};\n"]}
1
+ {"version":3,"file":"CartesianChart.styles.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.styles.ts"],"names":[],"mappings":";;;;AACA,uDAA2F;AAC3F,yCAAwD;AAExD,IAAM,SAAS,GAAY,IAAA,cAAM,GAAE,CAAC;AAE7B,IAAM,SAAS,GAAG,UAAC,KAAgC;;IAEtD,IAAA,SAAS,GAQP,KAAK,UARE,EACT,KAAK,GAOH,KAAK,MAPF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AAE,MAAM;gBACjB,UAAU,EAAE,MAAM;gBAClB,SAAS,EAAE,oBAAa,KAAK,CAAC,cAAc,CAAC,WAAW,CAAE;aAC3D;SACF;QACD,OAAO,wCACF,KAAK,CAAC,KAAK,CAAC,MAAM,KACrB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,QAAQ,EACnB,GAAG,EAAE,KAAK,EACV,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,EAC/C,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE,MAAM,GACtB;KACF,CAAC;AACJ,CAAC,CAAC;AAhNW,QAAA,SAAS,aAgNpB","sourcesContent":["import { ICartesianChartStyleProps, ICartesianChartStyles } from './CartesianChart.types';\nimport { FontSizes, FontWeights, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { NeutralColors, isIE11 } from '@fluentui/react';\n\nconst isIE11Var: boolean = isIE11();\n\nexport const getStyles = (props: ICartesianChartStyleProps): ICartesianChartStyles => {\n const {\n className,\n theme,\n isRtl,\n shouldHighlight,\n href,\n lineColor = 'transparent',\n toDrawShape,\n enableReflow,\n } = props;\n const { fonts } = theme!;\n return {\n root: [\n theme.fonts.medium,\n {\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n },\n className,\n ],\n chartWrapper: {\n ...(enableReflow ? { overflow: 'auto' } : {}),\n },\n axisTitle: [\n theme.fonts.xSmall,\n {\n textAlign: 'center',\n fontWeight: FontWeights.semibold,\n fontStyle: 'normal',\n lineHeight: FontSizes.medium,\n color: NeutralColors.gray160,\n fill: theme.semanticColors.bodyText,\n },\n ],\n xAxis: {\n selectors: {\n text: [\n theme.fonts.tiny,\n {\n fill: theme.semanticColors.bodyText,\n fontWeight: '600',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n ],\n line: {\n opacity: 0.2,\n stroke: theme.semanticColors.bodyText,\n width: '1px',\n selectors: {\n [HighContrastSelector]: {\n opacity: 0.1,\n stroke: 'CanvasText',\n },\n },\n },\n path: {\n display: 'none',\n },\n },\n },\n yAxis: {\n selectors: {\n text: [\n theme.fonts.tiny,\n {\n fill: theme.semanticColors.bodyText,\n fontWeight: '600',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n ],\n path: {\n display: 'none',\n },\n line: {\n opacity: 0.2,\n stroke: theme.semanticColors.bodyText,\n selectors: {\n [HighContrastSelector]: {\n opacity: 0.1,\n stroke: 'CanvasText',\n },\n },\n },\n g: [\n isRtl &&\n !isIE11Var && {\n textAnchor: 'end',\n },\n ],\n },\n },\n\n opacityChangeOnHover: {\n opacity: shouldHighlight ? '' : '0.1',\n cursor: href ? 'pointer' : 'default',\n },\n\n legendContainer: [\n {\n marginTop: '8px',\n marginLeft: '20px',\n },\n ],\n calloutContentRoot: [\n {\n display: 'grid',\n overflow: 'hidden',\n padding: '11px 16px 10px 16px',\n backgroundColor: theme.semanticColors.bodyBackground,\n backgroundBlendMode: 'normal, luminosity',\n },\n ],\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n calloutContentX: [\n {\n ...fonts.small,\n lineHeight: '16px',\n opacity: '0.85',\n color: theme.semanticColors.bodySubtext,\n },\n ],\n calloutBlockContainer: [\n theme.fonts.mediumPlus,\n {\n marginTop: '13px',\n color: theme.semanticColors.bodyText,\n },\n !toDrawShape && {\n selectors: {\n [HighContrastSelector]: {\n forcedColorAdjust: 'none',\n },\n },\n borderLeft: `4px solid ${lineColor}`,\n paddingLeft: '8px',\n },\n toDrawShape && {\n display: 'flex',\n },\n ],\n shapeStyles: {\n marginRight: '8px',\n },\n calloutlegendText: {\n ...fonts.small,\n lineHeight: '16px',\n selectors: {\n [HighContrastSelector]: {\n color: 'CanvasText',\n },\n },\n color: theme.semanticColors.bodySubtext,\n },\n calloutContentY: [\n {\n ...fonts.mediumPlus,\n fontWeight: 'bold',\n lineHeight: '22px',\n selectors: {\n [HighContrastSelector]: {\n color: 'CanvasText',\n },\n },\n },\n ],\n descriptionMessage: [\n theme.fonts.small,\n {\n selectors: {\n [HighContrastSelector]: {\n color: 'CanvasText',\n },\n },\n color: theme.semanticColors.bodyText,\n marginTop: '10px',\n paddingTop: '10px',\n borderTop: `1px solid ${theme.semanticColors.menuDivider}`,\n },\n ],\n tooltip: {\n ...theme.fonts.medium,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: theme.semanticColors.bodyBackground,\n borderRadius: '2px',\n pointerEvents: 'none',\n },\n };\n};\n"]}
@@ -29,6 +29,14 @@ export interface DeclarativeChartProps extends React.RefAttributes<HTMLDivElemen
29
29
  * the public methods and properties of the component.
30
30
  */
31
31
  componentRef?: IRefObject<IDeclarativeChart>;
32
+ /**
33
+ * Optional prop to specify the color palette for the chart.
34
+ * - 'default': Do not use Fluent UI color palette.
35
+ * - 'builtin': Use Fluent UI color palette.
36
+ * - 'override': Reserved for future use.
37
+ * @default 'builtin'
38
+ */
39
+ fluentDataVizColorPalette?: 'default' | 'builtin' | 'override';
32
40
  }
33
41
  /**
34
42
  * {@docCategory DeclarativeChart}
@@ -84,10 +84,11 @@ exports.DeclarativeChart = React.forwardRef(function (props, forwardedRef) {
84
84
  componentRef: chartRef,
85
85
  calloutProps: { layerProps: { eventBubblingEnabled: true } },
86
86
  };
87
+ var useFluentVizColorPalette = props.fluentDataVizColorPalette === 'builtin';
87
88
  var renderLineArea = function (plotlyData, isAreaChart) {
88
89
  var _a;
89
90
  var isScatterMarkers = ['markers', 'text+markers', 'markers+text'].includes((_a = plotlyData[0]) === null || _a === void 0 ? void 0 : _a.mode);
90
- var chartProps = tslib_1.__assign(tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToScatterChartProps)({ data: plotlyData, layout: plotlyInput.layout }, isAreaChart, colorMap, isDarkTheme)), commonProps);
91
+ var chartProps = tslib_1.__assign(tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToScatterChartProps)({ data: plotlyData, layout: plotlyInput.layout }, isAreaChart, colorMap, useFluentVizColorPalette, isDarkTheme)), commonProps);
91
92
  if (isAreaChart) {
92
93
  return React.createElement(ResponsiveAreaChart, tslib_1.__assign({}, chartProps));
93
94
  }
@@ -117,7 +118,7 @@ exports.DeclarativeChart = React.forwardRef(function (props, forwardedRef) {
117
118
  if (isAreaChart) {
118
119
  throw new Error('Fallback to VerticalStackedBarChart is not allowed for Area Charts.');
119
120
  }
120
- return (React.createElement(ResponsiveVerticalStackedBarChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToVSBCProps)(plotlyInputWithValidData, colorMap, isDarkTheme, fallbackVSBC), commonProps)));
121
+ return (React.createElement(ResponsiveVerticalStackedBarChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToVSBCProps)(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme, fallbackVSBC), commonProps)));
121
122
  };
122
123
  var exportAsImage = React.useCallback(function (opts) {
123
124
  return new Promise(function (resolve, reject) {
@@ -135,13 +136,13 @@ exports.DeclarativeChart = React.forwardRef(function (props, forwardedRef) {
135
136
  }); }, [exportAsImage]);
136
137
  switch (chart.type) {
137
138
  case 'donut':
138
- return (React.createElement(ResponsiveDonutChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToDonutProps)(plotlyInputWithValidData, colorMap, isDarkTheme), commonProps)));
139
+ return (React.createElement(ResponsiveDonutChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToDonutProps)(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme), commonProps)));
139
140
  case 'horizontalbar':
140
- return (React.createElement(ResponsiveHorizontalBarChartWithAxis, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToHorizontalBarWithAxisProps)(plotlyInputWithValidData, colorMap, isDarkTheme), commonProps)));
141
+ return (React.createElement(ResponsiveHorizontalBarChartWithAxis, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToHorizontalBarWithAxisProps)(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme), commonProps)));
141
142
  case 'groupedverticalbar':
142
- return (React.createElement(ResponsiveGroupedVerticalBarChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToGVBCProps)(plotlyInputWithValidData, colorMap, isDarkTheme), commonProps)));
143
+ return (React.createElement(ResponsiveGroupedVerticalBarChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToGVBCProps)(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme), commonProps)));
143
144
  case 'verticalstackedbar':
144
- return (React.createElement(ResponsiveVerticalStackedBarChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToVSBCProps)(plotlyInputWithValidData, colorMap, isDarkTheme), commonProps)));
145
+ return (React.createElement(ResponsiveVerticalStackedBarChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToVSBCProps)(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme), commonProps)));
145
146
  case 'heatmap':
146
147
  return (React.createElement(ResponsiveHeatMapChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToHeatmapProps)(plotlyInputWithValidData), commonProps, { legendProps: {} })));
147
148
  case 'sankey':
@@ -149,7 +150,7 @@ exports.DeclarativeChart = React.forwardRef(function (props, forwardedRef) {
149
150
  case 'gauge':
150
151
  return (React.createElement(ResponsiveGaugeChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToGaugeProps)(plotlyInputWithValidData, colorMap, isDarkTheme), commonProps)));
151
152
  case 'verticalbar':
152
- return (React.createElement(ResponsiveVerticalBarChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToVBCProps)(plotlyInputWithValidData, colorMap, isDarkTheme), commonProps)));
153
+ return (React.createElement(ResponsiveVerticalBarChart, tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToVBCProps)(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme), commonProps)));
153
154
  case 'area':
154
155
  case 'line':
155
156
  case 'fallback':
@@ -166,4 +167,7 @@ exports.DeclarativeChart = React.forwardRef(function (props, forwardedRef) {
166
167
  }
167
168
  });
168
169
  exports.DeclarativeChart.displayName = 'DeclarativeChart';
170
+ exports.DeclarativeChart.defaultProps = {
171
+ fluentDataVizColorPalette: 'builtin',
172
+ };
169
173
  //# sourceMappingURL=DeclarativeChart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeclarativeChart.js","sourceRoot":"../src/","sources":["components/DeclarativeChart/DeclarativeChart.tsx"],"names":[],"mappings":";;;;AAAA,yDAAyD;AACzD,6BAA+B;AAC/B,yCAA2C;AAE3C,6CAAiD;AACjD,0DAA2E;AAC3E,6DAA+D;AAE/D,6DAOmC;AAEnC,6DAa+B;AAC/B,4CAAgE;AAChE,6DAAiF;AACjF,4CAAgE;AAChE,+CAAqD;AACrD,0DAAyD;AACzD,6CAAiD;AACjD,0DAA2E;AAC3E,mDAA6D;AAE7D,0FAAyF;AAEzF,IAAM,oBAAoB,GAAG,IAAA,iDAAuB,EAAC,kBAAU,CAAC,CAAC;AACjE,IAAM,iCAAiC,GAAG,IAAA,iDAAuB,EAAC,+BAAuB,CAAC,CAAC;AAC3F,IAAM,mBAAmB,GAAG,IAAA,iDAAuB,EAAC,iBAAS,CAAC,CAAC;AAC/D,IAAM,oCAAoC,GAAG,IAAA,iDAAuB,EAAC,kCAA0B,CAAC,CAAC;AACjG,IAAM,mBAAmB,GAAG,IAAA,iDAAuB,EAAC,iBAAS,CAAC,CAAC;AAC/D,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CACL,oBAAC,oBAAoB,uBACf,IAAA,qDAA+B,EAAC,wBAAwB,EAAE,QAAQ,EAAE,WAAW,CAAC,EAChF,WAAW,EACf,CACH,CAAC;QACJ,KAAK,aAAa;YAChB,OAAO,CACL,oBAAC,0BAA0B,uBACrB,IAAA,mDAA6B,EAAC,wBAAwB,EAAE,QAAQ,EAAE,WAAW,CAAC,EAC9E,WAAW,EACf,CACH,CAAC;QACJ,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM,CAAC;QACZ,KAAK,UAAU,CAAC;QAChB,KAAK,cAAc;YACjB,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;gBAClC,IAAM,mBAAmB,GAAG,IAAA,6CAAuB,EAAC,wBAAwB,CAAC,CAAC;gBAC9E,wBAAwB,CAAC,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;YAC3D,CAAC;YACD,kGAAkG;YAClG,IAAM,WAAW,GAAG,wBAAwB,CAAC,IAAI,CAAC,IAAI,CACpD,UAAC,MAAgB,IAAK,OAAA,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,EAA7E,CAA6E,CACpG,CAAC;YACF,OAAO,mBAAmB,CAAC,WAAW,CAAC,CAAC;QAC1C;YACE,MAAM,IAAI,KAAK,CAAC,kCAA2B,MAAA,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,0CAAE,IAAI,CAAE,CAAC,CAAC;IACzF,CAAC;AACH,CAAC,CAAC,CAAC;AACH,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport * as React from 'react';\nimport { useTheme } from '@fluentui/react';\nimport { IRefObject } from '@fluentui/react/lib/Utilities';\nimport { DonutChart } from '../DonutChart/index';\nimport { VerticalStackedBarChart } from '../VerticalStackedBarChart/index';\nimport { decodeBase64Fields } from '@fluentui/chart-utilities';\nimport type { Data, PlotData, PlotlySchema, OutputChartType } from '@fluentui/chart-utilities';\nimport {\n isArrayOrTypedArray,\n isDateArray,\n isNumberArray,\n isYearArray,\n mapFluentChart,\n sanitizeJson,\n} from '@fluentui/chart-utilities';\n\nimport {\n isMonthArray,\n correctYearMonth,\n transformPlotlyJsonToDonutProps,\n transformPlotlyJsonToVSBCProps,\n transformPlotlyJsonToScatterChartProps,\n transformPlotlyJsonToHorizontalBarWithAxisProps,\n transformPlotlyJsonToHeatmapProps,\n transformPlotlyJsonToSankeyProps,\n transformPlotlyJsonToGaugeProps,\n transformPlotlyJsonToGVBCProps,\n transformPlotlyJsonToVBCProps,\n projectPolarToCartesian,\n} from './PlotlySchemaAdapter';\nimport { LineChart, ILineChartProps } from '../LineChart/index';\nimport { HorizontalBarChartWithAxis } from '../HorizontalBarChartWithAxis/index';\nimport { AreaChart, IAreaChartProps } from '../AreaChart/index';\nimport { HeatMapChart } from '../HeatMapChart/index';\nimport { SankeyChart } from '../SankeyChart/SankeyChart';\nimport { GaugeChart } from '../GaugeChart/index';\nimport { GroupedVerticalBarChart } from '../GroupedVerticalBarChart/index';\nimport { VerticalBarChart } from '../VerticalBarChart/index';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { withResponsiveContainer } from '../ResponsiveContainer/withResponsiveContainer';\n\nconst ResponsiveDonutChart = withResponsiveContainer(DonutChart);\nconst ResponsiveVerticalStackedBarChart = withResponsiveContainer(VerticalStackedBarChart);\nconst ResponsiveLineChart = withResponsiveContainer(LineChart);\nconst ResponsiveHorizontalBarChartWithAxis = withResponsiveContainer(HorizontalBarChartWithAxis);\nconst ResponsiveAreaChart = withResponsiveContainer(AreaChart);\nconst ResponsiveHeatMapChart = withResponsiveContainer(HeatMapChart);\nconst ResponsiveSankeyChart = withResponsiveContainer(SankeyChart);\nconst ResponsiveGaugeChart = withResponsiveContainer(GaugeChart);\nconst ResponsiveGroupedVerticalBarChart = withResponsiveContainer(GroupedVerticalBarChart);\nconst ResponsiveVerticalBarChart = withResponsiveContainer(VerticalBarChart);\n\n/**\n * DeclarativeChart schema.\n * {@docCategory DeclarativeChart}\n */\nexport interface Schema {\n /**\n * Plotly schema represented as JSON object\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n plotlySchema: any;\n}\n\n/**\n * DeclarativeChart props.\n * {@docCategory DeclarativeChart}\n */\nexport interface DeclarativeChartProps extends React.RefAttributes<HTMLDivElement> {\n /**\n * The schema representing the chart data, layout and configuration\n */\n chartSchema: Schema;\n\n /**\n * Callback when an event occurs\n */\n onSchemaChange?: (eventData: Schema) => void;\n\n /**\n * Optional callback to access the IDeclarativeChart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: IRefObject<IDeclarativeChart>;\n}\n\n/**\n * {@docCategory DeclarativeChart}\n */\nexport interface IDeclarativeChart {\n exportAsImage: (opts?: IImageExportOptions) => Promise<string>;\n}\n\nconst useColorMapping = () => {\n const colorMap = React.useRef(new Map<string, string>());\n return colorMap;\n};\n\n/**\n * DeclarativeChart component.\n * {@docCategory DeclarativeChart}\n */\nexport const DeclarativeChart: React.FunctionComponent<DeclarativeChartProps> = React.forwardRef<\n HTMLDivElement,\n DeclarativeChartProps\n>((props, forwardedRef) => {\n const { plotlySchema } = sanitizeJson(props.chartSchema);\n const chart: OutputChartType = mapFluentChart(plotlySchema);\n if (!chart.isValid) {\n throw new Error(`Invalid chart schema: ${chart.errorMessage}`);\n }\n let plotlyInput = plotlySchema as PlotlySchema;\n try {\n plotlyInput = decodeBase64Fields(plotlyInput);\n } catch (error) {\n throw new Error(`Failed to decode plotly schema: ${error}`);\n }\n const plotlyInputWithValidData: PlotlySchema = {\n ...plotlyInput,\n data: chart.validTracesInfo!.map(trace => plotlyInput.data[trace[0]]),\n };\n\n let { selectedLegends } = plotlySchema;\n const colorMap = useColorMapping();\n const theme = useTheme();\n const isDarkTheme = theme?.isInverted ?? false;\n const chartRef = React.useRef<IChart>(null);\n\n if (!isArrayOrTypedArray(selectedLegends)) {\n selectedLegends = [];\n }\n\n const [activeLegends, setActiveLegends] = React.useState<string[]>(selectedLegends);\n const onActiveLegendsChange = (keys: string[]) => {\n setActiveLegends(keys);\n if (props.onSchemaChange) {\n props.onSchemaChange({ plotlySchema: { plotlyInput, selectedLegends: keys } });\n }\n };\n\n React.useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { plotlySchema } = sanitizeJson(props.chartSchema);\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { selectedLegends } = plotlySchema;\n setActiveLegends(selectedLegends ?? []);\n }, [props.chartSchema]);\n\n const multiSelectLegendProps = {\n canSelectMultipleLegends: true,\n onChange: onActiveLegendsChange,\n selectedLegends: activeLegends,\n };\n\n const commonProps = {\n legendProps: multiSelectLegendProps,\n componentRef: chartRef,\n calloutProps: { layerProps: { eventBubblingEnabled: true } },\n };\n\n const renderLineArea = (plotlyData: Data[], isAreaChart: boolean): JSX.Element => {\n const isScatterMarkers = ['markers', 'text+markers', 'markers+text'].includes((plotlyData[0] as PlotData)?.mode);\n const chartProps: ILineChartProps | IAreaChartProps = {\n ...transformPlotlyJsonToScatterChartProps(\n { data: plotlyData, layout: plotlyInput.layout },\n isAreaChart,\n colorMap,\n isDarkTheme,\n ),\n ...commonProps,\n };\n if (isAreaChart) {\n return <ResponsiveAreaChart {...chartProps} />;\n }\n return <ResponsiveLineChart {...chartProps} lineMode={isScatterMarkers ? 'scatter' : 'default'} />;\n };\n\n const checkAndRenderChart = (isAreaChart: boolean = false) => {\n let fallbackVSBC = false;\n const xValues = (plotlyInputWithValidData.data[0] as PlotData).x;\n const isXDate = isDateArray(xValues);\n const isXNumber = isNumberArray(xValues);\n const isXMonth = isMonthArray(xValues);\n\n // Consider year as categorical variable not numeric continuous variable\n // Also year is not considered a date variable as it is represented as a point\n // in time and brings additional complexity of handling timezone and locale\n // formatting given the current design of the charting library\n const isXYear = isYearArray(xValues);\n\n if ((isXDate || isXNumber) && !isXYear) {\n return renderLineArea(plotlyInputWithValidData.data, isAreaChart);\n } else if (isXMonth) {\n const updatedData = plotlyInputWithValidData.data.map((dataPoint: PlotData) => ({\n ...dataPoint,\n x: correctYearMonth(dataPoint.x),\n }));\n return renderLineArea(updatedData, isAreaChart);\n }\n // Unsupported schema, render as VerticalStackedBarChart\n fallbackVSBC = true;\n if (isAreaChart) {\n throw new Error('Fallback to VerticalStackedBarChart is not allowed for Area Charts.');\n }\n return (\n <ResponsiveVerticalStackedBarChart\n {...transformPlotlyJsonToVSBCProps(plotlyInputWithValidData, colorMap, isDarkTheme, fallbackVSBC)}\n {...commonProps}\n />\n );\n };\n\n const exportAsImage = React.useCallback(\n (opts?: IImageExportOptions): Promise<string> => {\n return new Promise((resolve, reject) => {\n if (!chartRef.current || typeof chartRef.current.toImage !== 'function') {\n return reject(Error('Chart cannot be exported as image'));\n }\n\n chartRef.current\n .toImage({\n background: theme.semanticColors.bodyBackground,\n scale: 5,\n ...opts,\n })\n .then(resolve)\n .catch(reject);\n });\n },\n [theme],\n );\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n exportAsImage,\n }),\n [exportAsImage],\n );\n\n switch (chart.type) {\n case 'donut':\n return (\n <ResponsiveDonutChart\n {...transformPlotlyJsonToDonutProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'horizontalbar':\n return (\n <ResponsiveHorizontalBarChartWithAxis\n {...transformPlotlyJsonToHorizontalBarWithAxisProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'groupedverticalbar':\n return (\n <ResponsiveGroupedVerticalBarChart\n {...transformPlotlyJsonToGVBCProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'verticalstackedbar':\n return (\n <ResponsiveVerticalStackedBarChart\n {...transformPlotlyJsonToVSBCProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'heatmap':\n return (\n <ResponsiveHeatMapChart\n {...transformPlotlyJsonToHeatmapProps(plotlyInputWithValidData)}\n {...commonProps}\n legendProps={{}}\n />\n );\n case 'sankey':\n return (\n <ResponsiveSankeyChart\n {...transformPlotlyJsonToSankeyProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'gauge':\n return (\n <ResponsiveGaugeChart\n {...transformPlotlyJsonToGaugeProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'verticalbar':\n return (\n <ResponsiveVerticalBarChart\n {...transformPlotlyJsonToVBCProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'area':\n case 'line':\n case 'fallback':\n case 'scatterpolar':\n if (chart.type === 'scatterpolar') {\n const cartesianProjection = projectPolarToCartesian(plotlyInputWithValidData);\n plotlyInputWithValidData.data = cartesianProjection.data;\n }\n // Need recheck for area chart as we don't have ability to check for valid months in previous step\n const isAreaChart = plotlyInputWithValidData.data.some(\n (series: PlotData) => series.fill === 'tonexty' || series.fill === 'tozeroy' || !!series.stackgroup,\n );\n return checkAndRenderChart(isAreaChart);\n default:\n throw new Error(`Unsupported chart type :${plotlyInputWithValidData.data[0]?.type}`);\n }\n});\nDeclarativeChart.displayName = 'DeclarativeChart';\n"]}
1
+ {"version":3,"file":"DeclarativeChart.js","sourceRoot":"../src/","sources":["components/DeclarativeChart/DeclarativeChart.tsx"],"names":[],"mappings":";;;;AAAA,yDAAyD;AACzD,6BAA+B;AAC/B,yCAA2C;AAE3C,6CAAiD;AACjD,0DAA2E;AAC3E,6DAA+D;AAE/D,6DAOmC;AAEnC,6DAa+B;AAC/B,4CAAgE;AAChE,6DAAiF;AACjF,4CAAgE;AAChE,+CAAqD;AACrD,0DAAyD;AACzD,6CAAiD;AACjD,0DAA2E;AAC3E,mDAA6D;AAE7D,0FAAyF;AAEzF,IAAM,oBAAoB,GAAG,IAAA,iDAAuB,EAAC,kBAAU,CAAC,CAAC;AACjE,IAA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AC,CAAC;QAC1C;YACE,MAAM,IAAI,KAAK,CAAC,kCAA2B,MAAA,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,0CAAE,IAAI,CAAE,CAAC,CAAC;IACzF,CAAC;AACH,CAAC,CAAC,CAAC;AACH,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAClD,wBAAgB,CAAC,YAAY,GAAG;IAC9B,yBAAyB,EAAE,SAAS;CACrC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport * as React from 'react';\nimport { useTheme } from '@fluentui/react';\nimport { IRefObject } from '@fluentui/react/lib/Utilities';\nimport { DonutChart } from '../DonutChart/index';\nimport { VerticalStackedBarChart } from '../VerticalStackedBarChart/index';\nimport { decodeBase64Fields } from '@fluentui/chart-utilities';\nimport type { Data, PlotData, PlotlySchema, OutputChartType } from '@fluentui/chart-utilities';\nimport {\n isArrayOrTypedArray,\n isDateArray,\n isNumberArray,\n isYearArray,\n mapFluentChart,\n sanitizeJson,\n} from '@fluentui/chart-utilities';\n\nimport {\n isMonthArray,\n correctYearMonth,\n transformPlotlyJsonToDonutProps,\n transformPlotlyJsonToVSBCProps,\n transformPlotlyJsonToScatterChartProps,\n transformPlotlyJsonToHorizontalBarWithAxisProps,\n transformPlotlyJsonToHeatmapProps,\n transformPlotlyJsonToSankeyProps,\n transformPlotlyJsonToGaugeProps,\n transformPlotlyJsonToGVBCProps,\n transformPlotlyJsonToVBCProps,\n projectPolarToCartesian,\n} from './PlotlySchemaAdapter';\nimport { LineChart, ILineChartProps } from '../LineChart/index';\nimport { HorizontalBarChartWithAxis } from '../HorizontalBarChartWithAxis/index';\nimport { AreaChart, IAreaChartProps } from '../AreaChart/index';\nimport { HeatMapChart } from '../HeatMapChart/index';\nimport { SankeyChart } from '../SankeyChart/SankeyChart';\nimport { GaugeChart } from '../GaugeChart/index';\nimport { GroupedVerticalBarChart } from '../GroupedVerticalBarChart/index';\nimport { VerticalBarChart } from '../VerticalBarChart/index';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { withResponsiveContainer } from '../ResponsiveContainer/withResponsiveContainer';\n\nconst ResponsiveDonutChart = withResponsiveContainer(DonutChart);\nconst ResponsiveVerticalStackedBarChart = withResponsiveContainer(VerticalStackedBarChart);\nconst ResponsiveLineChart = withResponsiveContainer(LineChart);\nconst ResponsiveHorizontalBarChartWithAxis = withResponsiveContainer(HorizontalBarChartWithAxis);\nconst ResponsiveAreaChart = withResponsiveContainer(AreaChart);\nconst ResponsiveHeatMapChart = withResponsiveContainer(HeatMapChart);\nconst ResponsiveSankeyChart = withResponsiveContainer(SankeyChart);\nconst ResponsiveGaugeChart = withResponsiveContainer(GaugeChart);\nconst ResponsiveGroupedVerticalBarChart = withResponsiveContainer(GroupedVerticalBarChart);\nconst ResponsiveVerticalBarChart = withResponsiveContainer(VerticalBarChart);\n\n/**\n * DeclarativeChart schema.\n * {@docCategory DeclarativeChart}\n */\nexport interface Schema {\n /**\n * Plotly schema represented as JSON object\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n plotlySchema: any;\n}\n\n/**\n * DeclarativeChart props.\n * {@docCategory DeclarativeChart}\n */\nexport interface DeclarativeChartProps extends React.RefAttributes<HTMLDivElement> {\n /**\n * The schema representing the chart data, layout and configuration\n */\n chartSchema: Schema;\n\n /**\n * Callback when an event occurs\n */\n onSchemaChange?: (eventData: Schema) => void;\n\n /**\n * Optional callback to access the IDeclarativeChart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: IRefObject<IDeclarativeChart>;\n\n /**\n * Optional prop to specify the color palette for the chart.\n * - 'default': Do not use Fluent UI color palette.\n * - 'builtin': Use Fluent UI color palette.\n * - 'override': Reserved for future use.\n * @default 'builtin'\n */\n fluentDataVizColorPalette?: 'default' | 'builtin' | 'override';\n}\n\n/**\n * {@docCategory DeclarativeChart}\n */\nexport interface IDeclarativeChart {\n exportAsImage: (opts?: IImageExportOptions) => Promise<string>;\n}\n\nconst useColorMapping = () => {\n const colorMap = React.useRef(new Map<string, string>());\n return colorMap;\n};\n\n/**\n * DeclarativeChart component.\n * {@docCategory DeclarativeChart}\n */\nexport const DeclarativeChart: React.FunctionComponent<DeclarativeChartProps> = React.forwardRef<\n HTMLDivElement,\n DeclarativeChartProps\n>((props, forwardedRef) => {\n const { plotlySchema } = sanitizeJson(props.chartSchema);\n const chart: OutputChartType = mapFluentChart(plotlySchema);\n if (!chart.isValid) {\n throw new Error(`Invalid chart schema: ${chart.errorMessage}`);\n }\n let plotlyInput = plotlySchema as PlotlySchema;\n try {\n plotlyInput = decodeBase64Fields(plotlyInput);\n } catch (error) {\n throw new Error(`Failed to decode plotly schema: ${error}`);\n }\n const plotlyInputWithValidData: PlotlySchema = {\n ...plotlyInput,\n data: chart.validTracesInfo!.map(trace => plotlyInput.data[trace[0]]),\n };\n\n let { selectedLegends } = plotlySchema;\n const colorMap = useColorMapping();\n const theme = useTheme();\n const isDarkTheme = theme?.isInverted ?? false;\n const chartRef = React.useRef<IChart>(null);\n\n if (!isArrayOrTypedArray(selectedLegends)) {\n selectedLegends = [];\n }\n\n const [activeLegends, setActiveLegends] = React.useState<string[]>(selectedLegends);\n const onActiveLegendsChange = (keys: string[]) => {\n setActiveLegends(keys);\n if (props.onSchemaChange) {\n props.onSchemaChange({ plotlySchema: { plotlyInput, selectedLegends: keys } });\n }\n };\n\n React.useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { plotlySchema } = sanitizeJson(props.chartSchema);\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { selectedLegends } = plotlySchema;\n setActiveLegends(selectedLegends ?? []);\n }, [props.chartSchema]);\n\n const multiSelectLegendProps = {\n canSelectMultipleLegends: true,\n onChange: onActiveLegendsChange,\n selectedLegends: activeLegends,\n };\n\n const commonProps = {\n legendProps: multiSelectLegendProps,\n componentRef: chartRef,\n calloutProps: { layerProps: { eventBubblingEnabled: true } },\n };\n\n const useFluentVizColorPalette = props.fluentDataVizColorPalette === 'builtin';\n\n const renderLineArea = (plotlyData: Data[], isAreaChart: boolean): JSX.Element => {\n const isScatterMarkers = ['markers', 'text+markers', 'markers+text'].includes((plotlyData[0] as PlotData)?.mode);\n const chartProps: ILineChartProps | IAreaChartProps = {\n ...transformPlotlyJsonToScatterChartProps(\n { data: plotlyData, layout: plotlyInput.layout },\n isAreaChart,\n colorMap,\n useFluentVizColorPalette!,\n isDarkTheme,\n ),\n ...commonProps,\n };\n if (isAreaChart) {\n return <ResponsiveAreaChart {...chartProps} />;\n }\n return <ResponsiveLineChart {...chartProps} lineMode={isScatterMarkers ? 'scatter' : 'default'} />;\n };\n\n const checkAndRenderChart = (isAreaChart: boolean = false) => {\n let fallbackVSBC = false;\n const xValues = (plotlyInputWithValidData.data[0] as PlotData).x;\n const isXDate = isDateArray(xValues);\n const isXNumber = isNumberArray(xValues);\n const isXMonth = isMonthArray(xValues);\n\n // Consider year as categorical variable not numeric continuous variable\n // Also year is not considered a date variable as it is represented as a point\n // in time and brings additional complexity of handling timezone and locale\n // formatting given the current design of the charting library\n const isXYear = isYearArray(xValues);\n\n if ((isXDate || isXNumber) && !isXYear) {\n return renderLineArea(plotlyInputWithValidData.data, isAreaChart);\n } else if (isXMonth) {\n const updatedData = plotlyInputWithValidData.data.map((dataPoint: PlotData) => ({\n ...dataPoint,\n x: correctYearMonth(dataPoint.x),\n }));\n return renderLineArea(updatedData, isAreaChart);\n }\n // Unsupported schema, render as VerticalStackedBarChart\n fallbackVSBC = true;\n if (isAreaChart) {\n throw new Error('Fallback to VerticalStackedBarChart is not allowed for Area Charts.');\n }\n return (\n <ResponsiveVerticalStackedBarChart\n {...transformPlotlyJsonToVSBCProps(\n plotlyInputWithValidData,\n colorMap,\n useFluentVizColorPalette,\n isDarkTheme,\n fallbackVSBC,\n )}\n {...commonProps}\n />\n );\n };\n\n const exportAsImage = React.useCallback(\n (opts?: IImageExportOptions): Promise<string> => {\n return new Promise((resolve, reject) => {\n if (!chartRef.current || typeof chartRef.current.toImage !== 'function') {\n return reject(Error('Chart cannot be exported as image'));\n }\n\n chartRef.current\n .toImage({\n background: theme.semanticColors.bodyBackground,\n scale: 5,\n ...opts,\n })\n .then(resolve)\n .catch(reject);\n });\n },\n [theme],\n );\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n exportAsImage,\n }),\n [exportAsImage],\n );\n\n switch (chart.type) {\n case 'donut':\n return (\n <ResponsiveDonutChart\n {...transformPlotlyJsonToDonutProps(\n plotlyInputWithValidData,\n colorMap,\n useFluentVizColorPalette,\n isDarkTheme,\n )}\n {...commonProps}\n />\n );\n case 'horizontalbar':\n return (\n <ResponsiveHorizontalBarChartWithAxis\n {...transformPlotlyJsonToHorizontalBarWithAxisProps(\n plotlyInputWithValidData,\n colorMap,\n useFluentVizColorPalette,\n isDarkTheme,\n )}\n {...commonProps}\n />\n );\n case 'groupedverticalbar':\n return (\n <ResponsiveGroupedVerticalBarChart\n {...transformPlotlyJsonToGVBCProps(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'verticalstackedbar':\n return (\n <ResponsiveVerticalStackedBarChart\n {...transformPlotlyJsonToVSBCProps(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'heatmap':\n return (\n <ResponsiveHeatMapChart\n {...transformPlotlyJsonToHeatmapProps(plotlyInputWithValidData)}\n {...commonProps}\n legendProps={{}}\n />\n );\n case 'sankey':\n return (\n <ResponsiveSankeyChart\n {...transformPlotlyJsonToSankeyProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'gauge':\n return (\n <ResponsiveGaugeChart\n {...transformPlotlyJsonToGaugeProps(plotlyInputWithValidData, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'verticalbar':\n return (\n <ResponsiveVerticalBarChart\n {...transformPlotlyJsonToVBCProps(plotlyInputWithValidData, colorMap, useFluentVizColorPalette, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'area':\n case 'line':\n case 'fallback':\n case 'scatterpolar':\n if (chart.type === 'scatterpolar') {\n const cartesianProjection = projectPolarToCartesian(plotlyInputWithValidData);\n plotlyInputWithValidData.data = cartesianProjection.data;\n }\n // Need recheck for area chart as we don't have ability to check for valid months in previous step\n const isAreaChart = plotlyInputWithValidData.data.some(\n (series: PlotData) => series.fill === 'tonexty' || series.fill === 'tozeroy' || !!series.stackgroup,\n );\n return checkAndRenderChart(isAreaChart);\n default:\n throw new Error(`Unsupported chart type :${plotlyInputWithValidData.data[0]?.type}`);\n }\n});\nDeclarativeChart.displayName = 'DeclarativeChart';\nDeclarativeChart.defaultProps = {\n fluentDataVizColorPalette: 'builtin',\n};\n"]}
@@ -9,16 +9,19 @@ import { IHeatMapChartProps } from '../HeatMapChart/index';
9
9
  import { IGaugeChartProps } from '../GaugeChart/index';
10
10
  import { IGroupedVerticalBarChartProps } from '../GroupedVerticalBarChart/index';
11
11
  import { IVerticalBarChartProps } from '../VerticalBarChart/index';
12
- import type { Datum, PlotlySchema, TypedArray } from '@fluentui/chart-utilities';
12
+ import type { Datum, PlotlySchema, TypedArray, PieColors, Color } from '@fluentui/chart-utilities';
13
13
  export declare const isMonthArray: (data: Datum[] | Datum[][] | TypedArray) => boolean;
14
14
  export declare const correctYearMonth: (xValues: Datum[] | Datum[][] | TypedArray) => any[];
15
15
  export declare const getColor: (legendLabel: string, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => string;
16
- export declare const transformPlotlyJsonToDonutProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => IDonutChartProps;
17
- export declare const transformPlotlyJsonToVSBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean, fallbackVSBC?: boolean) => IVerticalStackedBarChartProps;
18
- export declare const transformPlotlyJsonToGVBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => IGroupedVerticalBarChartProps;
19
- export declare const transformPlotlyJsonToVBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => IVerticalBarChartProps;
20
- export declare const transformPlotlyJsonToScatterChartProps: (input: PlotlySchema, isAreaChart: boolean, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => ILineChartProps | IAreaChartProps;
21
- export declare const transformPlotlyJsonToHorizontalBarWithAxisProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => IHorizontalBarChartWithAxisProps;
16
+ export declare const getSchemaColors: (colors: PieColors | Color | Color[] | string | null | undefined, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => string[] | string | undefined;
17
+ export declare const _extractColor: (useFluentVizColorPalette: boolean, colors: PieColors | Color | Color[] | string | null | undefined, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => string | string[] | undefined;
18
+ export declare const _resolveColor: (extractedColors: string[] | string | null | undefined, index: number, legend: string, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => string;
19
+ export declare const transformPlotlyJsonToDonutProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, useFluentVizColorPalette: boolean, isDarkTheme?: boolean) => IDonutChartProps;
20
+ export declare const transformPlotlyJsonToVSBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, useFluentVizColorPalette: boolean, isDarkTheme?: boolean, fallbackVSBC?: boolean) => IVerticalStackedBarChartProps;
21
+ export declare const transformPlotlyJsonToGVBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, useFluentVizColorPalette: boolean, isDarkTheme?: boolean) => IGroupedVerticalBarChartProps;
22
+ export declare const transformPlotlyJsonToVBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, useFluentVizColorPalette: boolean, isDarkTheme?: boolean) => IVerticalBarChartProps;
23
+ export declare const transformPlotlyJsonToScatterChartProps: (input: PlotlySchema, isAreaChart: boolean, colorMap: React.MutableRefObject<Map<string, string>>, useFluentVizColorPalette: boolean, isDarkTheme?: boolean) => ILineChartProps | IAreaChartProps;
24
+ export declare const transformPlotlyJsonToHorizontalBarWithAxisProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, useFluentVizColorPalette: boolean, isDarkTheme?: boolean) => IHorizontalBarChartWithAxisProps;
22
25
  export declare const transformPlotlyJsonToHeatmapProps: (input: PlotlySchema) => IHeatMapChartProps;
23
26
  export declare const transformPlotlyJsonToSankeyProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => ISankeyChartProps;
24
27
  export declare const transformPlotlyJsonToGaugeProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => IGaugeChartProps;