@fluentui/react-charts 9.1.2 → 9.1.4

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 (65) hide show
  1. package/CHANGELOG.md +34 -2
  2. package/dist/index.d.ts +36 -1
  3. package/lib/components/AreaChart/AreaChart.js +18 -8
  4. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  5. package/lib/components/CommonComponents/CartesianChart.js +20 -15
  6. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  7. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  8. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +57 -43
  9. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  10. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +4 -2
  11. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  12. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +44 -18
  13. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  14. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  15. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +3 -2
  16. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  17. package/lib/components/HeatMapChart/HeatMapChart.js +1 -1
  18. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  19. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +181 -38
  20. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  21. package/lib/components/LineChart/LineChart.js +40 -36
  22. package/lib/components/LineChart/LineChart.js.map +1 -1
  23. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +8 -8
  24. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  25. package/lib/components/ScatterChart/ScatterChart.js +1 -1
  26. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  27. package/lib/components/VerticalBarChart/VerticalBarChart.js +4 -4
  28. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  29. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +61 -23
  30. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  31. package/lib/types/DataPoint.js.map +1 -1
  32. package/lib/utilities/utilities.js +77 -46
  33. package/lib/utilities/utilities.js.map +1 -1
  34. package/lib-commonjs/components/AreaChart/AreaChart.js +16 -7
  35. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  36. package/lib-commonjs/components/CommonComponents/CartesianChart.js +19 -15
  37. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  38. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  39. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +57 -43
  40. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  41. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +4 -2
  42. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  43. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +43 -17
  44. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  45. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  46. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +4 -2
  47. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  48. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +1 -1
  49. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  50. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +175 -36
  51. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  52. package/lib-commonjs/components/LineChart/LineChart.js +40 -36
  53. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  54. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +7 -7
  55. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  56. package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -1
  57. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  58. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +4 -4
  59. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  60. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +60 -22
  61. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  62. package/lib-commonjs/types/DataPoint.js.map +1 -1
  63. package/lib-commonjs/utilities/utilities.js +76 -46
  64. package/lib-commonjs/utilities/utilities.js.map +1 -1
  65. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"names":["tokens","typographyStyles","__styles","mergeClasses","shorthands","gaugeChartClassNames","root","chart","limits","chartValue","sublabel","needle","chartTitle","segment","gradientSegment","calloutContentRoot","calloutDateTimeContainer","calloutContentX","calloutBlockContainer","shapeStyles","calloutlegendText","calloutContentY","descriptionMessage","calloutInfoContainer","legendsContainer","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","Bt984gj","a9b677","Bqenvij","Bkfmm31","Bvjb7m6","ojy3ng","Bw0xxkn","oeaueh","Bpd4iqm","Befb4lg","B68tc82","Bmxbyg5","Bpg54ce","z8tnut","z189sj","Byoj8tv","uwmqm3","De3pzq","jy2i9i","Brf1p80","abs64n","B6of3ja","sj55zd","t21cq0","g2u3we","icvyot","B4j52fo","i8vvqc","d","p","useGaugeChartStyles","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","_props_styles8","_props_styles9","_props_styles10","_props_styles11","_props_styles12","_props_styles13","_props_styles14","_props_styles15","_props_styles16","baseStyles","styles"],"sources":["useGaugeChartStyles.styles.js"],"sourcesContent":["import { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nexport const gaugeChartClassNames = {\n root: 'fui-gc__root',\n chart: 'fui-gc__chart',\n limits: 'fui-gc__limits',\n chartValue: 'fui-gc__chartValue',\n sublabel: 'fui-gc__sublabel',\n needle: 'fui-gc__needle',\n chartTitle: 'fui-gc__chartTitle',\n segment: 'fui-gc__segment',\n gradientSegment: 'fui-gc__gradientSegment',\n calloutContentRoot: 'fui-gc__calloutContentRoot',\n calloutDateTimeContainer: 'fui-gc__calloutDateTimeContainer',\n calloutContentX: 'fui-gc__calloutContentX',\n calloutBlockContainer: 'fui-gc__calloutBlockContainer',\n shapeStyles: 'fui-gc__shapeStyles',\n calloutlegendText: 'fui-gc__calloutlegendText',\n calloutContentY: 'fui-gc__calloutContentY',\n descriptionMessage: 'fui-gc__descriptionMessage',\n calloutInfoContainer: '',\n legendsContainer: ''\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n width: 'var(--root-width, 100%)',\n height: 'var(--root-height, 100%)'\n },\n chart: {\n display: 'block'\n },\n limits: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n chartValue: {\n fontWeight: tokens.fontWeightSemibold,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n sublabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1\n },\n needle: {\n fill: tokens.colorNeutralForeground1,\n stroke: tokens.colorNeutralBackground1\n },\n chartTitle: {\n ...typographyStyles.caption1,\n fill: tokens.colorNeutralForeground1\n },\n segment: {\n outline: 'none',\n stroke: tokens.colorNeutralStroke1\n },\n gradientSegment: {\n width: '100%',\n height: '100%'\n },\n calloutContentRoot: {\n display: 'grid',\n overflow: 'hidden',\n ...shorthands.padding('11px', '16px', '10px', '16px'),\n backgroundColor: tokens.colorNeutralBackground1,\n backgroundBlendMode: 'normal, luminosity'\n },\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between'\n },\n calloutContentX: {\n ...typographyStyles.caption1,\n lineHeight: '16px',\n opacity: '0.85'\n },\n calloutBlockContainer: {\n ...typographyStyles.body1Strong,\n marginTop: '13px',\n color: tokens.colorNeutralForeground1,\n paddingLeft: '8px',\n display: 'block',\n forcedColorAdjust: 'none'\n },\n shapeStyles: {\n marginRight: '8px'\n },\n calloutlegendText: {\n ...typographyStyles.caption1,\n lineHeight: '16px',\n color: tokens.colorNeutralForeground2,\n forcedColorAdjust: 'auto'\n },\n calloutContentY: {\n ...typographyStyles.body1Strong,\n lineHeight: '22px',\n forcedColorAdjust: 'auto'\n },\n descriptionMessage: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground1,\n marginTop: '10px',\n paddingTop: '10px',\n borderTop: `1px solid ${tokens.colorNeutralStroke1}`\n }\n});\nexport const useGaugeChartStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8, _props_styles9, _props_styles10, _props_styles11, _props_styles12, _props_styles13, _props_styles14, _props_styles15, _props_styles16;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(gaugeChartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n chart: mergeClasses(gaugeChartClassNames.chart, baseStyles.chart, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chart),\n limits: mergeClasses(gaugeChartClassNames.limits, baseStyles.limits, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.limits),\n chartValue: mergeClasses(gaugeChartClassNames.chartValue, baseStyles.chartValue, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartValue),\n sublabel: mergeClasses(gaugeChartClassNames.sublabel, baseStyles.sublabel, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.sublabel),\n needle: mergeClasses(gaugeChartClassNames.needle, baseStyles.needle, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.needle),\n chartTitle: mergeClasses(gaugeChartClassNames.chartTitle, baseStyles.chartTitle, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.chartTitle),\n segment: mergeClasses(gaugeChartClassNames.segment, baseStyles.segment, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.segment),\n gradientSegment: mergeClasses(gaugeChartClassNames.gradientSegment, baseStyles.gradientSegment, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.gradientSegment),\n calloutContentRoot: mergeClasses(gaugeChartClassNames.calloutContentRoot, baseStyles.calloutContentRoot, (_props_styles9 = props.styles) === null || _props_styles9 === void 0 ? void 0 : _props_styles9.calloutContentRoot),\n calloutDateTimeContainer: mergeClasses(gaugeChartClassNames.calloutDateTimeContainer, baseStyles.calloutDateTimeContainer, (_props_styles10 = props.styles) === null || _props_styles10 === void 0 ? void 0 : _props_styles10.calloutDateTimeContainer),\n calloutContentX: mergeClasses(gaugeChartClassNames.calloutContentX, baseStyles.calloutContentX, (_props_styles11 = props.styles) === null || _props_styles11 === void 0 ? void 0 : _props_styles11.calloutContentX),\n calloutBlockContainer: mergeClasses(gaugeChartClassNames.calloutBlockContainer, baseStyles.calloutBlockContainer, (_props_styles12 = props.styles) === null || _props_styles12 === void 0 ? void 0 : _props_styles12.calloutBlockContainer),\n shapeStyles: mergeClasses(gaugeChartClassNames.shapeStyles, baseStyles.shapeStyles, (_props_styles13 = props.styles) === null || _props_styles13 === void 0 ? void 0 : _props_styles13.shapeStyles),\n calloutlegendText: mergeClasses(gaugeChartClassNames.calloutlegendText, baseStyles.calloutlegendText, (_props_styles14 = props.styles) === null || _props_styles14 === void 0 ? void 0 : _props_styles14.calloutlegendText),\n calloutContentY: mergeClasses(gaugeChartClassNames.calloutContentY, baseStyles.calloutContentY, (_props_styles15 = props.styles) === null || _props_styles15 === void 0 ? void 0 : _props_styles15.calloutContentY),\n descriptionMessage: mergeClasses(gaugeChartClassNames.descriptionMessage, baseStyles.descriptionMessage, (_props_styles16 = props.styles) === null || _props_styles16 === void 0 ? void 0 : _props_styles16.descriptionMessage)\n };\n};\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,OAAO,MAAMC,oBAAoB,GAAG;EAChCC,IAAI,EAAE,cAAc;EACpBC,KAAK,EAAE,eAAe;EACtBC,MAAM,EAAE,gBAAgB;EACxBC,UAAU,EAAE,oBAAoB;EAChCC,QAAQ,EAAE,kBAAkB;EAC5BC,MAAM,EAAE,gBAAgB;EACxBC,UAAU,EAAE,oBAAoB;EAChCC,OAAO,EAAE,iBAAiB;EAC1BC,eAAe,EAAE,yBAAyB;EAC1CC,kBAAkB,EAAE,4BAA4B;EAChDC,wBAAwB,EAAE,kCAAkC;EAC5DC,eAAe,EAAE,yBAAyB;EAC1CC,qBAAqB,EAAE,+BAA+B;EACtDC,WAAW,EAAE,qBAAqB;EAClCC,iBAAiB,EAAE,2BAA2B;EAC9CC,eAAe,EAAE,yBAAyB;EAC1CC,kBAAkB,EAAE,4BAA4B;EAChDC,oBAAoB,EAAE,EAAE;EACxBC,gBAAgB,EAAE;AACtB,CAAC;AACD,MAAMC,SAAS,gBAAGvB,QAAA;EAAAI,IAAA;IAAAoB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,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,CAAC0D,eAAe,GAAGd,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIL,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,WAAW,CAAC;IACnMC,iBAAiB,EAAEjB,YAAY,CAACE,oBAAoB,CAACe,iBAAiB,EAAE6D,UAAU,CAAC7D,iBAAiB,EAAE,CAAC0D,eAAe,GAAGf,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIJ,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,iBAAiB,CAAC;IAC3NC,eAAe,EAAElB,YAAY,CAACE,oBAAoB,CAACgB,eAAe,EAAE4D,UAAU,CAAC5D,eAAe,EAAE,CAAC0D,eAAe,GAAGhB,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIH,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,eAAe,CAAC;IACnNC,kBAAkB,EAAEnB,YAAY,CAACE,oBAAoB,CAACiB,kBAAkB,EAAE2D,UAAU,CAAC3D,kBAAkB,EAAE,CAAC0D,eAAe,GAAGjB,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIF,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,kBAAkB;EAClO,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["tokens","typographyStyles","__styles","mergeClasses","shorthands","gaugeChartClassNames","root","chart","limits","chartValue","sublabel","needle","chartTitle","segment","gradientSegment","calloutContentRoot","calloutDateTimeContainer","calloutContentX","calloutBlockContainer","shapeStyles","calloutlegendText","calloutContentY","descriptionMessage","calloutInfoContainer","legendsContainer","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","Bt984gj","a9b677","Bqenvij","Bkfmm31","Bvjb7m6","ojy3ng","Bw0xxkn","oeaueh","Bpd4iqm","Befb4lg","B68tc82","Bmxbyg5","Bpg54ce","z8tnut","z189sj","Byoj8tv","uwmqm3","De3pzq","jy2i9i","Brf1p80","abs64n","B6of3ja","sj55zd","t21cq0","g2u3we","icvyot","B4j52fo","i8vvqc","d","p","useGaugeChartStyles","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","_props_styles8","_props_styles9","_props_styles10","_props_styles11","_props_styles12","_props_styles13","_props_styles14","_props_styles15","_props_styles16","baseStyles","styles"],"sources":["useGaugeChartStyles.styles.js"],"sourcesContent":["import { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nexport const gaugeChartClassNames = {\n root: 'fui-gc__root',\n chart: 'fui-gc__chart',\n limits: 'fui-gc__limits',\n chartValue: 'fui-gc__chartValue',\n sublabel: 'fui-gc__sublabel',\n needle: 'fui-gc__needle',\n chartTitle: 'fui-gc__chartTitle',\n segment: 'fui-gc__segment',\n gradientSegment: 'fui-gc__gradientSegment',\n calloutContentRoot: 'fui-gc__calloutContentRoot',\n calloutDateTimeContainer: 'fui-gc__calloutDateTimeContainer',\n calloutContentX: 'fui-gc__calloutContentX',\n calloutBlockContainer: 'fui-gc__calloutBlockContainer',\n shapeStyles: 'fui-gc__shapeStyles',\n calloutlegendText: 'fui-gc__calloutlegendText',\n calloutContentY: 'fui-gc__calloutContentY',\n descriptionMessage: 'fui-gc__descriptionMessage',\n calloutInfoContainer: '',\n legendsContainer: ''\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n width: 'var(--root-width, 100%)',\n height: 'var(--root-height, 100%)'\n },\n chart: {\n display: 'block'\n },\n limits: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n chartValue: {\n fontWeight: tokens.fontWeightSemibold,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n sublabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n needle: {\n fill: tokens.colorNeutralForeground1,\n stroke: tokens.colorNeutralBackground1\n },\n chartTitle: {\n ...typographyStyles.caption1,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n segment: {\n outline: 'none',\n stroke: tokens.colorNeutralStroke1\n },\n gradientSegment: {\n width: '100%',\n height: '100%'\n },\n calloutContentRoot: {\n display: 'grid',\n overflow: 'hidden',\n ...shorthands.padding('11px', '16px', '10px', '16px'),\n backgroundColor: tokens.colorNeutralBackground1,\n backgroundBlendMode: 'normal, luminosity'\n },\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between'\n },\n calloutContentX: {\n ...typographyStyles.caption1,\n lineHeight: '16px',\n opacity: '0.85'\n },\n calloutBlockContainer: {\n ...typographyStyles.body1Strong,\n marginTop: '13px',\n color: tokens.colorNeutralForeground1,\n paddingLeft: '8px',\n display: 'block',\n forcedColorAdjust: 'none'\n },\n shapeStyles: {\n marginRight: '8px'\n },\n calloutlegendText: {\n ...typographyStyles.caption1,\n lineHeight: '16px',\n color: tokens.colorNeutralForeground2,\n forcedColorAdjust: 'auto'\n },\n calloutContentY: {\n ...typographyStyles.body1Strong,\n lineHeight: '22px',\n forcedColorAdjust: 'auto'\n },\n descriptionMessage: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground1,\n marginTop: '10px',\n paddingTop: '10px',\n borderTop: `1px solid ${tokens.colorNeutralStroke1}`\n }\n});\nexport const useGaugeChartStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8, _props_styles9, _props_styles10, _props_styles11, _props_styles12, _props_styles13, _props_styles14, _props_styles15, _props_styles16;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(gaugeChartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n chart: mergeClasses(gaugeChartClassNames.chart, baseStyles.chart, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chart),\n limits: mergeClasses(gaugeChartClassNames.limits, baseStyles.limits, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.limits),\n chartValue: mergeClasses(gaugeChartClassNames.chartValue, baseStyles.chartValue, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartValue),\n sublabel: mergeClasses(gaugeChartClassNames.sublabel, baseStyles.sublabel, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.sublabel),\n needle: mergeClasses(gaugeChartClassNames.needle, baseStyles.needle, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.needle),\n chartTitle: mergeClasses(gaugeChartClassNames.chartTitle, baseStyles.chartTitle, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.chartTitle),\n segment: mergeClasses(gaugeChartClassNames.segment, baseStyles.segment, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.segment),\n gradientSegment: mergeClasses(gaugeChartClassNames.gradientSegment, baseStyles.gradientSegment, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.gradientSegment),\n calloutContentRoot: mergeClasses(gaugeChartClassNames.calloutContentRoot, baseStyles.calloutContentRoot, (_props_styles9 = props.styles) === null || _props_styles9 === void 0 ? void 0 : _props_styles9.calloutContentRoot),\n calloutDateTimeContainer: mergeClasses(gaugeChartClassNames.calloutDateTimeContainer, baseStyles.calloutDateTimeContainer, (_props_styles10 = props.styles) === null || _props_styles10 === void 0 ? void 0 : _props_styles10.calloutDateTimeContainer),\n calloutContentX: mergeClasses(gaugeChartClassNames.calloutContentX, baseStyles.calloutContentX, (_props_styles11 = props.styles) === null || _props_styles11 === void 0 ? void 0 : _props_styles11.calloutContentX),\n calloutBlockContainer: mergeClasses(gaugeChartClassNames.calloutBlockContainer, baseStyles.calloutBlockContainer, (_props_styles12 = props.styles) === null || _props_styles12 === void 0 ? void 0 : _props_styles12.calloutBlockContainer),\n shapeStyles: mergeClasses(gaugeChartClassNames.shapeStyles, baseStyles.shapeStyles, (_props_styles13 = props.styles) === null || _props_styles13 === void 0 ? void 0 : _props_styles13.shapeStyles),\n calloutlegendText: mergeClasses(gaugeChartClassNames.calloutlegendText, baseStyles.calloutlegendText, (_props_styles14 = props.styles) === null || _props_styles14 === void 0 ? void 0 : _props_styles14.calloutlegendText),\n calloutContentY: mergeClasses(gaugeChartClassNames.calloutContentY, baseStyles.calloutContentY, (_props_styles15 = props.styles) === null || _props_styles15 === void 0 ? void 0 : _props_styles15.calloutContentY),\n descriptionMessage: mergeClasses(gaugeChartClassNames.descriptionMessage, baseStyles.descriptionMessage, (_props_styles16 = props.styles) === null || _props_styles16 === void 0 ? void 0 : _props_styles16.descriptionMessage)\n };\n};\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,OAAO,MAAMC,oBAAoB,GAAG;EAChCC,IAAI,EAAE,cAAc;EACpBC,KAAK,EAAE,eAAe;EACtBC,MAAM,EAAE,gBAAgB;EACxBC,UAAU,EAAE,oBAAoB;EAChCC,QAAQ,EAAE,kBAAkB;EAC5BC,MAAM,EAAE,gBAAgB;EACxBC,UAAU,EAAE,oBAAoB;EAChCC,OAAO,EAAE,iBAAiB;EAC1BC,eAAe,EAAE,yBAAyB;EAC1CC,kBAAkB,EAAE,4BAA4B;EAChDC,wBAAwB,EAAE,kCAAkC;EAC5DC,eAAe,EAAE,yBAAyB;EAC1CC,qBAAqB,EAAE,+BAA+B;EACtDC,WAAW,EAAE,qBAAqB;EAClCC,iBAAiB,EAAE,2BAA2B;EA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AU,CAAC/D,qBAAqB,EAAE,CAAC0D,eAAe,GAAGb,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIN,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,qBAAqB,CAAC;IAC3OC,WAAW,EAAEhB,YAAY,CAACE,oBAAoB,CAACc,WAAW,EAAE8D,UAAU,CAAC9D,WAAW,EAAE,CAAC0D,eAAe,GAAGd,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIL,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,WAAW,CAAC;IACnMC,iBAAiB,EAAEjB,YAAY,CAACE,oBAAoB,CAACe,iBAAiB,EAAE6D,UAAU,CAAC7D,iBAAiB,EAAE,CAAC0D,eAAe,GAAGf,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIJ,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,iBAAiB,CAAC;IAC3NC,eAAe,EAAElB,YAAY,CAACE,oBAAoB,CAACgB,eAAe,EAAE4D,UAAU,CAAC5D,eAAe,EAAE,CAAC0D,eAAe,GAAGhB,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIH,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,eAAe,CAAC;IACnNC,kBAAkB,EAAEnB,YAAY,CAACE,oBAAoB,CAACiB,kBAAkB,EAAE2D,UAAU,CAAC3D,kBAAkB,EAAE,CAAC0D,eAAe,GAAGjB,KAAK,CAACmB,MAAM,MAAM,IAAI,IAAIF,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAAC1D,kBAAkB;EAClO,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { useGroupedVerticalBarChartStyles_unstable } from './useGroupedVerticalBarChartStyles.styles';
3
- import { max as d3Max } from 'd3-array';
4
3
  import { select as d3Select } from 'd3-selection';
5
- import { scaleBand as d3ScaleBand, scaleLinear as d3ScaleLinear } from 'd3-scale';
4
+ import { max as d3Max, min as d3Min } from 'd3-array';
5
+ import { scaleBand as d3ScaleBand } from 'd3-scale';
6
6
  import { useId } from '@fluentui/react-utilities';
7
7
  import { ChartTypes, getAccessibleDataObject, tooltipOfXAxislabels, XAxisTypes, getTypeOfAxis, formatScientificLimitWidth, getScalePadding, getBarWidth, isScalePaddingDefined, getNextColor, areArraysEqual, calculateLongestLabelWidth, useRtl } from '../../utilities/index';
8
8
  import { CartesianChart, Legends, DataVizPalette, getColorFromToken } from '../../index';
@@ -11,6 +11,8 @@ const X1_INNER_PADDING = 0.1;
11
11
  // x1_inner_padding = space_between_bars / (space_between_bars + bar_width)
12
12
  // => space_between_bars = (x1_inner_padding / (1 - x1_inner_padding)) * bar_width
13
13
  /** Rate at which the space between the bars in a group changes wrt the bar width */ const BAR_GAP_RATE = X1_INNER_PADDING / (1 - X1_INNER_PADDING);
14
+ const VERTICAL_BAR_GAP = 1;
15
+ const MIN_BAR_HEIGHT = 1;
14
16
  export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
15
17
  maxBarWidth: 24
16
18
  }, forwardedRef)=>{
@@ -19,7 +21,6 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
19
21
  const _emptyChartId = useId('_GVBC_empty');
20
22
  const _useRtl = useRtl();
21
23
  let _domainMargin = MIN_DOMAIN_MARGIN;
22
- let _dataset = [];
23
24
  let _keys = [];
24
25
  let _xAxisLabels = [];
25
26
  let _datasetForBars = [];
@@ -38,6 +39,7 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
38
39
  let _xAxisInnerPadding = 0;
39
40
  let _xAxisOuterPadding = 0;
40
41
  const cartesianChartRef = React.useRef(null);
42
+ const Y_ORIGIN = 0;
41
43
  const [color, setColor] = React.useState('');
42
44
  const [dataForHoverCard, setDataForHoverCard] = React.useState(0);
43
45
  const [selectedLegends, setSelectedLegends] = React.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
@@ -101,7 +103,6 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
101
103
  datasetForBars.push(singleDatasetPointForBars);
102
104
  dataset.push(singleDatasetPoint);
103
105
  });
104
- _dataset = dataset;
105
106
  return datasetForBars;
106
107
  };
