@fluentui/react-charting 5.23.65 → 5.23.67

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 (112) hide show
  1. package/CHANGELOG.json +67 -1
  2. package/CHANGELOG.md +26 -2
  3. package/dist/react-charting.d.ts +6 -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 +22 -24
  8. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  9. package/lib/components/AreaChart/AreaChart.styles.js +1 -1
  10. package/lib/components/AreaChart/AreaChart.styles.js.map +1 -1
  11. package/lib/components/CommonComponents/CartesianChart.base.js +5 -3
  12. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  13. package/lib/components/DeclarativeChart/DeclarativeChart.js +9 -2
  14. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  15. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +35 -9
  16. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  17. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +1 -1
  18. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  19. package/lib/components/LineChart/LineChart.base.js +20 -19
  20. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  21. package/lib/components/LineChart/LineChart.styles.js +1 -1
  22. package/lib/components/LineChart/LineChart.styles.js.map +1 -1
  23. package/lib/components/PieChart/Arc/Arc.styles.js +11 -2
  24. package/lib/components/PieChart/Arc/Arc.styles.js.map +1 -1
  25. package/lib/components/PieChart/PieChart.styles.js +1 -1
  26. package/lib/components/PieChart/PieChart.styles.js.map +1 -1
  27. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +2 -2
  28. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  29. package/lib/components/StackedBarChart/StackedBarChart.base.js +6 -4
  30. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  31. package/lib/components/VerticalBarChart/VerticalBarChart.styles.js +1 -1
  32. package/lib/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  33. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +15 -5
  34. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  35. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +1 -1
  36. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  37. package/lib/types/IDataPoint.d.ts +6 -0
  38. package/lib/types/IDataPoint.js.map +1 -1
  39. package/lib/utilities/utilities.d.ts +3 -1
  40. package/lib/utilities/utilities.js +19 -0
  41. package/lib/utilities/utilities.js.map +1 -1
  42. package/lib-amd/components/AreaChart/AreaChart.base.js +21 -23
  43. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  44. package/lib-amd/components/AreaChart/AreaChart.styles.js +1 -1
  45. package/lib-amd/components/AreaChart/AreaChart.styles.js.map +1 -1
  46. package/lib-amd/components/CommonComponents/CartesianChart.base.js +5 -3
  47. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  48. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +15 -9
  49. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  50. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +35 -10
  51. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  52. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +1 -1
  53. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  54. package/lib-amd/components/LineChart/LineChart.base.js +18 -17
  55. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  56. package/lib-amd/components/LineChart/LineChart.styles.js +1 -1
  57. package/lib-amd/components/LineChart/LineChart.styles.js.map +1 -1
  58. package/lib-amd/components/PieChart/Arc/Arc.styles.js +10 -1
  59. package/lib-amd/components/PieChart/Arc/Arc.styles.js.map +1 -1
  60. package/lib-amd/components/PieChart/PieChart.styles.js +1 -1
  61. package/lib-amd/components/PieChart/PieChart.styles.js.map +1 -1
  62. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +2 -2
  63. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  64. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +6 -4
  65. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  66. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js +1 -1
  67. package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  68. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +15 -5
  69. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  70. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +1 -1
  71. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  72. package/lib-amd/types/IDataPoint.d.ts +6 -0
  73. package/lib-amd/types/IDataPoint.js.map +1 -1
  74. package/lib-amd/utilities/utilities.d.ts +3 -1
  75. package/lib-amd/utilities/utilities.js +21 -2
  76. package/lib-amd/utilities/utilities.js.map +1 -1
  77. package/lib-commonjs/components/AreaChart/AreaChart.base.js +21 -23
  78. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  79. package/lib-commonjs/components/AreaChart/AreaChart.styles.js +1 -1
  80. package/lib-commonjs/components/AreaChart/AreaChart.styles.js.map +1 -1
  81. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +5 -3
  82. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  83. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +15 -8
  84. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  85. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +35 -9
  86. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  87. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +1 -1
  88. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
  89. package/lib-commonjs/components/LineChart/LineChart.base.js +18 -17
  90. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  91. package/lib-commonjs/components/LineChart/LineChart.styles.js +1 -1
  92. package/lib-commonjs/components/LineChart/LineChart.styles.js.map +1 -1
  93. package/lib-commonjs/components/PieChart/Arc/Arc.styles.js +10 -1
  94. package/lib-commonjs/components/PieChart/Arc/Arc.styles.js.map +1 -1
  95. package/lib-commonjs/components/PieChart/PieChart.styles.js +1 -1
  96. package/lib-commonjs/components/PieChart/PieChart.styles.js.map +1 -1
  97. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +2 -2
  98. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  99. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +6 -4
  100. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  101. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.styles.js +1 -1
  102. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
  103. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +15 -5
  104. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  105. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +1 -1
  106. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
  107. package/lib-commonjs/types/IDataPoint.d.ts +6 -0
  108. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  109. package/lib-commonjs/utilities/utilities.d.ts +3 -1
  110. package/lib-commonjs/utilities/utilities.js +21 -1
  111. package/lib-commonjs/utilities/utilities.js.map +1 -1
  112. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"CartesianChart.base.js","sourceRoot":"../src/","sources":["components/CommonComponents/CartesianChart.base.tsx"],"names":[],"mappings":";;;;IAqCA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAoD,CAAC;IAC7F,IAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC;QAChC,OAAA,sDAAO,+CAA+C,4BAAE,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,EAApC,CAAoC,CAAC;IAA5G,CAA4G,CAC7G,CAAC;IACF,IAAM,iBAAiB,GAAG,CAAC,kBAAU,CAAC,0BAA0B,EAAE,kBAAU,CAAC,YAAY,CAAC,CAAC;IAqB3F;;;;;OAKG;IACH;QACU,8CAAmE;QAuB3E,4BAAY,KAAmC;;YAC7C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAlBP,8BAAwB,GAAW,EAAE,CAAC;YAQtC,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAG3B,oBAAc,GAAY,IAAI,CAAC;YAI/B,uBAAiB,GAAY,IAAI,CAAC;YAgInC,kCAA4B,GAAG,UACpC,SAAqB;YACrB,8DAA8D;YAC9D,MAAa,EACb,SAAiB;gBAEjB,IAAI,SAAS,KAAK,kBAAU,CAAC,YAAY,EAAE,CAAC;oBAC1C,OAAO,IAAA,kCAA0B,EAC/B,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,KAA6B,IAAK,OAAA,KAAK,CAAC,CAAC,EAAP,CAAO,CAAC,EAC9D,WAAI,SAAS,UAAO,CACrB,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACN,OAAO,IAAA,kCAA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AC,IAAI,GAAG,CAAC,CAAC;gBACrG,CAAC;gBACD,IAAI,KAAI,CAAC,KAAK,CAAC,SAAS,IAAI,KAAI,CAAC,cAAc,EAAE,CAAC;oBAChD,IAAM,SAAS,GAAG,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAI,CAAC,cAAc,CAAC;oBACpF,IAAM,qBAAqB,GACzB,KAAI,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,KAAI,CAAC,cAAc;wBAC7C,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC,KAAK,EAAE,KAAI,CAAC,uBAAuB,EAAE,CAAC;wBACnF,CAAC,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC;oBAC9C,IAAM,sBAAsB,GAC1B,SAAS,CAAC,qBAAqB,EAAE,CAAC,MAAM,GAAG,qBAAqB;wBAC9D,CAAC,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC,MAAM;wBAC1C,CAAC,CAAC,GAAG,CAAC;oBACV,IAAM,YAAY,GAChB,cAAc,KAAK,qBAAqB;wBACxC,eAAe,KAAK,sBAAsB,GAAG,qBAAqB,CAAC;oBACrE,IAAI,YAAY,EAAE,CAAC;wBACjB,KAAI,CAAC,QAAQ,CAAC;4BACZ,cAAc,EAAE,qBAAqB;4BACrC,eAAe,EAAE,sBAAsB,GAAG,qBAAqB;yBAChE,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAmGH,yBAAC;IAAD,CAAC,AAp5BD,CACU,KAAK,CAAC,SAAS,GAm5BxB;IAp5BY,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 ? 60\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 ? 60\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: 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.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 yScale: 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 yScale = this.props.createStringYAxis(\n YAxisParams,\n this.props.stringDatasetForYAxisDomain!,\n this._isRtl,\n this.props.barwidth,\n );\n } else {\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 maxOfYVal: this.props.secondaryYScaleOptions?.yMaxValue ?? 100,\n yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType),\n yAxisPadding: this.props.yAxisPadding,\n };\n\n yScaleSecondary = 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 yScale = 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 yScale &&\n createYAxisLabels(\n this.yAxisElement,\n yScale,\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, yScale);\n\n children = this.props.children({\n ...this.state,\n xScale,\n yScale,\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 ? this.margins.left! : svgDimensions.width - this.margins.right!\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, yScale: any) => {\n this.props.getGraphData &&\n this.props.getGraphData(\n xScale,\n yScale,\n this.state.containerHeight - this.state._removalValueForTextTuncate!,\n this.state.containerWidth,\n this.xAxisElement,\n this.yAxisElement,\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":";;;;IAqCA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAoD,CAAC;IAC7F,IAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC;QAChC,OAAA,sDAAO,+CAA+C,4BAAE,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,EAApC,CAAoC,CAAC;IAA5G,CAA4G,CAC7G,CAAC;IACF,IAAM,iBAAiB,GAAG,CAAC,kBAAU,CAAC,0BAA0B,EAAE,kBAAU,CAAC,YAAY,CAAC,CAAC;IAqB3F;;;;;OAKG;IACH;QACU,8CAAmE;QAuB3E,4BAAY,KAAmC;;YAC7C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAlBP,8BAAwB,GAAW,EAAE,CAAC;YAQtC,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAG3B,oBAAc,GAAY,IAAI,CAAC;YAI/B,uBAAiB,GAAY,IAAI,CAAC;YAgInC,kCAA4B,GAAG,UACpC,SAAqB;YACrB,8DAA8D;YAC9D,MAAa,EACb,SAAiB;gBAEjB,IAAI,SAAS,KAA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qBAAqB;4BACrC,eAAe,EAAE,sBAAsB,GAAG,qBAAqB;yBAChE,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAmGH,yBAAC;IAAD,CAAC,AAt5BD,CACU,KAAK,CAAC,SAAS,GAq5BxB;IAt5BY,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: 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.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 yScale: 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 yScale = this.props.createStringYAxis(\n YAxisParams,\n this.props.stringDatasetForYAxisDomain!,\n this._isRtl,\n this.props.barwidth,\n );\n } else {\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 maxOfYVal: this.props.secondaryYScaleOptions?.yMaxValue ?? 100,\n yMinMaxValues: this.props.getMinMaxOfYAxis(points, this.props.yAxisType),\n yAxisPadding: this.props.yAxisPadding,\n };\n\n yScaleSecondary = 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 yScale = 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 yScale &&\n createYAxisLabels(\n this.yAxisElement,\n yScale,\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, yScale);\n\n children = this.props.children({\n ...this.state,\n xScale,\n yScale,\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, yScale: any) => {\n this.props.getGraphData &&\n this.props.getGraphData(\n xScale,\n yScale,\n this.state.containerHeight - this.state._removalValueForTextTuncate!,\n this.state.containerWidth,\n this.xAxisElement,\n this.yAxisElement,\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,4 +1,4 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react", "../DonutChart/index", "../VerticalStackedBarChart/index", "@fluentui/chart-utilities", "./PlotlySchemaAdapter", "../LineChart/index", "../HorizontalBarChartWithAxis/index", "../AreaChart/index", "../HeatMapChart/index", "../SankeyChart/SankeyChart", "../GaugeChart/index", "../GroupedVerticalBarChart/index", "../VerticalBarChart/index", "../ResponsiveContainer/withResponsiveContainer"], function (require, exports, tslib_1, React, react_1, index_1, index_2, chart_utilities_1, PlotlySchemaAdapter_1, index_3, index_4, index_5, index_6, SankeyChart_1, index_7, index_8, index_9, withResponsiveContainer_1) {
1
+ define(["require", "exports", "tslib", "react", "@fluentui/react", "../DonutChart/index", "../VerticalStackedBarChart/index", "@fluentui/chart-utilities", "@fluentui/chart-utilities", "./PlotlySchemaAdapter", "../LineChart/index", "../HorizontalBarChartWithAxis/index", "../AreaChart/index", "../HeatMapChart/index", "../SankeyChart/SankeyChart", "../GaugeChart/index", "../GroupedVerticalBarChart/index", "../VerticalBarChart/index", "../ResponsiveContainer/withResponsiveContainer"], function (require, exports, tslib_1, React, react_1, index_1, index_2, chart_utilities_1, chart_utilities_2, PlotlySchemaAdapter_1, index_3, index_4, index_5, index_6, SankeyChart_1, index_7, index_8, index_9, withResponsiveContainer_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.DeclarativeChart = void 0;
@@ -22,18 +22,24 @@ define(["require", "exports", "tslib", "react", "@fluentui/react", "../DonutChar
22
22
  */
23
23
  exports.DeclarativeChart = React.forwardRef(function (props, forwardedRef) {
24
24
  var _a, _b;
25
- var plotlySchema = (0, chart_utilities_1.sanitizeJson)(props.chartSchema).plotlySchema;
26
- var chart = (0, chart_utilities_1.mapFluentChart)(plotlySchema);
25
+ var plotlySchema = (0, chart_utilities_2.sanitizeJson)(props.chartSchema).plotlySchema;
26
+ var chart = (0, chart_utilities_2.mapFluentChart)(plotlySchema);
27
27
  if (!chart.isValid) {
28
28
  throw new Error("Invalid chart schema: ".concat(chart.errorMessage));
29
29
  }
30
30
  var plotlyInput = plotlySchema;
31
+ try {
32
+ plotlyInput = (0, chart_utilities_1.decodeBase64Fields)(plotlyInput);
33
+ }
34
+ catch (error) {
35
+ throw new Error("Failed to decode plotly schema: ".concat(error));
36
+ }
31
37
  var selectedLegends = plotlySchema.selectedLegends;
32
38
  var colorMap = useColorMapping();
33
39
  var theme = (0, react_1.useTheme)();
34
40
  var isDarkTheme = (_a = theme === null || theme === void 0 ? void 0 : theme.isInverted) !== null && _a !== void 0 ? _a : false;
35
41
  var chartRef = React.useRef(null);
36
- if (!(0, chart_utilities_1.isArrayOrTypedArray)(selectedLegends)) {
42
+ if (!(0, chart_utilities_2.isArrayOrTypedArray)(selectedLegends)) {
37
43
  selectedLegends = [];
38
44
  }
39
45
  var _c = React.useState(selectedLegends), activeLegends = _c[0], setActiveLegends = _c[1];
@@ -45,7 +51,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react", "../DonutChar
45
51
  };
46
52
  React.useEffect(function () {
47
53
  // eslint-disable-next-line @typescript-eslint/no-shadow
48
- var plotlySchema = (0, chart_utilities_1.sanitizeJson)(props.chartSchema).plotlySchema;
54
+ var plotlySchema = (0, chart_utilities_2.sanitizeJson)(props.chartSchema).plotlySchema;
49
55
  // eslint-disable-next-line @typescript-eslint/no-shadow
50
56
  var selectedLegends = plotlySchema.selectedLegends;
51
57
  setActiveLegends(selectedLegends !== null && selectedLegends !== void 0 ? selectedLegends : []);
@@ -61,8 +67,8 @@ define(["require", "exports", "tslib", "react", "@fluentui/react", "../DonutChar
61
67
  calloutProps: { layerProps: { eventBubblingEnabled: true } },
62
68
  };
63
69
  var renderLineArea = function (plotlyData, isAreaChart) {
64
- var _a, _b;
65
- var isScatterMarkers = (_b = (_a = plotlyData[0]) === null || _a === void 0 ? void 0 : _a.mode) === null || _b === void 0 ? void 0 : _b.includes('markers');
70
+ var _a;
71
+ var isScatterMarkers = ((_a = plotlyData[0]) === null || _a === void 0 ? void 0 : _a.mode) === 'markers';
66
72
  var chartProps = tslib_1.__assign(tslib_1.__assign({}, (0, PlotlySchemaAdapter_1.transformPlotlyJsonToScatterChartProps)({ data: plotlyData, layout: plotlyInput.layout }, isAreaChart, colorMap, isDarkTheme)), commonProps);
67
73
  if (isAreaChart) {
68
74
  return React.createElement(ResponsiveAreaChart, tslib_1.__assign({}, chartProps));
@@ -73,8 +79,8 @@ define(["require", "exports", "tslib", "react", "@fluentui/react", "../DonutChar
73
79
  if (isAreaChart === void 0) { isAreaChart = false; }
74
80
  var fallbackVSBC = false;
75
81
  var xValues = plotlyInput.data[0].x;
76
- var isXDate = (0, chart_utilities_1.isDateArray)(xValues);
77
- var isXNumber = (0, chart_utilities_1.isNumberArray)(xValues);
82
+ var isXDate = (0, chart_utilities_2.isDateArray)(xValues);
83
+ var isXNumber = (0, chart_utilities_2.isNumberArray)(xValues);
78
84
  var isXMonth = (0, PlotlySchemaAdapter_1.isMonthArray)(xValues);
79
85
  if (isXDate || isXNumber) {
80
86
  return renderLineArea(plotlyInput.data, isAreaChart);
@@ -1 +1 @@
1
- {"version":3,"file":"DeclarativeChart.js","sourceRoot":"../src/","sources":["components/DeclarativeChart/DeclarativeChart.tsx"],"names":[],"mappings":";;;;IAuCA,IAAM,oBAAoB,GAAG,IAAA,iDAAuB,EAAC,kBAAU,CAAC,CAAC;IACjE,IAAM,iCAAiC,GAAG,IAAA,iDAAuB,EAAC,+BAAuB,CAAC,CAAC;IAC3F,IAAM,mBAAmB,GAAG,IAAA,iDAAuB,EAAC,iBAAS,CAAC,CAAC;IAC/D,IAAM,oCAAoC,GAAG,IAAA,iDAAuB,EAAC,kCAA0B,CAAC,CAAC;IACjG,IAAM,mBAAmB,GAAG,IAAA,iDAAuB,EAAC,iBAAS,CAAC,CAAC;IAC/D,IAAM,sBAAsB,GAAG,IAAA,iDAAuB,EAAC,oBAAY,CAAC,CAAC;IACrE,IAAM,qBAAqB,GAAG,IAAA,iDAAuB,EAAC,yBAAW,CAAC,CAAC;IACnE,IAAM,oBAAoB,GAAG,IAAA,iDAAuB,EAAC,kBAAU,CAAC,CAAC;IACjE,IAAM,iCAAiC,GAAG,IAAA,iDAAuB,EAAC,+BAAuB,CAAC,CAAC;IAC3F,IAAM,0BAA0B,GAAG,IAAA,iDAAuB,EAAC,wBAAgB,CAAC,CAAC;IA2C7E,IAAM,eAAe,GAAG;QACtB,IAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,EAAkB,CAAC,CAAC;QACzD,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;IAEF;;;OAGG;IACU,QAAA,gBAAgB,GAAmD,KAAK,CAA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AAC;YACJ,KAAK,OAAO;gBACV,OAAO,CACL,oBAAC,oBAAoB,uBACf,IAAA,qDAA+B,EAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,EACnE,WAAW,EACf,CACH,CAAC;YACJ,KAAK,aAAa;gBAChB,OAAO,CACL,oBAAC,0BAA0B,uBACrB,IAAA,mDAA6B,EAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,EACjE,WAAW,EACf,CACH,CAAC;YACJ,KAAK,MAAM,CAAC;YACZ,KAAK,MAAM,CAAC;YACZ,KAAK,UAAU;gBACb,kGAAkG;gBAClG,IAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CACvC,UAAC,MAAgB,IAAK,OAAA,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAtD,CAAsD,CAC7E,CAAC;gBACF,OAAO,mBAAmB,CAAC,WAAW,CAAC,CAAC;YAC1C;gBACE,MAAM,IAAI,KAAK,CAAC,kCAA2B,MAAA,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,0CAAE,IAAI,CAAE,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC,CAAC,CAAC;IACH,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 type { Data, PlotData, PlotlySchema, OutputChartType } from '@fluentui/chart-utilities';\nimport {\n isArrayOrTypedArray,\n isDateArray,\n isNumberArray,\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} 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 const plotlyInput = plotlySchema as PlotlySchema;\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 = (plotlyData[0] as PlotData)?.mode?.includes('markers');\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 = (plotlyInput.data[0] as PlotData).x;\n const isXDate = isDateArray(xValues);\n const isXNumber = isNumberArray(xValues);\n const isXMonth = isMonthArray(xValues);\n if (isXDate || isXNumber) {\n return renderLineArea(plotlyInput.data, isAreaChart);\n } else if (isXMonth) {\n const updatedData = plotlyInput.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 return (\n <ResponsiveVerticalStackedBarChart\n {...transformPlotlyJsonToVSBCProps(plotlyInput, 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(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'horizontalbar':\n return (\n <ResponsiveHorizontalBarChartWithAxis\n {...transformPlotlyJsonToHorizontalBarWithAxisProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'groupedverticalbar':\n return (\n <ResponsiveGroupedVerticalBarChart\n {...transformPlotlyJsonToGVBCProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'verticalstackedbar':\n return (\n <ResponsiveVerticalStackedBarChart\n {...transformPlotlyJsonToVSBCProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'heatmap':\n return (\n <ResponsiveHeatMapChart {...transformPlotlyJsonToHeatmapProps(plotlyInput)} {...commonProps} legendProps={{}} />\n );\n case 'sankey':\n return (\n <ResponsiveSankeyChart\n {...transformPlotlyJsonToSankeyProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'gauge':\n return (\n <ResponsiveGaugeChart\n {...transformPlotlyJsonToGaugeProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'verticalbar':\n return (\n <ResponsiveVerticalBarChart\n {...transformPlotlyJsonToVBCProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'area':\n case 'line':\n case 'fallback':\n // Need recheck for area chart as we don't have ability to check for valid months in previous step\n const isAreaChart = plotlyInput.data.some(\n (series: PlotData) => series.fill === 'tonexty' || series.fill === 'tozeroy',\n );\n return checkAndRenderChart(isAreaChart);\n default:\n throw new Error(`Unsupported chart type :${plotlyInput.data[0]?.type}`);\n }\n});\nDeclarativeChart.displayName = 'DeclarativeChart';\n"]}
1
+ {"version":3,"file":"DeclarativeChart.js","sourceRoot":"../src/","sources":["components/DeclarativeChart/DeclarativeChart.tsx"],"names":[],"mappings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oBAAC,0BAA0B,uBACrB,IAAA,mDAA6B,EAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,EACjE,WAAW,EACf,CACH,CAAC;YACJ,KAAK,MAAM,CAAC;YACZ,KAAK,MAAM,CAAC;YACZ,KAAK,UAAU;gBACb,kGAAkG;gBAClG,IAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CACvC,UAAC,MAAgB,IAAK,OAAA,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAtD,CAAsD,CAC7E,CAAC;gBACF,OAAO,mBAAmB,CAAC,WAAW,CAAC,CAAC;YAC1C;gBACE,MAAM,IAAI,KAAK,CAAC,kCAA2B,MAAA,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,0CAAE,IAAI,CAAE,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC,CAAC,CAAC;IACH,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 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} 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\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 = (plotlyData[0] as PlotData)?.mode === 'markers';\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 = (plotlyInput.data[0] as PlotData).x;\n const isXDate = isDateArray(xValues);\n const isXNumber = isNumberArray(xValues);\n const isXMonth = isMonthArray(xValues);\n if (isXDate || isXNumber) {\n return renderLineArea(plotlyInput.data, isAreaChart);\n } else if (isXMonth) {\n const updatedData = plotlyInput.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 return (\n <ResponsiveVerticalStackedBarChart\n {...transformPlotlyJsonToVSBCProps(plotlyInput, 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(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'horizontalbar':\n return (\n <ResponsiveHorizontalBarChartWithAxis\n {...transformPlotlyJsonToHorizontalBarWithAxisProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'groupedverticalbar':\n return (\n <ResponsiveGroupedVerticalBarChart\n {...transformPlotlyJsonToGVBCProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'verticalstackedbar':\n return (\n <ResponsiveVerticalStackedBarChart\n {...transformPlotlyJsonToVSBCProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'heatmap':\n return (\n <ResponsiveHeatMapChart {...transformPlotlyJsonToHeatmapProps(plotlyInput)} {...commonProps} legendProps={{}} />\n );\n case 'sankey':\n return (\n <ResponsiveSankeyChart\n {...transformPlotlyJsonToSankeyProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'gauge':\n return (\n <ResponsiveGaugeChart\n {...transformPlotlyJsonToGaugeProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'verticalbar':\n return (\n <ResponsiveVerticalBarChart\n {...transformPlotlyJsonToVBCProps(plotlyInput, colorMap, isDarkTheme)}\n {...commonProps}\n />\n );\n case 'area':\n case 'line':\n case 'fallback':\n // Need recheck for area chart as we don't have ability to check for valid months in previous step\n const isAreaChart = plotlyInput.data.some(\n (series: PlotData) => series.fill === 'tonexty' || series.fill === 'tozeroy',\n );\n return checkAndRenderChart(isAreaChart);\n default:\n throw new Error(`Unsupported chart type :${plotlyInput.data[0]?.type}`);\n }\n});\nDeclarativeChart.displayName = 'DeclarativeChart';\n"]}
@@ -1,4 +1,4 @@
1
- define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../../utilities/colors", "../GaugeChart/index", "../../utilities/utilities", "@fluentui/chart-utilities", "d3-time-format"], function (require, exports, tslib_1, d3_array_1, d3_scale_1, d3_format_1, colors_1, index_1, utilities_1, chart_utilities_1, d3_time_format_1) {
1
+ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../../utilities/colors", "../GaugeChart/index", "../../utilities/utilities", "@fluentui/chart-utilities", "d3-time-format", "d3-shape"], function (require, exports, tslib_1, d3_array_1, d3_scale_1, d3_format_1, colors_1, index_1, utilities_1, chart_utilities_1, d3_time_format_1, d3_shape_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.findArrayAttributes = exports.transformPlotlyJsonToGaugeProps = exports.transformPlotlyJsonToSankeyProps = exports.transformPlotlyJsonToHeatmapProps = exports.transformPlotlyJsonToHorizontalBarWithAxisProps = exports.transformPlotlyJsonToScatterChartProps = exports.transformPlotlyJsonToVBCProps = exports.transformPlotlyJsonToGVBCProps = exports.transformPlotlyJsonToVSBCProps = exports.transformPlotlyJsonToDonutProps = exports.getColor = exports.correctYearMonth = exports.isMonthArray = void 0;
@@ -176,7 +176,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
176
176
  input.data.forEach(function (series, index1) {
177
177
  var _a;
178
178
  (_a = series.x) === null || _a === void 0 ? void 0 : _a.forEach(function (x, index2) {
179
- var _a, _b, _c;
179
+ var _a, _b;
180
180
  if (!mapXToDataPoints[x]) {
181
181
  mapXToDataPoints[x] = { xAxisPoint: x, chartData: [], lineData: [] };
182
182
  }
@@ -192,9 +192,8 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
192
192
  }
193
193
  else if (series.type === 'scatter' || (0, chart_utilities_1.isLineData)(series) || !!fallbackVSBC) {
194
194
  var color = (0, exports.getColor)(legend, colorMap, isDarkTheme);
195
- mapXToDataPoints[x].lineData.push(tslib_1.__assign(tslib_1.__assign({ legend: legend }, (((_c = series.line) === null || _c === void 0 ? void 0 : _c.dash) && dashOptions[series.line.dash]
196
- ? { lineOptions: tslib_1.__assign({}, dashOptions[series.line.dash]) }
197
- : {})), { y: yVal, color: color }));
195
+ var lineOptions = getLineOptions(series.line);
196
+ mapXToDataPoints[x].lineData.push(tslib_1.__assign({ legend: legend, y: yVal, color: color }, (lineOptions ? { lineOptions: lineOptions } : {})));
198
197
  }
199
198
  yMaxValue = Math.max(yMaxValue, yVal);
200
199
  });
@@ -345,7 +344,6 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
345
344
  var secondaryYAxisValues = {};
346
345
  var mode = 'tonexty';
347
346
  var chartData = input.data.map(function (series, index) {
348
- var _a;
349
347
  var xValues = series.x;
350
348
  var isString = typeof xValues[0] === 'string';
351
349
  var isXDate = (0, chart_utilities_1.isDateArray)(xValues);
@@ -354,16 +352,15 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
354
352
  var lineColor = (0, exports.getColor)(legend, colorMap, isDarkTheme);
355
353
  secondaryYAxisValues = getSecondaryYAxisValues(series, input.layout);
356
354
  mode = series.fill === 'tozeroy' ? 'tozeroy' : 'tonexty';
357
- return tslib_1.__assign(tslib_1.__assign({ legend: legend }, (((_a = series.line) === null || _a === void 0 ? void 0 : _a.dash) && dashOptions[series.line.dash]
358
- ? { lineOptions: tslib_1.__assign({}, dashOptions[series.line.dash]) }
359
- : {})), { data: xValues.map(function (x, i) {
355
+ var lineOptions = getLineOptions(series.line);
356
+ return tslib_1.__assign({ legend: legend, data: xValues.map(function (x, i) {
360
357
  var _a, _b;
361
358
  return (tslib_1.__assign({ x: isString ? (isXDate ? new Date(x) : isXNumber ? parseFloat(x) : x) : x, y: series.y[i] }, (Array.isArray((_a = series.marker) === null || _a === void 0 ? void 0 : _a.size)
362
359
  ? { markerSize: series.marker.size[i] }
363
360
  : typeof ((_b = series.marker) === null || _b === void 0 ? void 0 : _b.size) === 'number'
364
361
  ? { markerSize: series.marker.size }
365
362
  : {})));
366
- }), color: lineColor });
363
+ }), color: lineColor }, (lineOptions ? { lineOptions: lineOptions } : {}));
367
364
  });
368
365
  var yMinMaxValues = (0, utilities_1.findNumericMinMaxOfY)(chartData);
369
366
  var _g = getTitles(input.layout), chartTitle = _g.chartTitle, xAxisTitle = _g.xAxisTitle, yAxisTitle = _g.yAxisTitle;
@@ -652,5 +649,33 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
652
649
  }
653
650
  }
654
651
  }
652
+ function getLineOptions(line) {
653
+ if (!line) {
654
+ return;
655
+ }
656
+ var lineOptions = {};
657
+ if (line.dash) {
658
+ lineOptions = tslib_1.__assign(tslib_1.__assign({}, lineOptions), dashOptions[line.dash]);
659
+ }
660
+ switch (line.shape) {
661
+ case 'linear':
662
+ lineOptions.curve = 'linear';
663
+ break;
664
+ case 'spline':
665
+ var smoothing = typeof line.smoothing === 'number' ? line.smoothing : 1;
666
+ lineOptions.curve = d3_shape_1.curveCardinal.tension(1 - smoothing / 1.3);
667
+ break;
668
+ case 'hv':
669
+ lineOptions.curve = 'stepAfter';
670
+ break;
671
+ case 'vh':
672
+ lineOptions.curve = 'stepBefore';
673
+ break;
674
+ case 'hvh':
675
+ lineOptions.curve = 'step';
676
+ break;
677
+ }
678
+ return Object.keys(lineOptions).length > 0 ? lineOptions : undefined;
679
+ }
655
680
  });
656
681
  //# sourceMappingURL=PlotlySchemaAdapter.js.map