107
108
  const _createDataSetOfGVBC = (points)=>{
@@ -175,8 +176,26 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
175
176
  const _xAxisType = getTypeOfAxis(points[0].name, true);
176
177
  const legends = _getLegendData(points);
177
178
  _adjustProps();
179
+ // eslint-disable-next-line @typescript-eslint/no-explicit-anyAdd commentMore actions
180
+ function _getMinMaxOfYAxis(datasetForBars, yAxisType, useSecondaryYScale) {
181
+ const values = [];
182
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
183
+ datasetForBars.forEach((data)=>{
184
+ data.groupSeries.forEach((point)=>{
185
+ if (!useSecondaryYScale === !point.useSecondaryYScale) {
186
+ values.push(point.data);
187
+ }
188
+ });
189
+ });
190
+ return {
191
+ startValue: d3Min(values),
192
+ endValue: d3Max(values)
193
+ };
194
+ }
195
+ // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated
196
+ // using only the data points associated with the primary y-axis.
178
197
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
179
- const yMax = d3Max(_dataset, (point)=>d3Max(_keys, (key)=>point[key]));
198
+ const yMax = _getMinMaxOfYAxis(_datasetForBars).endValue;
180
199
  _yMax = Math.max(yMax, props.yMaxValue || 0);
181
200
  var _props_culture;
182
201
  const calloutProps = {
@@ -197,7 +216,7 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
197
216
  tickValues: props.tickValues,
198
217
  tickFormat: props.tickFormat
199
218
  };
200
- const _getGraphData = (xScale, yScale, containerHeight, containerWidth, xElement)=>{
219
+ const _getGraphData = (xScale, yScalePrimary, containerHeight, containerWidth, xElement, yAxisElement, yScaleSecondary)=>{
201
220
  const xScale0 = _createX0Scale(containerWidth);
202
221
  // Setting the bar width here is safe because there are no dependencies earlier in the code
203
222
  // that rely on the width of bars in vertical bar charts with string x-axis.
@@ -206,7 +225,7 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
206
225
  const xScale1 = _createX1Scale();
207
226
  const allGroupsBars = [];
208
227
  _datasetForBars.forEach((singleSet)=>{
209
- allGroupsBars.push(_buildGraph(singleSet, xScale0, xScale1, containerHeight, xElement));
228
+ allGroupsBars.push(_buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement));
210
229
  });
211
230
  _groupedVerticalBarGraph = allGroupsBars;
212
231
  };
@@ -279,31 +298,37 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
279
298
  const _buildGraph = (// eslint-disable-next-line @typescript-eslint/no-explicit-any
280
299
  singleSet, // eslint-disable-next-line @typescript-eslint/no-explicit-any
281
300
  xScale0, // eslint-disable-next-line @typescript-eslint/no-explicit-any
282
- xScale1, containerHeight, xElement)=>{
301
+ xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement)=>{
283
302
  const singleGroup = [];
284
303
  const barLabelsForGroup = [];
285
- const yBarScale = d3ScaleLinear().domain([
286
- 0,
287
- yMax
288
- ]).range([
289
- 0,
290
- containerHeight - _margins.bottom - _margins.top
291
- ]);
292
304
  const tempDataSet = Object.keys(datasetForBars[0]).splice(0, keys.length);
293
305
  tempDataSet.forEach((datasetKey, index)=>{
294
306
  const refIndexNumber = singleSet.indexNum * tempDataSet.length + index;
295
307
  const pointData = singleSet[datasetKey];
308
+ const yBarScale = pointData.useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;
296
309
  // To align the centers of the generated bandwidth and the calculated one when they differ,
297
310
  // use the following addend.
298
311
  const xPoint = xScale1(datasetKey) + (xScale1.bandwidth() - _barWidth) / 2;
299
- const yPoint = Math.max(containerHeight - _margins.bottom - yBarScale(pointData.data), 0);
300
312
  const startColor = pointData.color ? pointData.color : getNextColor(index, 0);
313
+ const yBaseline = yBarScale(Y_ORIGIN);
314
+ let yPositiveStart = yBaseline;
315
+ let yNegativeStart = yBaseline;
316
+ let yPoint = Y_ORIGIN;
317
+ const barGap = VERTICAL_BAR_GAP / 2 * (index > 0 ? 2 : 0);
318
+ const height = Math.max(yBarScale(Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);
319
+ if (pointData.data >= Y_ORIGIN) {
320
+ yPositiveStart -= height + barGap;
321
+ yPoint = yPositiveStart;
322
+ } else {
323
+ yPoint = yNegativeStart + barGap;
324
+ yNegativeStart = yPoint + height;
325
+ }
301
326
  // Not rendering data with 0.
302
327
  pointData.data && singleGroup.push(/*#__PURE__*/ React.createElement(React.Fragment, {
303
328
  key: `${singleSet.indexNum}-${index}`
304
329
  }, /*#__PURE__*/ React.createElement("rect", {
305
330
  className: classes.opacityChangeOnHover,
306
- height: Math.max(yBarScale(pointData.data), 0),
331
+ height: height,
307
332
  width: _barWidth,
308
333
  x: xPoint,
309
334
  y: yPoint,
@@ -328,7 +353,7 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
328
353
  barLabelsForGroup.push(/*#__PURE__*/ React.createElement("text", {
329
354
  key: `${singleSet.indexNum}-${index}`,
330
355
  x: xPoint + _barWidth / 2,
331
- y: yPoint - 6,
356
+ y: pointData.data >= Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12,
332
357
  textAnchor: "middle",
333
358
  className: classes.barLabel,
334
359
  "aria-hidden": true
@@ -468,6 +493,7 @@ export const GroupedVerticalBarChart = /*#__PURE__*/ React.forwardRef((props = {
468
493
  chartTitle: _getChartTitle(),
469
494
  points: _datasetForBars,
470
495
  chartType: ChartTypes.GroupedVerticalBarChart,
496
+ getMinMaxOfYAxis: _getMinMaxOfYAxis,
471
497
  calloutProps: calloutProps,
472
498
  legendBars: legends,
473
499
  xAxisType: _xAxisType,
@@ -1 +1 @@
1
- {"version":3,"sources":["GroupedVerticalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useGroupedVerticalBarChartStyles_unstable } from './useGroupedVerticalBarChartStyles.styles';\nimport { max as d3Max } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { scaleBand as d3ScaleBand, scaleLinear as d3ScaleLinear } from 'd3-scale';\n\nimport { useId } from '@fluentui/react-utilities';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfXAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n} from '../../utilities/index';\n\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n RefArrayData,\n GroupedVerticalBarChartProps,\n GroupedVerticalBarChartData,\n GVBarChartSeriesPoint,\n Legends,\n YValueHover,\n DataVizPalette,\n getColorFromToken,\n ChartPopoverProps,\n Chart,\n} from '../../index';\n\ntype StringAxis = D3Axis<string>;\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\n// x1_inner_padding = space_between_bars / (space_between_bars + bar_width)\n// => space_between_bars = (x1_inner_padding / (1 - x1_inner_padding)) * bar_width\n/** Rate at which the space between the bars in a group changes wrt the bar width */\nconst BAR_GAP_RATE = X1_INNER_PADDING / (1 - X1_INNER_PADDING);\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface GVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface GVSingleDataPoint {\n [key: string]: GVDataPoint;\n}\n\nexport const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n GroupedVerticalBarChartProps\n>((props = { maxBarWidth: 24 }, forwardedRef) => {\n const _tooltipId: string = useId('GVBCTooltipId_');\n const _emptyChartId: string = useId('_GVBC_empty');\n const _useRtl: boolean = useRtl();\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _dataset: GVDataPoint[] = [];\n let _keys: string[] = [];\n let _xAxisLabels: string[] = [];\n let _datasetForBars: any[] = [];\n let _margins: Margins = { top: 0, right: 0, bottom: 0, left: 0 };\n let _groupedVerticalBarGraph: JSX.Element[] = [];\n let _refArray: RefArrayData[] = [];\n let _yMax: number = 0;\n let _calloutAnchorPoint: GVBarChartSeriesPoint | null = null;\n let _barWidth: number = 0;\n let _groupWidth: number = 0;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<YValueHover[]>([]);\n const [hoverXValue, setHoverXValue] = React.useState<string>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps | undefined>(\n undefined,\n );\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const classes = useGroupedVerticalBarChartStyles_unstable(props);\n\n React.useEffect(() => {\n if (!areArraysEqual(props.legendProps?.selectedLegends, selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }, [props.legendProps?.selectedLegends]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n const _adjustProps = () => {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = keys.length * bar_width + (keys.length - 1) * space_between_bars\n _xAxisInnerPadding = getScalePadding(\n props.xAxisInnerPadding,\n undefined,\n 2 / (2 + keys.length + (keys.length - 1) * BAR_GAP_RATE),\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding);\n };\n\n const _createDataset = (points: GroupedVerticalBarChartData[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n const dataset: GVDataPoint[] = [];\n\n points.forEach((point: GroupedVerticalBarChartData, index: number) => {\n const singleDatasetPoint: GVDataPoint = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const singleDataSeries: GVBarChartSeriesPoint[] = [];\n\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint, seriesIndex) => {\n singleDatasetPoint[seriesPoint.key] = seriesPoint.data;\n singleDatasetPointForBars[seriesPoint.key] = {\n ...seriesPoint,\n };\n singleDataSeries.push(seriesPoint);\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = singleDataSeries;\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n dataset.push(singleDatasetPoint);\n });\n _dataset = dataset;\n return datasetForBars;\n };\n\n const _createDataSetOfGVBC = (points: GroupedVerticalBarChartData[]) => {\n const keys: string[] = [];\n const xAxisLabels: string[] = points.map(singlePoint => singlePoint.name);\n points[0].series.forEach((singleKey: GVBarChartSeriesPoint) => {\n keys.push(singleKey.key);\n });\n const datasetForBars = _createDataset(points);\n return {\n keys,\n xAxisLabels,\n datasetForBars,\n };\n };\n\n const onLegendSelectionChange = (\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void => {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(selectedLegends);\n } else {\n setSelectedLegends(selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n };\n\n const _getLegendData = (points: GroupedVerticalBarChartData[]): JSX.Element => {\n const data = points;\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color2),\n getColorFromToken(DataVizPalette.color3),\n getColorFromToken(DataVizPalette.color4),\n getColorFromToken(DataVizPalette.color5),\n ];\n const actions: Legend[] = [];\n\n data.forEach((singleChartData: GroupedVerticalBarChartData) => {\n singleChartData.series.forEach((point: GVBarChartSeriesPoint) => {\n let color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: Legend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n const legend: Legend = {\n title: point.legend,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n });\n return (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={onLegendSelectionChange}\n />\n );\n };\n\n const points = props.data;\n const { keys, xAxisLabels, datasetForBars } = _createDataSetOfGVBC(points!);\n _keys = keys;\n _xAxisLabels = xAxisLabels;\n _datasetForBars = datasetForBars;\n const _xAxisType: XAxisTypes = getTypeOfAxis(points![0].name, true) as XAxisTypes;\n const legends: JSX.Element = _getLegendData(points!);\n _adjustProps();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = d3Max(_dataset, (point: any) => d3Max(_keys, (key: string) => point[key]));\n _yMax = Math.max(yMax, props.yMaxValue || 0);\n\n const calloutProps: ChartPopoverProps = {\n clickPosition,\n isPopoverOpen,\n color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover,\n hoverXValue,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: props.tickValues!,\n tickFormat: props.tickFormat!,\n };\n\n const _getGraphData = (\n xScale: StringAxis | NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n ) => {\n const xScale0 = _createX0Scale(containerWidth);\n\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n xScale0.bandwidth() / (_keys.length + (_keys.length - 1) * BAR_GAP_RATE),\n );\n _groupWidth = (_keys.length + (_keys.length - 1) * BAR_GAP_RATE) * _barWidth;\n\n const xScale1 = _createX1Scale();\n const allGroupsBars: JSX.Element[] = [];\n _datasetForBars.forEach((singleSet: GVSingleDataPoint) => {\n allGroupsBars.push(_buildGraph(singleSet, xScale0, xScale1, containerHeight, xElement!));\n });\n _groupedVerticalBarGraph = allGroupsBars;\n };\n\n const _getMargins = (margins: Margins) => {\n _margins = margins;\n };\n\n const _getOpacity = (legendTitle: string): string => {\n const opacity = _legendHighlighted(legendTitle) || _noLegendHighlighted() ? '' : '0.1';\n return opacity;\n };\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n const onBarHover = (\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (_calloutAnchorPoint !== pointData) {\n _calloutAnchorPoint = pointData;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData!);\n setYCalloutValue(pointData.yAxisCalloutData!);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(groupData.groupSeries);\n setHoverXValue(pointData.xAxisCalloutData!);\n }\n };\n\n const _onBarLeave = (): void => {\n /**/\n };\n\n const _handleChartMouseLeave = (): void => {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n };\n\n const onBarFocus = (\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n refArrayIndexNumber: number,\n ): void => {\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (obj.index === pointData.legend && refArrayIndexNumber === index) {\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData!);\n setYCalloutValue(pointData.yAxisCalloutData!);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(groupData.groupSeries);\n setHoverXValue(pointData.xAxisCalloutData!);\n }\n });\n };\n\n const _refCallback = (element: SVGRectElement, legendTitle: string, refIndexNumber: number): void => {\n _refArray[refIndexNumber] = { index: legendTitle, refElement: element };\n };\n\n const _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element => {\n const singleGroup: JSX.Element[] = [];\n const barLabelsForGroup: JSX.Element[] = [];\n\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([0, containerHeight! - _margins.bottom! - _margins.top!]);\n\n const tempDataSet = Object.keys(datasetForBars[0]).splice(0, keys.length);\n tempDataSet.forEach((datasetKey: string, index: number) => {\n const refIndexNumber = singleSet.indexNum * tempDataSet.length + index;\n const pointData = singleSet[datasetKey];\n // To align the centers of the generated bandwidth and the calculated one when they differ,\n // use the following addend.\n const xPoint = xScale1(datasetKey) + (xScale1.bandwidth() - _barWidth) / 2;\n const yPoint = Math.max(containerHeight! - _margins.bottom! - yBarScale(pointData.data), 0);\n const startColor = pointData.color ? pointData.color : getNextColor(index, 0);\n\n // Not rendering data with 0.\n pointData.data &&\n singleGroup.push(\n <React.Fragment key={`${singleSet.indexNum}-${index}`}>\n <rect\n className={classes.opacityChangeOnHover}\n height={Math.max(yBarScale(pointData.data), 0)}\n width={_barWidth}\n x={xPoint}\n y={yPoint}\n data-is-focusable={!props.hideTooltip && (_legendHighlighted(pointData.legend) || _noLegendHighlighted())}\n opacity={_getOpacity(pointData.legend)}\n ref={(e: SVGRectElement | null) => {\n _refCallback(e!, pointData.legend, refIndexNumber);\n }}\n fill={startColor}\n rx={0}\n onMouseOver={onBarHover.bind(null, pointData, singleSet)}\n onMouseMove={onBarHover.bind(null, pointData, singleSet)}\n onMouseOut={_onBarLeave}\n onFocus={onBarFocus.bind(null, pointData, singleSet, refIndexNumber)}\n onBlur={_onBarLeave}\n onClick={pointData.onClick}\n aria-label={getAriaLabel(pointData, singleSet.xAxisPoint)}\n tabIndex={_legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined}\n role=\"img\"\n />\n </React.Fragment>,\n );\n if (\n pointData.data &&\n !props.hideLabels &&\n _barWidth >= 16 &&\n (_legendHighlighted(pointData.legend) || _noLegendHighlighted())\n ) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${index}`}\n x={xPoint + _barWidth / 2}\n y={yPoint - 6}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(pointData.data)\n : formatScientificLimitWidth(pointData.data)}\n </text>,\n );\n }\n });\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - _groupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n const _createX0Scale = (containerWidth: number) => {\n const x0Axis = d3ScaleBand()\n .domain(xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth! - _margins.right! - _domainMargin, _margins.left! + _domainMargin]\n : [_margins.left! + _domainMargin, containerWidth! - _margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(keys)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(_useRtl ? [_groupWidth, 0] : [0, _groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n const _onLegendHover = (legendTitle: string): void => {\n setActiveLegend(legendTitle);\n };\n\n const _onLegendLeave = (): void => {\n setActiveLegend('');\n };\n\n const _getAxisData = React.useCallback(\n (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n }\n },\n [props.yMaxValue],\n );\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n const _legendHighlighted = (legendTitle: string) => {\n return _getHighlightedLegend().includes(legendTitle!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n const _noLegendHighlighted = () => {\n return _getHighlightedLegend().length === 0;\n };\n\n const _getHighlightedLegend = () => {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n };\n\n const getAriaLabel = (point: GVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n const _getDomainMargins = (containerWidth: number): Margins => {\n /** Total width available to render the bars */\n const totalWidth = containerWidth - (_margins.left! + MIN_DOMAIN_MARGIN) - (_margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the groups changes wrt the group width */\n const groupGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first group and after the last group.\n _domainMargin = 0;\n } else if (props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const groupWidth = (keys.length + (keys.length - 1) * BAR_GAP_RATE) * _barWidth;\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = (xAxisLabels.length + (xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (props.mode === 'plotly' && xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering groups at their maximum allowable width\n const groupBandwidth = totalWidth / (xAxisLabels.length + (xAxisLabels.length - 1) * groupGapRate);\n const barBandwidth = groupBandwidth / (keys.length + (keys.length - 1) * BAR_GAP_RATE);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, barBandwidth);\n const groupWidth = (keys.length + (keys.length - 1) * BAR_GAP_RATE) * barWidth;\n let reqWidth = (xAxisLabels.length + (xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(xAxisLabels) + 20;\n reqWidth = (xAxisLabels.length - _xAxisInnerPadding) * step;\n const margin2 = (totalWidth - reqWidth) / 2;\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n };\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.filter((item: GroupedVerticalBarChartData) => item.series.length).length > 0\n );\n };\n\n const _getChartTitle = (): string => {\n return (\n (props.chartTitle ? `${props.chartTitle}. ` : '') +\n `Vertical bar chart with ${_xAxisLabels.length} groups of ${_keys.length} bars each. `\n );\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n calloutProps={calloutProps}\n legendBars={legends}\n xAxisType={_xAxisType}\n datasetForXAxisDomain={_xAxisLabels}\n tickParams={tickParams}\n tickPadding={props.tickPadding || 5}\n maxOfYVal={_yMax}\n getmargins={_getMargins}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n barwidth={_barWidth}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={() => {\n return <g>{_groupedVerticalBarGraph}</g>;\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nGroupedVerticalBarChart.displayName = 'GroupedVerticalBarChart';\n"],"names":["React","useGroupedVerticalBarChartStyles_unstable","max","d3Max","select","d3Select","scaleBand","d3ScaleBand","scaleLinear","d3ScaleLinear","useId","ChartTypes","getAccessibleDataObject","tooltipOfXAxislabels","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getScalePadding","getBarWidth","isScalePaddingDefined","getNextColor","areArraysEqual","calculateLongestLabelWidth","useRtl","CartesianChart","Legends","DataVizPalette","getColorFromToken","MIN_DOMAIN_MARGIN","X1_INNER_PADDING","BAR_GAP_RATE","GroupedVerticalBarChart","forwardRef","props","maxBarWidth","forwardedRef","_tooltipId","_emptyChartId","_useRtl","_domainMargin","_dataset","_keys","_xAxisLabels","_datasetForBars","_margins","top","right","bottom","left","_groupedVerticalBarGraph","_refArray","_yMax","_calloutAnchorPoint","_barWidth","_groupWidth","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","color","setColor","useState","dataForHoverCard","setDataForHoverCard","selectedLegends","setSelectedLegends","legendProps","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","YValueHover","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","activeLegend","setActiveLegend","callOutAccessibilityData","setCallOutAccessibilityData","undefined","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","classes","useEffect","useImperativeHandle","componentRef","chartContainer","current","_adjustProps","barWidth","xAxisInnerPadding","keys","length","xAxisOuterPadding","_createDataset","points","datasetForBars","dataset","forEach","point","index","singleDatasetPoint","singleDatasetPointForBars","singleDataSeries","series","seriesPoint","seriesIndex","key","data","push","xAxisPoint","name","indexNum","groupSeries","stackCallOutAccessibilityData","_createDataSetOfGVBC","xAxisLabels","map","singlePoint","singleKey","onLegendSelectionChange","event","currentLegend","canSelectMultipleLegends","slice","onChange","_getLegendData","defaultPalette","color1","color2","color3","color4","color5","actions","singleChartData","Math","floor","random","checkSimilarLegends","filter","leg","title","legend","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","_xAxisType","yMax","yMaxValue","calloutProps","XValue","YValue","culture","isCartesian","tickParams","tickValues","tickFormat","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","xScale0","_createX0Scale","bandwidth","xScale1","_createX1Scale","allGroupsBars","singleSet","_buildGraph","_getMargins","margins","_getOpacity","legendTitle","opacity","_legendHighlighted","_noLegendHighlighted","updatePosition","newX","newY","threshold","distance","sqrt","pow","onBarHover","pointData","groupData","mouseEvent","persist","clientX","clientY","xAxisCalloutData","yAxisCalloutData","isCalloutForStack","_onBarLeave","onBarFocus","refArrayIndexNumber","obj","_refCallback","element","refIndexNumber","refElement","singleGroup","barLabelsForGroup","yBarScale","domain","range","tempDataSet","Object","splice","datasetKey","xPoint","yPoint","startColor","Fragment","rect","className","opacityChangeOnHover","height","width","data-is-focusable","hideTooltip","ref","e","fill","rx","onMouseOver","bind","onMouseMove","onMouseOut","onFocus","onBlur","onClick","aria-label","getAriaLabel","tabIndex","role","hideLabels","text","textAnchor","barLabel","aria-hidden","yAxisTickFormat","wrapXAxisLables","showXAxisLablesTooltip","xAxisElement","call","document","getElementById","remove","tooltipProps","tooltipCls","tooltip","id","xAxis","g","transform","x0Axis","paddingInner","paddingOuter","_getAxisData","useCallback","yAxisData","yAxisDomainValues","domainValue","_getHighlightedLegend","includes","xValue","yValue","ariaLabel","_getDomainMargins","totalWidth","groupGapRate","StringAxis","groupWidth","reqWidth","mode","groupBandwidth","barBandwidth","margin1","step","margin2","min","_isChartEmpty","item","_getChartTitle","chartTitle","chartType","legendBars","xAxisType","datasetForXAxisDomain","tickPadding","maxOfYVal","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","barwidth","children","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yCAAyC,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Z4H,cAAc1I;QACd2I,aAAanC;QACboC,mBAAmBhK;QACnBiK,kBAAkB3B;QACjB,GAAI7H,eAAejJ,WAAWiR,UAAU,IAAI;YAC3C/L,mBAAmBzC;YACnB4C,mBAAmB3C;QACrB,CAAC;QACDgQ,UAAUnQ;QACVsC,cAAclC;QACd,oCAAoC,GACpCgQ,UAAU;YACR,qBAAO,oBAAC5C,WAAG5N;QACb;uBAGF,oBAACyQ;QAAI/C,IAAItO;QAAeqN,MAAM;QAASiE,OAAO;YAAE/H,SAAS;QAAI;QAAG2D,cAAY;;AAEhF,GAAG;AACHxN,wBAAwB6R,WAAW,GAAG"}
1
+ {"version":3,"sources":["GroupedVerticalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useGroupedVerticalBarChartStyles_unstable } from './useGroupedVerticalBarChartStyles.styles';\nimport { select as d3Select } from 'd3-selection';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\n\nimport { useId } from '@fluentui/react-utilities';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfXAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n YAxisType,\n} from '../../utilities/index';\n\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n RefArrayData,\n GroupedVerticalBarChartProps,\n GroupedVerticalBarChartData,\n GVBarChartSeriesPoint,\n Legends,\n YValueHover,\n DataVizPalette,\n getColorFromToken,\n ChartPopoverProps,\n Chart,\n} from '../../index';\n\ntype StringAxis = D3Axis<string>;\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\n// x1_inner_padding = space_between_bars / (space_between_bars + bar_width)\n// => space_between_bars = (x1_inner_padding / (1 - x1_inner_padding)) * bar_width\n/** Rate at which the space between the bars in a group changes wrt the bar width */\nconst BAR_GAP_RATE = X1_INNER_PADDING / (1 - X1_INNER_PADDING);\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface GVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface GVSingleDataPoint {\n [key: string]: GVDataPoint;\n}\n\nexport const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n GroupedVerticalBarChartProps\n>((props = { maxBarWidth: 24 }, forwardedRef) => {\n const _tooltipId: string = useId('GVBCTooltipId_');\n const _emptyChartId: string = useId('_GVBC_empty');\n const _useRtl: boolean = useRtl();\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _keys: string[] = [];\n let _xAxisLabels: string[] = [];\n let _datasetForBars: any[] = [];\n let _margins: Margins = { top: 0, right: 0, bottom: 0, left: 0 };\n let _groupedVerticalBarGraph: JSX.Element[] = [];\n let _refArray: RefArrayData[] = [];\n let _yMax: number = 0;\n let _calloutAnchorPoint: GVBarChartSeriesPoint | null = null;\n let _barWidth: number = 0;\n let _groupWidth: number = 0;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n const Y_ORIGIN: number = 0;\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<YValueHover[]>([]);\n const [hoverXValue, setHoverXValue] = React.useState<string>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps | undefined>(\n undefined,\n );\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const classes = useGroupedVerticalBarChartStyles_unstable(props);\n\n React.useEffect(() => {\n if (!areArraysEqual(props.legendProps?.selectedLegends, selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }, [props.legendProps?.selectedLegends]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n const _adjustProps = () => {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = keys.length * bar_width + (keys.length - 1) * space_between_bars\n _xAxisInnerPadding = getScalePadding(\n props.xAxisInnerPadding,\n undefined,\n 2 / (2 + keys.length + (keys.length - 1) * BAR_GAP_RATE),\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding);\n };\n\n const _createDataset = (points: GroupedVerticalBarChartData[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n const dataset: GVDataPoint[] = [];\n\n points.forEach((point: GroupedVerticalBarChartData, index: number) => {\n const singleDatasetPoint: GVDataPoint = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const singleDataSeries: GVBarChartSeriesPoint[] = [];\n\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint, seriesIndex) => {\n singleDatasetPoint[seriesPoint.key] = seriesPoint.data;\n singleDatasetPointForBars[seriesPoint.key] = {\n ...seriesPoint,\n };\n singleDataSeries.push(seriesPoint);\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = singleDataSeries;\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n dataset.push(singleDatasetPoint);\n });\n return datasetForBars;\n };\n\n const _createDataSetOfGVBC = (points: GroupedVerticalBarChartData[]) => {\n const keys: string[] = [];\n const xAxisLabels: string[] = points.map(singlePoint => singlePoint.name);\n points[0].series.forEach((singleKey: GVBarChartSeriesPoint) => {\n keys.push(singleKey.key);\n });\n const datasetForBars = _createDataset(points);\n return {\n keys,\n xAxisLabels,\n datasetForBars,\n };\n };\n\n const onLegendSelectionChange = (\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void => {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(selectedLegends);\n } else {\n setSelectedLegends(selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n };\n\n const _getLegendData = (points: GroupedVerticalBarChartData[]): JSX.Element => {\n const data = points;\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color2),\n getColorFromToken(DataVizPalette.color3),\n getColorFromToken(DataVizPalette.color4),\n getColorFromToken(DataVizPalette.color5),\n ];\n const actions: Legend[] = [];\n\n data.forEach((singleChartData: GroupedVerticalBarChartData) => {\n singleChartData.series.forEach((point: GVBarChartSeriesPoint) => {\n let color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: Legend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n const legend: Legend = {\n title: point.legend,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n });\n return (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={onLegendSelectionChange}\n />\n );\n };\n\n const points = props.data;\n const { keys, xAxisLabels, datasetForBars } = _createDataSetOfGVBC(points!);\n _keys = keys;\n _xAxisLabels = xAxisLabels;\n _datasetForBars = datasetForBars;\n const _xAxisType: XAxisTypes = getTypeOfAxis(points![0].name, true) as XAxisTypes;\n const legends: JSX.Element = _getLegendData(points!);\n _adjustProps();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-anyAdd commentMore actions\n function _getMinMaxOfYAxis(datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: GVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = _getMinMaxOfYAxis(_datasetForBars).endValue;\n _yMax = Math.max(yMax, props.yMaxValue || 0);\n\n const calloutProps: ChartPopoverProps = {\n clickPosition,\n isPopoverOpen,\n color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover,\n hoverXValue,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: props.tickValues!,\n tickFormat: props.tickFormat!,\n };\n\n const _getGraphData = (\n xScale: StringAxis | NumericAxis,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = _createX0Scale(containerWidth);\n\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n xScale0.bandwidth() / (_keys.length + (_keys.length - 1) * BAR_GAP_RATE),\n );\n _groupWidth = (_keys.length + (_keys.length - 1) * BAR_GAP_RATE) * _barWidth;\n\n const xScale1 = _createX1Scale();\n const allGroupsBars: JSX.Element[] = [];\n _datasetForBars.forEach((singleSet: GVSingleDataPoint) => {\n allGroupsBars.push(\n _buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n _groupedVerticalBarGraph = allGroupsBars;\n };\n\n const _getMargins = (margins: Margins) => {\n _margins = margins;\n };\n\n const _getOpacity = (legendTitle: string): string => {\n const opacity = _legendHighlighted(legendTitle) || _noLegendHighlighted() ? '' : '0.1';\n return opacity;\n };\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n const onBarHover = (\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (_calloutAnchorPoint !== pointData) {\n _calloutAnchorPoint = pointData;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData!);\n setYCalloutValue(pointData.yAxisCalloutData!);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(groupData.groupSeries);\n setHoverXValue(pointData.xAxisCalloutData!);\n }\n };\n\n const _onBarLeave = (): void => {\n /**/\n };\n\n const _handleChartMouseLeave = (): void => {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n };\n\n const onBarFocus = (\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n refArrayIndexNumber: number,\n ): void => {\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (obj.index === pointData.legend && refArrayIndexNumber === index) {\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData!);\n setYCalloutValue(pointData.yAxisCalloutData!);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(groupData.groupSeries);\n setHoverXValue(pointData.xAxisCalloutData!);\n }\n });\n };\n\n const _refCallback = (element: SVGRectElement, legendTitle: string, refIndexNumber: number): void => {\n _refArray[refIndexNumber] = { index: legendTitle, refElement: element };\n };\n\n const _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element => {\n const singleGroup: JSX.Element[] = [];\n const barLabelsForGroup: JSX.Element[] = [];\n\n const tempDataSet = Object.keys(datasetForBars[0]).splice(0, keys.length);\n tempDataSet.forEach((datasetKey: string, index: number) => {\n const refIndexNumber = singleSet.indexNum * tempDataSet.length + index;\n const pointData = singleSet[datasetKey];\n const yBarScale = pointData.useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n // To align the centers of the generated bandwidth and the calculated one when they differ,\n // use the following addend.\n const xPoint = xScale1(datasetKey) + (xScale1.bandwidth() - _barWidth) / 2;\n const startColor = pointData.color ? pointData.color : getNextColor(index, 0);\n\n const yBaseline = yBarScale(Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = Y_ORIGIN;\n\n const barGap = (VERTICAL_BAR_GAP / 2) * (index > 0 ? 2 : 0);\n const height = Math.max(yBarScale(Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n if (pointData.data >= Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n // Not rendering data with 0.\n pointData.data &&\n singleGroup.push(\n <React.Fragment key={`${singleSet.indexNum}-${index}`}>\n <rect\n className={classes.opacityChangeOnHover}\n height={height}\n width={_barWidth}\n x={xPoint}\n y={yPoint}\n data-is-focusable={!props.hideTooltip && (_legendHighlighted(pointData.legend) || _noLegendHighlighted())}\n opacity={_getOpacity(pointData.legend)}\n ref={(e: SVGRectElement | null) => {\n _refCallback(e!, pointData.legend, refIndexNumber);\n }}\n fill={startColor}\n rx={0}\n onMouseOver={onBarHover.bind(null, pointData, singleSet)}\n onMouseMove={onBarHover.bind(null, pointData, singleSet)}\n onMouseOut={_onBarLeave}\n onFocus={onBarFocus.bind(null, pointData, singleSet, refIndexNumber)}\n onBlur={_onBarLeave}\n onClick={pointData.onClick}\n aria-label={getAriaLabel(pointData, singleSet.xAxisPoint)}\n tabIndex={_legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined}\n role=\"img\"\n />\n </React.Fragment>,\n );\n if (\n pointData.data &&\n !props.hideLabels &&\n _barWidth >= 16 &&\n (_legendHighlighted(pointData.legend) || _noLegendHighlighted())\n ) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${index}`}\n x={xPoint + _barWidth / 2}\n y={pointData.data >= Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(pointData.data)\n : formatScientificLimitWidth(pointData.data)}\n </text>,\n );\n }\n });\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - _groupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n const _createX0Scale = (containerWidth: number) => {\n const x0Axis = d3ScaleBand()\n .domain(xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth! - _margins.right! - _domainMargin, _margins.left! + _domainMargin]\n : [_margins.left! + _domainMargin, containerWidth! - _margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(keys)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(_useRtl ? [_groupWidth, 0] : [0, _groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n const _onLegendHover = (legendTitle: string): void => {\n setActiveLegend(legendTitle);\n };\n\n const _onLegendLeave = (): void => {\n setActiveLegend('');\n };\n\n const _getAxisData = React.useCallback(\n (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n }\n },\n [props.yMaxValue],\n );\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n const _legendHighlighted = (legendTitle: string) => {\n return _getHighlightedLegend().includes(legendTitle!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n const _noLegendHighlighted = () => {\n return _getHighlightedLegend().length === 0;\n };\n\n const _getHighlightedLegend = () => {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n };\n\n const getAriaLabel = (point: GVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n const _getDomainMargins = (containerWidth: number): Margins => {\n /** Total width available to render the bars */\n const totalWidth = containerWidth - (_margins.left! + MIN_DOMAIN_MARGIN) - (_margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the groups changes wrt the group width */\n const groupGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first group and after the last group.\n _domainMargin = 0;\n } else if (props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const groupWidth = (keys.length + (keys.length - 1) * BAR_GAP_RATE) * _barWidth;\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = (xAxisLabels.length + (xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (props.mode === 'plotly' && xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering groups at their maximum allowable width\n const groupBandwidth = totalWidth / (xAxisLabels.length + (xAxisLabels.length - 1) * groupGapRate);\n const barBandwidth = groupBandwidth / (keys.length + (keys.length - 1) * BAR_GAP_RATE);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, barBandwidth);\n const groupWidth = (keys.length + (keys.length - 1) * BAR_GAP_RATE) * barWidth;\n let reqWidth = (xAxisLabels.length + (xAxisLabels.length - 1) * groupGapRate) * groupWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(xAxisLabels) + 20;\n reqWidth = (xAxisLabels.length - _xAxisInnerPadding) * step;\n const margin2 = (totalWidth - reqWidth) / 2;\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n };\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.filter((item: GroupedVerticalBarChartData) => item.series.length).length > 0\n );\n };\n\n const _getChartTitle = (): string => {\n return (\n (props.chartTitle ? `${props.chartTitle}. ` : '') +\n `Vertical bar chart with ${_xAxisLabels.length} groups of ${_keys.length} bars each. `\n );\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n calloutProps={calloutProps}\n legendBars={legends}\n xAxisType={_xAxisType}\n datasetForXAxisDomain={_xAxisLabels}\n tickParams={tickParams}\n tickPadding={props.tickPadding || 5}\n maxOfYVal={_yMax}\n getmargins={_getMargins}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n barwidth={_barWidth}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={() => {\n return <g>{_groupedVerticalBarGraph}</g>;\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nGroupedVerticalBarChart.displayName = 'GroupedVerticalBarChart';\n"],"names":["React","useGroupedVerticalBarChartStyles_unstable","select","d3Select","max","d3Max","min","d3Min","scaleBand","d3ScaleBand","useId","ChartTypes","getAccessibleDataObject","tooltipOfXAxislabels","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getScalePadding","getBarWidth","isScalePaddingDefined","getNextColor","areArraysEqual","calculateLongestLabelWidth","useRtl","CartesianChart","Legends","DataVizPalette","getColorFromToken","MIN_DOMAIN_MARGIN","X1_INNER_PADDING","BAR_GAP_RATE","VERTICAL_BAR_GAP","MIN_BAR_HEIGHT","GroupedVerticalBarChart","forwardRef","props","maxBarWidth","forwardedRef","_tooltipId","_emptyChartId","_useRtl","_domainMargin","_keys","_xAxisLabels","_datasetForBars","_margins","top","right","bottom","left","_groupedVerticalBarGraph","_refArray","_yMax","_calloutAnchorPoint","_barWidth","_groupWidth","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","Y_ORIGIN","color","setColor","useState","dataForHoverCard","setDataForHoverCard","selectedLegends","setSelectedLegends","legendProps","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","YValueHover","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","activeLegend","setActiveLegend","callOutAccessibilityData","setCallOutAccessibilityData","undefined","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","classes","useEffect","useImperativeHandle","componentRef","chartContainer","current","_adjustProps","barWidth","xAxisInnerPadding","keys","length","xAxisOuterPadding","_createDataset","points","datasetForBars","dataset","forEach","point","index","singleDatasetPoint","singleDatasetPointForBars","singleDataSeries","series","seriesPoint","seriesIndex","key","data","push","xAxisPoint","name","indexNum","groupSeries","stackCallOutAccessibilityData","_createDataSetOfGVBC","xAxisLabels","map","singlePoint","singleKey","onLegendSelectionChange","event","currentLegend","canSelectMultipleLegends","slice","onChange","_getLegendData","defaultPalette","color1","color2","color3","color4","color5","actions","singleChartData","Math","floor","random","checkSimilarLegends","filter","leg","title","legend","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","_xAxisType","_getMinMaxOfYAxis","yAxisType","useSecondaryYScale","values","startValue","endValue","yMax","yMaxValue","calloutProps","XValue","YValue","culture","isCartesian","tickParams","tickValues","tickFormat","_getGraphData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","xScale0","_createX0Scale","bandwidth","xScale1","_createX1Scale","allGroupsBars","singleSet","_buildGraph","_getMargins","margins","_getOpacity","legendTitle","opacity","_legendHighlighted","_noLegendHighlighted","updatePosition","newX","newY","threshold","distance","sqrt","pow","onBarHover","pointData","groupData","mouseEvent","persist","clientX","clientY","xAxisCalloutData","yAxisCalloutData","isCalloutForStack","_onBarLeave","onBarFocus","refArrayIndexNumber","obj","_refCallback","element","refIndexNumber","refElement","singleGroup","barLabelsForGroup","tempDataSet","Object","splice","datasetKey","yBarScale","xPoint","startColor","yBaseline","yPositiveStart","yNegativeStart","yPoint","barGap","height","abs","Fragment","rect","className","opacityChangeOnHover","width","data-is-focusable","hideTooltip","ref","e","fill","rx","onMouseOver","bind","onMouseMove","onMouseOut","onFocus","onBlur","onClick","aria-label","getAriaLabel","tabIndex","role","hideLabels","text","textAnchor","barLabel","aria-hidden","yAxisTickFormat","wrapXAxisLables","showXAxisLablesTooltip","xAxisElement","call","document","getElementById","remove","tooltipProps","tooltipCls","tooltip","id","xAxis","g","transform","x0Axis","domain","range","paddingInner","paddingOuter","_getAxisData","useCallback","yAxisData","yAxisDomainValues","domainValue","_getHighlightedLegend","includes","xValue","yValue","ariaLabel","_getDomainMargins","totalWidth","groupGapRate","StringAxis","groupWidth","reqWidth","mode","groupBandwidth","barBandwidth","margin1","step","margin2","_isChartEmpty","item","_getChartTitle","chartTitle","chartType","getMinMaxOfYAxis","legendBars","xAxisType","datasetForXAxisDomain","tickPadding","maxOfYVal","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","barwidth","children","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,wBAAwB0S,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["GroupedVerticalBarChart.types.ts"],"sourcesContent":["import {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n GroupedVerticalBarChartData,\n} from '../../index';\n\n/**\n * Vertical Bar Chart properties\n * {@docCategory VerticalBarChart}\n */\nexport interface GroupedVerticalBarChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: GroupedVerticalBarChartData[];\n\n /**\n * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,\n * which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.\n * @default 16\n */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Colors from which to select the color of each bar.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * This prop makes sure that all the bars are of same color.\n * it will take the first color from the array of colors in\n * prop `colors` or if `colors` prop is not given then default color is palette.blueLight\n * @default false\n */\n useSingleColor?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: GroupedVerticalBarChartStyles;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * To display multi stack callout or single callout\n * @default false\n */\n isCalloutForStack?: boolean;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * Maximum width of a bar, in pixels.\n * @default 24\n */\n maxBarWidth?: number;\n\n /**\n * Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).\n * Takes a number in the range [0, 1]. Only applicable to string x-axis.\n * @default 2/3\n */\n xAxisInnerPadding?: number;\n\n /**\n * Padding before the first bar and after the last bar as a fraction of\n * the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].\n * Only applicable to string x-axis.\n */\n xAxisOuterPadding?: number;\n\n /**\n * Specifies the mode of the chart.\n * @default 'default'\n */\n mode?: 'default' | 'plotly';\n}\n\n/**\n * Vertical Bar Chart style properties\n * {@docCategory VerticalBarChart}\n */\nexport interface GroupedVerticalBarChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * Vertical Bar Chart styles\n * {@docCategory VerticalBarChart}\n */\nexport interface GroupedVerticalBarChartStyles extends CartesianChartStyles {\n /**\n * Style for the bar labels\n */\n barLabel: string;\n}\n"],"names":[],"rangeMappings":";;;","mappings":"AAiGA;;;CAGC,GACD,WAKC"}
1
+ {"version":3,"sources":["GroupedVerticalBarChart.types.ts"],"sourcesContent":["import {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n GroupedVerticalBarChartData,\n} from '../../index';\n\n/**\n * Vertical Bar Chart properties\n * {@docCategory VerticalBarChart}\n */\nexport interface GroupedVerticalBarChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: GroupedVerticalBarChartData[];\n\n /**\n * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,\n * which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.\n * @default 16\n */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Colors from which to select the color of each bar.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * This prop makes sure that all the bars are of same color.\n * it will take the first color from the array of colors in\n * prop `colors` or if `colors` prop is not given then default color is palette.blueLight\n * @default false\n */\n useSingleColor?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: GroupedVerticalBarChartStyles;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * To display multi stack callout or single callout\n * @default false\n */\n isCalloutForStack?: boolean;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * Maximum width of a bar, in pixels.\n * @default 24\n */\n maxBarWidth?: number;\n\n /**\n * Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).\n * Takes a number in the range [0, 1]. Only applicable to string x-axis.\n * @default 2/3\n */\n xAxisInnerPadding?: number;\n\n /**\n * Padding before the first bar and after the last bar as a fraction of\n * the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].\n * Only applicable to string x-axis.\n */\n xAxisOuterPadding?: number;\n\n /**\n * Specifies the mode of the chart.\n * @default 'default'\n */\n mode?: 'default' | 'plotly';\n\n /**\n * @default false\n * The prop used to enable rounded corners for the chart.\n */\n roundCorners?: boolean;\n}\n\n/**\n * Vertical Bar Chart style properties\n * {@docCategory VerticalBarChart}\n */\nexport interface GroupedVerticalBarChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * Vertical Bar Chart styles\n * {@docCategory VerticalBarChart}\n */\nexport interface GroupedVerticalBarChartStyles extends CartesianChartStyles {\n /**\n * Style for the bar labels\n */\n barLabel: string;\n}\n"],"names":[],"rangeMappings":";;;","mappings":"AAuGA;;;CAGC,GACD,WAKC"}
@@ -59,14 +59,15 @@ const useStyles = /*#__PURE__*/__styles({
59
59
  Be2twd7: "fy9rknc",
60
60
  Bhrd7zp: "fl43uef",
61
61
  Bg96gwp: "fwrc4pm",
62
- Bkfmm31: "fhuob2q"
62
+ Bkfmm31: "fhuob2q",
63
+ Bvjb7m6: "fhv2zbx"
63
64
  }
64
65
  }, {
65
66
  d: [".f158kwzp{cursor:default;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".f5q6cfr{fill:var(--colorNeutralBackground1);}", [".fcm7iae{background:var(--colorNeutralBackground1);}", {
66
67
  p: -2
67
68
  }], [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
68
69
  p: -1
69
- }], ".f1aehjj5{pointer-events:none;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}"]
70
+ }], ".f1aehjj5{pointer-events:none;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".fhv2zbx{forced-color-adjust:auto;}"]
70
71
  });
71
72
  /**
72
73
  * Apply styling to the GroupedVerticalBarChart slots based on the state
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Bgh53k4","B2eet1l","De3pzq","Bcmaq0h","gk0gix","B20660r","B8a6bjv","Bpptf2m","e5kdtc","Bkjc3bi","ayd6f0","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","d","p","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"sources":["useGroupedVerticalBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const groupedVerticalBarChartClassNames = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n background: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1\n }\n});\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */ export const useGroupedVerticalBarChartStyles_unstable = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(groupedVerticalBarChartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ )\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,iCAAiC,GAAG;EAC7CC,oBAAoB,EAAE,gCAAgC;EACtDC,OAAO,EAAE,mBAAmB;EAC5BC,QAAQ,EAAE,oBAAoB;EAC9BC,IAAI,EAAE,EAAE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OAAO,CAAC,yBAA0B,CAAC;IAC/GC,QAAQ,EAAEP,YAAY,CAACI,iCAAiC,CAACG,QAAQ,EAAEkD,UAAU,CAAClD,QAAQ,CAAC,0BAA2B;EACtH,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Bgh53k4","B2eet1l","De3pzq","Bcmaq0h","gk0gix","B20660r","B8a6bjv","Bpptf2m","e5kdtc","Bkjc3bi","ayd6f0","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bvjb7m6","d","p","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"sources":["useGroupedVerticalBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const groupedVerticalBarChartClassNames = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n background: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n }\n});\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */ export const useGroupedVerticalBarChartStyles_unstable = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(groupedVerticalBarChartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ )\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,iCAAiC,GAAG;EAC7CC,oBAAoB,EAAE,gCAAgC;EACtDC,OAAO,EAAE,mBAAmB;EAC5BC,QAAQ,EAAE,oBAAoB;EAC9BC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAE,EAAE;EACTC,eAAe,EAAE,EAAE;EACnBC,KAAK,EAAE,EAAE;EACTC,kBAAkB,EAAE,EAAE;EACtBC,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,EAAE;EACdC,WAAW,EAAE,EAAE;EACfC,YAAY,EAAE,EAAE;EAChBC,UAAU,EAAE;AAChB,CAAC;AACD,MAAMC,SAAS,gBAAGpB,QAAA;EAAAM,oBAAA;IAAAe,OAAA;EAAA;EAAAd,OAAA;IAAAe,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAA7C,QAAA;IAAAc,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAU,OAAA;IAAAmB,OAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAuBjB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,yCAAyC,GAAIC,KAAK,IAAG;EAClE,MAAMC,UAAU,GAAGvC,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHd,oBAAoB,EAAEL,YAAY,CAACI,iCAAiC,CAACC,oBAAoB,EAAEqD,UAAU,CAACrD,oBAAoB,CAAC,sCAAuC,CAAC;IACnKC,OAAO,EAAEN,YAAY,CAACI,iCAAiC,CAACE,OAAO,EAAEoD,UAAU,CAACpD,OAAO,CAAC,yBAA0B,CAAC;IAC/GC,QAAQ,EAAEP,YAAY,CAACI,iCAAiC,CAACG,QAAQ,EAAEmD,UAAU,CAACnD,QAAQ,CAAC,0BAA2B;EACtH,CAAC;AACL,CAAC","ignoreList":[]}
@@ -575,7 +575,7 @@ export const HeatMapChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)
575
575
  tickParams: tickParams,
576
576
  /* eslint-disable react/jsx-no-bind */ children: (p)=>{
577
577
  _xAxisScale.current = p.xScale;
578
- _yAxisScale.current = p.yScale;
578
+ _yAxisScale.current = p.yScalePrimary;
579
579
  return _createRectangles();
580
580
  }
581
581
  }) : /*#__PURE__*/ React.createElement("div", {