@fluentui/react-charts 0.0.0-nightly-20250826-2140.1 → 0.0.0-nightly-20250827-0407.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/CHANGELOG.md +48 -15
  2. package/dist/index.d.ts +15 -1
  3. package/lib/components/AreaChart/AreaChart.js +4 -1
  4. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  5. package/lib/components/AreaChart/useAreaChartStyles.styles.js +2 -2
  6. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  7. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -15
  8. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  9. package/lib/components/ChartTable/ChartTable.js +87 -6
  10. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  11. package/lib/components/CommonComponents/CartesianChart.js +24 -24
  12. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  13. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +17 -14
  14. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  15. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +6 -33
  16. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  17. package/lib/components/DeclarativeChart/DeclarativeChart.js +42 -16
  18. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  19. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +20 -1
  20. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  21. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +493 -259
  22. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  23. package/lib/components/DonutChart/DonutChart.js +6 -1
  24. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  25. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  26. package/lib/components/DonutChart/useDonutChartStyles.styles.js +21 -4
  27. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  28. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +8 -4
  29. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  30. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +23 -4
  31. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  32. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +4 -17
  33. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  34. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +4 -21
  35. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  36. package/lib/components/HeatMapChart/HeatMapChart.js +175 -114
  37. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  38. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +26 -6
  39. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  40. package/lib/components/LineChart/LineChart.js +137 -82
  41. package/lib/components/LineChart/LineChart.js.map +1 -1
  42. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  43. package/lib/components/LineChart/useLineChartStyles.styles.js +23 -10
  44. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  45. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +4 -21
  46. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  47. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +12 -25
  48. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  49. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -12
  50. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  51. package/lib/components/ScatterChart/ScatterChart.js +95 -59
  52. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  53. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  54. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +27 -7
  55. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  56. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +8 -14
  57. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  58. package/lib/components/VerticalBarChart/VerticalBarChart.js +27 -4
  59. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  60. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +8 -6
  61. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  62. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +5 -19
  63. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  64. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +61 -44
  65. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  66. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +7 -6
  67. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  68. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +4 -19
  69. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  70. package/lib/utilities/Common.styles.js +47 -0
  71. package/lib/utilities/Common.styles.js.map +1 -0
  72. package/lib/utilities/Common.styles.raw.js +47 -0
  73. package/lib/utilities/Common.styles.raw.js.map +1 -0
  74. package/lib/utilities/SVGTooltipText.js.map +1 -1
  75. package/lib/utilities/index.js +1 -0
  76. package/lib/utilities/index.js.map +1 -1
  77. package/lib/utilities/scatterpolar-utils.js +63 -0
  78. package/lib/utilities/scatterpolar-utils.js.map +1 -0
  79. package/lib/utilities/utilities.js +32 -37
  80. package/lib/utilities/utilities.js.map +1 -1
  81. package/lib-commonjs/components/AreaChart/AreaChart.js +4 -1
  82. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  83. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  84. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +2 -14
  85. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  86. package/lib-commonjs/components/ChartTable/ChartTable.js +87 -6
  87. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  88. package/lib-commonjs/components/CommonComponents/CartesianChart.js +24 -24
  89. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  90. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +15 -13
  91. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  92. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -32
  93. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  94. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +41 -15
  95. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  96. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +23 -1
  97. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  98. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +500 -257
  99. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  100. package/lib-commonjs/components/DonutChart/DonutChart.js +6 -1
  101. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  102. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  103. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +32 -4
  104. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  105. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +8 -4
  106. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  107. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +22 -3
  108. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  109. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -19
  110. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  111. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -20
  112. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  113. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +174 -113
  114. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  115. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +25 -5
  116. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  117. package/lib-commonjs/components/LineChart/LineChart.js +136 -81
  118. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  119. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  120. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +30 -9
  121. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  122. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +2 -20
  123. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  124. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +23 -33
  125. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  126. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +1 -12
  127. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  128. package/lib-commonjs/components/ScatterChart/ScatterChart.js +94 -58
  129. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  130. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  131. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +37 -5
  132. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  133. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +7 -13
  134. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  135. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +26 -3
  136. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  137. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +5 -3
  138. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  139. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -17
  140. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  141. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +60 -43
  142. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  143. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +5 -3
  144. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  145. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -18
  146. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  147. package/lib-commonjs/utilities/Common.styles.js +71 -0
  148. package/lib-commonjs/utilities/Common.styles.js.map +1 -0
  149. package/lib-commonjs/utilities/Common.styles.raw.js +71 -0
  150. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -0
  151. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  152. package/lib-commonjs/utilities/index.js +1 -0
  153. package/lib-commonjs/utilities/index.js.map +1 -1
  154. package/lib-commonjs/utilities/scatterpolar-utils.js +78 -0
  155. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
  156. package/lib-commonjs/utilities/utilities.js +28 -40
  157. package/lib-commonjs/utilities/utilities.js.map +1 -1
  158. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/LineChart.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n LineChartPoints,\n Margins,\n Basestate,\n RefArrayData,\n CustomizedCalloutData,\n} from '../../types/index';\nimport { EventAnnotation } from '../../types/EventAnnotation';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n ChildProps,\n} from '../CommonComponents/index';\n\nexport type { ChildProps, LineChartPoints, Margins, Basestate, RefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface LineChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LineChartStyles;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: EventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: ColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface EventsAnnotationProps {\n events: EventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface LineChartStyles extends CartesianChartStyles {\n /**\n * styles for line border\n */\n lineBorder?: string;\n\n /**\n * styles for marker label\n */\n markerLabel?: string;\n}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface LineChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarsProps {\n legend: string;\n color: string;\n data: ColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"],"names":[],"mappings":"AAAA,uDAAuD,GAyIvD;;CAEC,GACD,WAGC"}
1
+ {"version":3,"sources":["../src/components/LineChart/LineChart.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n LineChartPoints,\n Margins,\n Basestate,\n RefArrayData,\n CustomizedCalloutData,\n} from '../../types/index';\nimport { EventAnnotation } from '../../types/EventAnnotation';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n ChildProps,\n} from '../CommonComponents/index';\n\nexport type { ChildProps, LineChartPoints, Margins, Basestate, RefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface LineChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LineChartStyles;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: EventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: ColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n\n /**\n * To enable callout for individual line or complete stack.\n * @default true\n * @type \\{boolean \\}\n */\n isCalloutForStack?: boolean;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface EventsAnnotationProps {\n events: EventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface LineChartStyles extends CartesianChartStyles {\n /**\n * styles for line border\n */\n lineBorder?: string;\n\n /**\n * styles for marker label\n */\n markerLabel?: string;\n}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface LineChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarsProps {\n legend: string;\n color: string;\n data: ColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"],"names":[],"mappings":"AAAA,uDAAuD,GAgJvD;;CAEC,GACD,WAGC"}
@@ -1,6 +1,7 @@
1
- import { __styles, mergeClasses, shorthands } from '@griffel/react';
1
+ import { __styles, mergeClasses } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
3
  import { HighContrastSelector } from '../../utilities/index';
4
+ import { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';
4
5
  /**
5
6
  * @internal
6
7
  */
@@ -28,6 +29,10 @@ export const linechartClassNames = {
28
29
  */
29
30
  const useStyles = /*#__PURE__*/__styles({
30
31
  tooltip: {
32
+ Bahqtrf: "fk6fouc",
33
+ Be2twd7: "fkhj508",
34
+ Bhrd7zp: "figsok6",
35
+ Bg96gwp: "f1i3iumi",
31
36
  mc9l5x: "f22iagw",
32
37
  Beiy3e4: "f1vx9l62",
33
38
  z8tnut: "f17mpqex",
@@ -37,27 +42,35 @@ const useStyles = /*#__PURE__*/__styles({
37
42
  qhf8xq: "f1euv43f",
38
43
  fsow6f: "f17mccla",
39
44
  Bhzewxz: "fr6rvge",
40
- Bkfmm31: "f5q6cfr",
45
+ De3pzq: "fxugw4r",
41
46
  Beyfa6y: 0,
42
47
  Bbmb7ep: 0,
43
48
  Btl43ni: 0,
44
49
  B7oj6ja: 0,
45
50
  Dimara: "fq9zq91",
46
- Bkecrkj: "f1aehjj5"
51
+ Bkecrkj: "f1aehjj5",
52
+ sj55zd: "f19n0e5"
53
+ },
54
+ markerLabel: {
55
+ Bahqtrf: "fk6fouc",
56
+ Be2twd7: "fkhj508",
57
+ Bhrd7zp: "figsok6",
58
+ Bg96gwp: "f1i3iumi",
59
+ Bkfmm31: "fhuob2q",
60
+ jzqdnp: "fdxigdc",
61
+ a6j6cd: "folz2wl"
47
62
  },
48
63
  lineBorder: {
49
64
  ojy3ng: "f1yuyku4",
50
65
  Bpvj6i6: "fdvt8h6"
51
- },
52
- markerLabel: {
53
- Bkfmm31: "fhuob2q",
54
- jzqdnp: "fdxigdc"
55
66
  }
56
67
  }, {
57
- d: [".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);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
68
+ d: [".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);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
58
69
  p: -1
59
- }], ".f1aehjj5{pointer-events:none;}", ".f1yuyku4{stroke:var(--colorNeutralBackground1);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".fdxigdc{text-anchor:middle;}"],
60
- m: [["@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fdvt8h6{stroke:Canvas;}}", {
70
+ }], ".f1aehjj5{pointer-events:none;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".fdxigdc{text-anchor:middle;}", ".f1yuyku4{stroke:var(--colorNeutralBackground1);}"],
71
+ m: [["@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.folz2wl{fill:CanvasText;}}", {
72
+ m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
73
+ }], ["@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fdvt8h6{stroke:Canvas;}}", {
61
74
  m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
62
75
  }]]
63
76
  });
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","HighContrastSelector","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","ojy3ng","Bpvj6i6","jzqdnp","d","p","m","useLineChartStyles","props","baseStyles"],"sources":["useLineChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\n/**\n * @internal\n */ export const linechartClassNames = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: {\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 borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n },\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n },\n markerLabel: {\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useLineChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ ),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/ )\n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B,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHjB,OAAO,EAAEL,YAAY,CAACI,mBAAmB,CAACC,OAAO,EAAE0C,UAAU,CAAC1C,OAAO,CAAC,yBAA0B,CAAC;IACjGC,UAAU,EAAEN,YAAY,CAACI,mBAAmB,CAACE,UAAU,EAAEyC,UAAU,CAACzC,UAAU,CAAC,4BAA6B,CAAC;IAC7GC,WAAW,EAAEP,YAAY,CAACI,mBAAmB,CAACG,WAAW,EAAEwC,UAAU,CAACxC,WAAW,CAAC,6BAA8B;EACpH,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","tokens","HighContrastSelector","getMarkerLabelStyle","getTooltipStyle","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","jzqdnp","a6j6cd","ojy3ng","Bpvj6i6","d","p","m","useLineChartStyles","props","baseStyles"],"sources":["useLineChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n/**\n * @internal\n */ export const linechartClassNames = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: getTooltipStyle(),\n markerLabel: getMarkerLabelStyle(),\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useLineChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ ),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/ )\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,oBAAoB,QAAQ,uBAAuB;AAC5D,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,uBAAuB;AAC5E;AACA;AACA;AAAI,OAAO,MAAMC,mBAAmB,GAAG;EACnCC,OAAO,EAAE,mBAAmB;EAC5BC,UAAU,EAAE,qBAAqB;EACjCC,WAAW,EAAE,uBAAuB;EACpCC,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,iBAAiB;EACxBC,KAAK,EAAE,iBAAiB;EACxBC,eAAe,EAAE,2BAA2B;EAC5CC,KAAK,EAAE,iBAAiB;EACxBC,kBAAkB,EAAE,8BAA8B;EAClDC,SAAS,EAAE,qBAAqB;EAChCC,UAAU,EAAE,sBAAsB;EAClCC,oBAAoB,EAAE,gCAAgC;EACtDC,WAAW,EAAE,uBAAuB;EAC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/react';
1
+ import { makeStyles, mergeClasses } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
3
  import { HighContrastSelector } from '../../utilities/index';
4
+ import { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';
4
5
  /**
5
6
  * @internal
6
7
  */ export const linechartClassNames = {
@@ -25,31 +26,13 @@ import { HighContrastSelector } from '../../utilities/index';
25
26
  /**
26
27
  * Base Styles
27
28
  */ const useStyles = makeStyles({
28
- tooltip: {
29
- display: 'flex',
30
- flexDirection: 'column',
31
- ...shorthands.padding(tokens.spacingHorizontalS),
32
- position: 'absolute',
33
- textAlign: 'center',
34
- top: tokens.spacingVerticalNone,
35
- fill: tokens.colorNeutralBackground1,
36
- borderRadius: tokens.borderRadiusSmall,
37
- pointerEvents: 'none'
38
- },
29
+ tooltip: getTooltipStyle(),
30
+ markerLabel: getMarkerLabelStyle(),
39
31
  lineBorder: {
40
32
  stroke: tokens.colorNeutralBackground1,
41
33
  [HighContrastSelector]: {
42
34
  stroke: 'Canvas'
43
35
  }
44
- },
45
- markerLabel: {
46
- fill: tokens.colorNeutralForeground1,
47
- textAnchor: 'middle',
48
- selectors: {
49
- [HighContrastSelector]: {
50
- fill: 'CanvasText'
51
- }
52
- }
53
36
  }
54
37
  });
55
38
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/useLineChartStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { LineChartProps, LineChartStyles } from './LineChart.types';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { HighContrastSelector } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const linechartClassNames: SlotClassNames<LineChartStyles> = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n tooltip: {\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 borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n },\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n markerLabel: {\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useLineChartStyles = (props: LineChartProps): LineChartStyles => {\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","HighContrastSelector","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","display","flexDirection","padding","spacingHorizontalS","position","textAlign","top","spacingVerticalNone","fill","colorNeutralBackground1","borderRadius","borderRadiusSmall","pointerEvents","stroke","colorNeutralForeground1","textAnchor","selectors","useLineChartStyles","props","baseStyles"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SAASC,MAAM,QAAQ,wBAAwB;AAG/C,SAASC,oBAAoB,QAAQ,wBAAwB;AAE7D;;CAEC,GACD,OAAO,MAAMC,sBAAuD;IAClEC,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYvB,WAAW;IAC3BM,SAAS;QACPkB,SAAS;QACTC,eAAe;QACf,GAAGvB,WAAWwB,OAAO,CAACvB,OAAOwB,kBAAkB,CAAC;QAChDC,UAAU;QACVC,WAAW;QACXC,KAAK3B,OAAO4B,mBAAmB;QAC/BC,MAAM7B,OAAO8B,uBAAuB;QACpCC,cAAc/B,OAAOgC,iBAAiB;QACtCC,eAAe;IACjB;IACA7B,YAAY;QACV8B,QAAQlC,OAAO8B,uBAAuB;QACtC,CAAC7B,qBAAqB,EAAE;YACtBiC,QAAQ;QACV;IACF;IACA7B,aAAa;QACXwB,MAAM7B,OAAOmC,uBAAuB;QACpCC,YAAY;QACZC,WAAW;YACT,CAACpC,qBAAqB,EAAE;gBACtB4B,MAAM;YACR;QACF;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMS,qBAAqB,CAACC;IACjC,MAAMC,aAAapB;IACnB,OAAO;QACLjB,SAASL,aAAaI,oBAAoBC,OAAO,EAAEqC,WAAWrC,OAAO,CAAC,uBAAuB;QAC7FC,YAAYN,aAAaI,oBAAoBE,UAAU,EAAEoC,WAAWpC,UAAU,CAAC,0BAA0B;QACzGC,aAAaP,aAAaI,oBAAoBG,WAAW,EAAEmC,WAAWnC,WAAW,CAAC,2BAA2B;IAC/G;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/LineChart/useLineChartStyles.styles.ts"],"sourcesContent":["import { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { LineChartProps, LineChartStyles } from './LineChart.types';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const linechartClassNames: SlotClassNames<LineChartStyles> = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n tooltip: getTooltipStyle() as GriffelStyle,\n markerLabel: getMarkerLabelStyle() as GriffelStyle,\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useLineChartStyles = (props: LineChartProps): LineChartStyles => {\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","HighContrastSelector","getMarkerLabelStyle","getTooltipStyle","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","stroke","colorNeutralBackground1","useLineChartStyles","props","baseStyles"],"mappings":"AAAA,SAAuBA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AACxE,SAASC,MAAM,QAAQ,wBAAwB;AAG/C,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,wBAAwB;AAE7E;;CAEC,GACD,OAAO,MAAMC,sBAAuD;IAClEC,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYxB,WAAW;IAC3BO,SAASF;IACTI,aAAaL;IACbI,YAAY;QACViB,QAAQvB,OAAOwB,uBAAuB;QACtC,CAACvB,qBAAqB,EAAE;YACtBsB,QAAQ;QACV;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,qBAAqB,CAACC;IACjC,MAAMC,aAAaL;IACnB,OAAO;QACLjB,SAASN,aAAaK,oBAAoBC,OAAO,EAAEsB,WAAWtB,OAAO,CAAC,uBAAuB;QAC7FC,YAAYP,aAAaK,oBAAoBE,UAAU,EAAEqB,WAAWrB,UAAU,CAAC,0BAA0B;QACzGC,aAAaR,aAAaK,oBAAoBG,WAAW,EAAEoB,WAAWpB,WAAW,CAAC,2BAA2B;IAC/G;AACF,EAAE"}
@@ -1,6 +1,7 @@
1
1
  import { __styles, mergeClasses } from '@griffel/react';
2
2
  import { tokens, typographyStyles } from '@fluentui/react-theme';
3
3
  import { HighContrastSelector } from '../../utilities/index';
4
+ import { getTooltipStyle } from '../../utilities/index';
4
5
  export const sankeyChartClassNames = {
5
6
  root: 'fui-sc__root',
6
7
  nodes: 'fui-sc__nodes',
@@ -40,31 +41,21 @@ const useStyles = /*#__PURE__*/__styles({
40
41
  Bg96gwp: "f1i3iumi",
41
42
  mc9l5x: "f22iagw",
42
43
  Beiy3e4: "f1vx9l62",
43
- Byoj8tv: 0,
44
- uwmqm3: 0,
45
- z189sj: 0,
46
- z8tnut: 0,
47
- B0ocmuz: "f1t756mo",
44
+ z8tnut: "f17mpqex",
45
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
46
+ Byoj8tv: "fdvome7",
47
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
48
48
  qhf8xq: "f1euv43f",
49
49
  fsow6f: "f17mccla",
50
- Bhzewxz: "f113wtx2",
51
- Bgh53k4: 0,
52
- B2eet1l: 0,
53
- De3pzq: 0,
54
- Bcmaq0h: 0,
55
- gk0gix: 0,
56
- B20660r: 0,
57
- B8a6bjv: 0,
58
- Bpptf2m: 0,
59
- e5kdtc: 0,
60
- Bkjc3bi: 0,
61
- ayd6f0: "fcm7iae",
50
+ Bhzewxz: "fr6rvge",
51
+ De3pzq: "fxugw4r",
62
52
  Beyfa6y: 0,
63
53
  Bbmb7ep: 0,
64
54
  Btl43ni: 0,
65
55
  B7oj6ja: 0,
66
- Dimara: "fl4tsp0",
67
- Bkecrkj: "f1aehjj5"
56
+ Dimara: "fq9zq91",
57
+ Bkecrkj: "f1aehjj5",
58
+ sj55zd: "f19n0e5"
68
59
  },
69
60
  nodeTextContainer: {
70
61
  B3gqxw3: "fk6oafs",
@@ -84,13 +75,9 @@ const useStyles = /*#__PURE__*/__styles({
84
75
  }, {
85
76
  d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f1vx9l62{flex-direction:column;}", [".f1a3p1vp{overflow:hidden;}", {
86
77
  p: -1
87
- }], ".f5q6cfr{fill:var(--colorNeutralBackground1);}", ".fu2q8de{stroke-width:3px;}", ".f1yc5x8p{fill:#F5F5F5;}", [".f1t756mo{padding:8px;}", {
78
+ }], ".f5q6cfr{fill:var(--colorNeutralBackground1);}", ".fu2q8de{stroke-width:3px;}", ".f1yc5x8p{fill:#F5F5F5;}", ".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);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
88
79
  p: -1
89
- }], ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".f113wtx2{top:0px;}", [".fcm7iae{background:var(--colorNeutralBackground1);}", {
90
- p: -2
91
- }], [".fl4tsp0{border-radius:2px;}", {
92
- p: -1
93
- }], ".f1aehjj5{pointer-events:none;}", ".fvjh0tl{margin-top:4px;}", ".ff9s3yw{margin-left:8px;}", ".f1phki43{margin-right:8px;}", ".fd1gkq{margin-bottom:4px;}", [".f1enuhaj{overflow:auto;}", {
80
+ }], ".f1aehjj5{pointer-events:none;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fvjh0tl{margin-top:4px;}", ".ff9s3yw{margin-left:8px;}", ".f1phki43{margin-right:8px;}", ".fd1gkq{margin-bottom:4px;}", [".f1enuhaj{overflow:auto;}", {
94
81
  p: -1
95
82
  }], ".ftgm304{display:block;}"],
96
83
  m: [["@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f14egcv9{fill:Canvas;}}", {
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","tokens","typographyStyles","HighContrastSelector","sankeyChartClassNames","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","chart","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","a9b677","Bqenvij","Beiy3e4","B68tc82","Bmxbyg5","Bpg54ce","Bkfmm31","Be5yapy","a6j6cd","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","qhf8xq","fsow6f","Bhzewxz","Bgh53k4","B2eet1l","De3pzq","Bcmaq0h","gk0gix","B20660r","B8a6bjv","Bpptf2m","e5kdtc","Bkjc3bi","ayd6f0","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","B3gqxw3","B6of3ja","Frg6f3","jrapky","t21cq0","d","p","m","useSankeyChartStyles","props","_props_styles","_props_reflowProps","_props_styles1","_props_styles2","baseStyles","styles","reflowProps","mode"],"sources":["useSankeyChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nexport const sankeyChartClassNames = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper',\n chart: 'fui-sc__chart'\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden'\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n toolTip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: tokens.colorNeutralBackground1,\n borderRadius: '2px',\n pointerEvents: 'none'\n },\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n },\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px'\n },\n chartWrapper: {\n overflow: 'auto'\n },\n chart: {\n display: 'block'\n }\n});\nexport const useSankeyChartStyles = (props)=>{\n var _props_styles, _props_reflowProps, _props_styles1, _props_styles2;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/ ),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/ ),\n nodeTextContainer: mergeClasses(sankeyChartClassNames.nodeTextContainer, baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/ ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/ ),\n chartWrapper: mergeClasses(sankeyChartClassNames.chartWrapper, ((_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode) === 'min-width' ? baseStyles.chartWrapper : '', (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chartWrapper),\n chart: mergeClasses(sankeyChartClassNames.chart, baseStyles.chart, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.chart)\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,oBAAoB,QAAQ,uBAAuB;AAC5D,OAA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GAAG,KAAK,CAAC,GAAGA,cAAc,CAACtD,YAAY,CAAC;IACpVC,KAAK,EAAEX,YAAY,CAACI,qBAAqB,CAACO,KAAK,EAAEuD,UAAU,CAACvD,KAAK,EAAE,CAACsD,cAAc,GAAGJ,KAAK,CAACM,MAAM,MAAM,IAAI,IAAIF,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAACtD,KAAK;EAC5K,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","tokens","typographyStyles","HighContrastSelector","getTooltipStyle","sankeyChartClassNames","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","chart","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","a9b677","Bqenvij","Beiy3e4","B68tc82","Bmxbyg5","Bpg54ce","Bkfmm31","Be5yapy","a6j6cd","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","B3gqxw3","B6of3ja","Frg6f3","jrapky","t21cq0","d","p","m","useSankeyChartStyles","props","_props_styles","_props_reflowProps","_props_styles1","_props_styles2","baseStyles","styles","reflowProps","mode"],"sources":["useSankeyChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getTooltipStyle } from '../../utilities/index';\nexport const sankeyChartClassNames = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper',\n chart: 'fui-sc__chart'\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden'\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n toolTip: getTooltipStyle(),\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n },\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px'\n },\n chartWrapper: {\n overflow: 'auto'\n },\n chart: {\n display: 'block'\n }\n});\nexport const useSankeyChartStyles = (props)=>{\n var _props_styles, _props_reflowProps, _props_styles1, _props_styles2;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/ ),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/ ),\n nodeTextContainer: mergeClasses(sankeyChartClassNames.nodeTextContainer, baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/ ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/ ),\n chartWrapper: mergeClasses(sankeyChartClassNames.chartWrapper, ((_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode) === 'min-width' ? baseStyles.chartWrapper : '', (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chartWrapper),\n chart: mergeClasses(sankeyChartClassNames.chart, baseStyles.chart, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.chart)\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,oBAA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EAAE6C,UAAU,CAAC7C,KAAK,EAAE,CAAC4C,cAAc,GAAGJ,KAAK,CAACM,MAAM,MAAM,IAAI,IAAIF,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAC5C,KAAK;EAC5K,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,6 +1,7 @@
1
1
  import { makeStyles, mergeClasses } from '@griffel/react';
2
2
  import { tokens, typographyStyles } from '@fluentui/react-theme';
3
3
  import { HighContrastSelector } from '../../utilities/index';
4
+ import { getTooltipStyle } from '../../utilities/index';
4
5
  export const sankeyChartClassNames = {
5
6
  root: 'fui-sc__root',
6
7
  nodes: 'fui-sc__nodes',
@@ -32,18 +33,7 @@ const useStyles = makeStyles({
32
33
  fill: 'Canvas'
33
34
  }
34
35
  },
35
- toolTip: {
36
- ...typographyStyles.body1,
37
- display: 'flex',
38
- flexDirection: 'column',
39
- padding: '8px',
40
- position: 'absolute',
41
- textAlign: 'center',
42
- top: '0px',
43
- background: tokens.colorNeutralBackground1,
44
- borderRadius: '2px',
45
- pointerEvents: 'none'
46
- },
36
+ toolTip: getTooltipStyle(),
47
37
  nodeTextContainer: {
48
38
  '& text': {
49
39
  [HighContrastSelector]: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SankeyChart/useSankeyChartStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SankeyChartProps, SankeyChartStyles } from './SankeyChart.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\n\nexport const sankeyChartClassNames: SlotClassNames<SankeyChartStyles> = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper',\n chart: 'fui-sc__chart',\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n toolTip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: tokens.colorNeutralBackground1,\n borderRadius: '2px',\n pointerEvents: 'none',\n },\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px',\n },\n chartWrapper: {\n overflow: 'auto',\n },\n chart: {\n display: 'block',\n },\n});\n\nexport const useSankeyChartStyles = (props: SankeyChartProps): SankeyChartStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root, props.styles?.root),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/),\n nodeTextContainer: mergeClasses(\n sankeyChartClassNames.nodeTextContainer,\n baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/,\n ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/),\n chartWrapper: mergeClasses(\n sankeyChartClassNames.chartWrapper,\n props.reflowProps?.mode === 'min-width' ? baseStyles.chartWrapper : '',\n props.styles?.chartWrapper,\n ),\n chart: mergeClasses(sankeyChartClassNames.chart, baseStyles.chart, props.styles?.chart),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","HighContrastSelector","sankeyChartClassNames","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","chart","useStyles","body1","display","width","height","flexDirection","overflow","fill","colorNeutralBackground1","strokeWidth","padding","position","textAlign","top","background","borderRadius","pointerEvents","marginTop","marginLeft","marginBottom","marginRight","useSankeyChartStyles","props","baseStyles","styles","reflowProps","mode"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,oBAAoB,QAAQ,wBAAwB;AAE7D,OAAO,MAAMC,wBAA2D;IACtEC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,mBAAmB;IACnBC,SAAS;IACTC,cAAc;IACdC,OAAO;AACT,EAAE;AACF,MAAMC,YAAYb,WAAW;IAC3BM,MAAM;QACJ,GAAGH,iBAAiBW,KAAK;QACzBC,SAAS;QACTC,OAAO;QACPC,QAAQ;QACRC,eAAe;QACfC,UAAU;IACZ;IACAX,OAAO;QACLY,MAAMlB,OAAOmB,uBAAuB;QACpCC,aAAa;QACb,CAAClB,qBAAqB,EAAE;YACtBgB,MAAM;QACR;IACF;IACAb,OAAO;QACLa,MAAM;QACN,CAAChB,qBAAqB,EAAE;YACtBgB,MAAM;QACR;IACF;IACAV,SAAS;QACP,GAAGP,iBAAiBW,KAAK;QACzBC,SAAS;QACTG,eAAe;QACfK,SAAS;QACTC,UAAU;QACVC,WAAW;QACXC,KAAK;QACLC,YAAYzB,OAAOmB,uBAAuB;QAC1CO,cAAc;QACdC,eAAe;IACjB;IACApB,mBAAmB;QACjB,UAAU;YACR,CAACL,qBAAqB,EAAE;gBACtBgB,MAAM;YACR;QACF;QAEAU,WAAW;QACXC,YAAY;QACZC,cAAc;QACdC,aAAa;IACf;IACAtB,cAAc;QACZQ,UAAU;IACZ;IACAP,OAAO;QACLG,SAAS;IACX;AACF;AAEA,OAAO,MAAMmB,uBAAuB,CAACC;QAI+BA,eAU9DA,oBACAA,gBAEiEA;IAhBrE,MAAMC,aAAavB;IAEnB,OAAO;QACLP,MAAML,aAAaI,sBAAsBC,IAAI,EAAE8B,WAAW9B,IAAI,GAAE6B,gBAAAA,MAAME,MAAM,cAAZF,oCAAAA,cAAc7B,IAAI;QAClFC,OAAON,aAAaI,sBAAsBE,KAAK,EAAE6B,WAAW7B,KAAK,CAAC,uBAAuB;QACzFC,OAAOP,aAAaI,sBAAsBG,KAAK,EAAE4B,WAAW5B,KAAK,CAAC,uBAAuB;QACzFC,mBAAmBR,aACjBI,sBAAsBI,iBAAiB,EACvC2B,WAAW3B,iBAAiB,CAAC,mCAAmC;QAElEC,SAAST,aAAaI,sBAAsBK,OAAO,EAAE0B,WAAW1B,OAAO,CAAC,yBAAyB;QACjGC,cAAcV,aACZI,sBAAsBM,YAAY,EAClCwB,EAAAA,qBAAAA,MAAMG,WAAW,cAAjBH,yCAAAA,mBAAmBI,IAAI,MAAK,cAAcH,WAAWzB,YAAY,GAAG,KACpEwB,iBAAAA,MAAME,MAAM,cAAZF,qCAAAA,eAAcxB,YAAY;QAE5BC,OAAOX,aAAaI,sBAAsBO,KAAK,EAAEwB,WAAWxB,KAAK,GAAEuB,iBAAAA,MAAME,MAAM,cAAZF,qCAAAA,eAAcvB,KAAK;IACxF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/SankeyChart/useSankeyChartStyles.styles.ts"],"sourcesContent":["import { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SankeyChartProps, SankeyChartStyles } from './SankeyChart.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getTooltipStyle } from '../../utilities/index';\n\nexport const sankeyChartClassNames: SlotClassNames<SankeyChartStyles> = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper',\n chart: 'fui-sc__chart',\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n toolTip: getTooltipStyle() as GriffelStyle,\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px',\n },\n chartWrapper: {\n overflow: 'auto',\n },\n chart: {\n display: 'block',\n },\n});\n\nexport const useSankeyChartStyles = (props: SankeyChartProps): SankeyChartStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root, props.styles?.root),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/),\n nodeTextContainer: mergeClasses(\n sankeyChartClassNames.nodeTextContainer,\n baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/,\n ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/),\n chartWrapper: mergeClasses(\n sankeyChartClassNames.chartWrapper,\n props.reflowProps?.mode === 'min-width' ? baseStyles.chartWrapper : '',\n props.styles?.chartWrapper,\n ),\n chart: mergeClasses(sankeyChartClassNames.chart, baseStyles.chart, props.styles?.chart),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","HighContrastSelector","getTooltipStyle","sankeyChartClassNames","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","chart","useStyles","body1","display","width","height","flexDirection","overflow","fill","colorNeutralBackground1","strokeWidth","marginTop","marginLeft","marginBottom","marginRight","use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BAAuB;QACzFC,mBAAmBT,aACjBK,sBAAsBI,iBAAiB,EACvCoB,WAAWpB,iBAAiB,CAAC,mCAAmC;QAElEC,SAASV,aAAaK,sBAAsBK,OAAO,EAAEmB,WAAWnB,OAAO,CAAC,yBAAyB;QACjGC,cAAcX,aACZK,sBAAsBM,YAAY,EAClCiB,EAAAA,qBAAAA,MAAMG,WAAW,cAAjBH,yCAAAA,mBAAmBI,IAAI,MAAK,cAAcH,WAAWlB,YAAY,GAAG,KACpEiB,iBAAAA,MAAME,MAAM,cAAZF,qCAAAA,eAAcjB,YAAY;QAE5BC,OAAOZ,aAAaK,sBAAsBO,KAAK,EAAEiB,WAAWjB,KAAK,GAAEgB,iBAAAA,MAAME,MAAM,cAAZF,qCAAAA,eAAchB,KAAK;IACxF;AACF,EAAE"}
@@ -4,11 +4,12 @@ import { select as d3Select } from 'd3-selection';
4
4
  import { Legends } from '../Legends/index';
5
5
  import { max as d3Max, min as d3Min } from 'd3-array';
6
6
  import { useId } from '@fluentui/react-utilities';
7
- import { areArraysEqual, createNumericYAxis, createStringYAxis, domainRangeOfDateForScatterChart, domainRangeOfNumericForScatterChart, domainRangeOfXStringAxis, find, findNumericMinMaxOfY, useRtl } from '../../utilities/index';
7
+ import { areArraysEqual, createNumericYAxis, createStringYAxis, domainRangeOfDateForScatterChart, domainRangeOfNumericForScatterChart, domainRangeOfXStringAxis, find, findNumericMinMaxOfY, useRtl, isTextMode, isScatterPolarSeries } from '../../utilities/index';
8
8
  import { CartesianChart } from '../../index';
9
9
  import { tokens } from '@fluentui/react-theme';
10
10
  import { calloutData, ChartTypes, XAxisTypes, tooltipOfAxislabels, getTypeOfAxis, getNextColor, getColorFromToken, formatDate } from '../../utilities/index';
11
11
  import { toImage } from '../../utilities/image-export-utils';
12
+ import { renderScatterPolarCategoryLabels } from '../../utilities/scatterpolar-utils';
12
13
  // Create a ScatterChart variant which uses these default styles and this styled subcomponent.
13
14
  /**
14
15
  * ScatterChart component
@@ -54,6 +55,8 @@ import { toImage } from '../../utilities/image-export-utils';
54
55
  const [isPopoverOpen, setPopoverOpen] = React.useState(false);
55
56
  const [selectedLegends, setSelectedLegends] = React.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
56
57
  const prevSelectedLegendsRef = React.useRef(undefined);
58
+ const _isTextMode = React.useRef(false);
59
+ const _isScatterPolarRef = React.useRef(false);
57
60
  React.useEffect(()=>{
58
61
  var _props_legendProps, _props_legendProps1;
59
62
  if (prevSelectedLegendsRef.current && !areArraysEqual(prevSelectedLegendsRef.current, (_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends)) {
@@ -148,6 +151,8 @@ import { toImage } from '../../utilities/image-export-utils';
148
151
  function _initializeScatterChartData(xScale, yScale, containerHeight, containerWidth, xElement) {
149
152
  _xAxisScale = xScale;
150
153
  _yAxisScale = yScale;
154
+ _isTextMode.current = isTextMode(_points);
155
+ _isScatterPolarRef.current = isScatterPolarSeries(_points);
151
156
  renderSeries = _createPlot(xElement, containerHeight);
152
157
  }
153
158
  function _onHoverCardHide() {
@@ -157,21 +162,30 @@ import { toImage } from '../../utilities/image-export-utils';
157
162
  function _createLegends(data) {
158
163
  const { legendProps } = props;
159
164
  const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);
160
- const legendDataItems = data.map((point)=>{
161
- const color = point.color;
165
+ const mapLegendToPoints = {};
166
+ data.forEach((point)=>{
167
+ if (point.legend) {
168
+ if (!mapLegendToPoints[point.legend]) {
169
+ mapLegendToPoints[point.legend] = [];
170
+ }
171
+ mapLegendToPoints[point.legend].push(point);
172
+ }
173
+ });
174
+ const legendDataItems = Object.entries(mapLegendToPoints).map(([legendTitle, points])=>{
175
+ const representativePoint = points[0];
162
176
  // mapping data to the format Legends component needs
163
177
  const legend = {
164
- title: point.legend,
165
- color,
178
+ title: legendTitle,
179
+ color: representativePoint.color,
166
180
  onMouseOutAction: ()=>{
167
181
  setActiveLegend('');
168
182
  },
169
183
  hoverAction: ()=>{
170
184
  _handleChartMouseLeave();
171
- setActiveLegend(point.legend);
185
+ setActiveLegend(legendTitle);
172
186
  },
173
- ...point.legendShape && {
174
- shape: point.legendShape
187
+ ...representativePoint.legendShape && {
188
+ shape: representativePoint.legendShape
175
189
  }
176
190
  };
177
191
  return legend;
@@ -209,6 +223,12 @@ import { toImage } from '../../utilities/image-export-utils';
209
223
  return seriesColor;
210
224
  }
211
225
  }
226
+ function _getRangeForScatterMarkerSize(yScale, yPadding, xMin, xMax, xPadding) {
227
+ const extraXPixels = _isRTL ? _xAxisScale(xMax - xPadding) - _xAxisScale(xMax) : _xAxisScale(xMin + xPadding) - _xAxisScale(xMin);
228
+ const yMin = yScale.domain()[0];
229
+ const extraYPixels = yScale(yMin) - yScale(yMin + yPadding);
230
+ return Math.min(extraXPixels, extraYPixels);
231
+ }
212
232
  function _createPlot(xElement, containerHeight) {
213
233
  const series = [];
214
234
  if (isSelectedLegend) {
@@ -223,36 +243,20 @@ import { toImage } from '../../utilities/image-export-utils';
223
243
  return d3Min(point.data, (item)=>item.y);
224
244
  });
225
245
  const yPadding = (yMax - yMin) * 0.1;
226
- const yPaddingRange = Math.abs(_yAxisScale(yMin + yPadding) - _yAxisScale(yMin));
227
- let maxMarkerRange = 40;
228
- let xPaddingRange = 0;
246
+ let xPadding = 0;
247
+ let xMin = 0;
248
+ let xMax = 0;
229
249
  if (_xAxisType === XAxisTypes.StringAxis) {
230
250
  _xBandwidth = _xAxisScale.bandwidth() / 2;
231
- xPaddingRange = _xBandwidth;
232
- } else if (_xAxisType === XAxisTypes.DateAxis) {
233
- const xMin = d3Min(points, (point)=>{
234
- return d3Min(point.data, (item)=>item.x);
235
- });
236
- const xMax = d3Max(points, (point)=>{
237
- return d3Max(point.data, (item)=>{
238
- return item.x;
239
- });
240
- });
241
- const xPadding = (xMax.getTime() - xMin.getTime()) * 0.1;
242
- xPaddingRange = Math.abs(_xAxisScale(new Date(xMin.getTime() + xPadding)) - _xAxisScale(xMin));
243
251
  } else {
244
- const xMin = d3Min(points, (point)=>{
245
- return d3Min(point.data, (item)=>item.x);
246
- });
247
- const xMax = d3Max(points, (point)=>{
248
- return d3Max(point.data, (item)=>{
249
- return item.x;
250
- });
251
- });
252
- const xPadding = (xMax - xMin) * 0.1;
253
- xPaddingRange = Math.abs(_xAxisScale(xMin + xPadding) - _xAxisScale(xMin));
252
+ const isDate = _xAxisType === XAxisTypes.DateAxis;
253
+ const getX = (item)=>isDate ? item.x : item.x;
254
+ const minVal = d3Min(_points, (point)=>d3Min(point.data, getX));
255
+ const maxVal = d3Max(_points, (point)=>d3Max(point.data, getX));
256
+ xMin = isDate ? minVal.getTime() : minVal;
257
+ xMax = isDate ? maxVal.getTime() : maxVal;
258
+ xPadding = (xMax - xMin) * 0.1;
254
259
  }
255
- maxMarkerRange = Math.min(maxMarkerRange, Math.min(xPaddingRange, yPaddingRange));
256
260
  const maxMarkerSize = d3Max(_points, (point)=>{
257
261
  return d3Max(point.data, (item)=>{
258
262
  return item.markerSize;
@@ -264,35 +268,62 @@ import { toImage } from '../../utilities/image-export-utils';
264
268
  const seriesColor = _points[i].color;
265
269
  const verticaLineHeight = containerHeight - margins.bottom + 6;
266
270
  for(let j = 0; j < _points[i].data.length; j++){
271
+ var _points_i_data_j;
267
272
  const seriesId = `${_seriesId}_${i}_${j}`;
268
273
  const circleId = `${_circleId}_${i}_${j}`;
269
274
  const { x, y, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[j];
270
- let circleRadius = 3.5;
271
275
  const pointMarkerSize = _points[i].data[j].markerSize;
272
- if (pointMarkerSize !== undefined) {
273
- circleRadius = Math.min(pointMarkerSize * maxMarkerRange / maxMarkerSize, pointMarkerSize);
274
- }
276
+ const extraMaxPixels = _xAxisType !== XAxisTypes.StringAxis ? _getRangeForScatterMarkerSize(_yAxisScale, yPadding, xMin, xMax, xPadding) : 0;
277
+ const minPixel = 4;
278
+ const maxPixel = 16;
279
+ const circleRadius = pointMarkerSize && maxMarkerSize !== 0 ? _xAxisType !== XAxisTypes.StringAxis ? pointMarkerSize * extraMaxPixels / maxMarkerSize : minPixel + (pointMarkerSize - minPixel) / (maxMarkerSize - minPixel) * (maxPixel - minPixel) : activePoint === circleId ? 6 : 4;
275
280
  const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
276
281
  const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
277
- pointsForSeries.push(/*#__PURE__*/ React.createElement("circle", {
278
- id: circleId,
279
- key: circleId,
280
- r: circleRadius,
281
- cx: _xAxisScale(x) + _xBandwidth,
282
- cy: _yAxisScale(y),
283
- "data-is-focusable": isLegendSelected,
284
- onMouseOver: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
285
- onMouseMove: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
286
- onMouseOut: _handleMouseOut,
287
- onFocus: (event)=>_handleFocus(event, seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
288
- onBlur: _handleMouseOut,
289
- ..._getClickHandler(_points[i].data[j].onDataPointClick),
290
- opacity: isLegendSelected && !currentPointHidden ? 1 : 0.1,
291
- fill: _getPointFill(seriesColor, circleId, j, false),
292
- stroke: seriesColor,
293
- role: "img",
294
- "aria-label": _getAriaLabel(i, j),
295
- tabIndex: isLegendSelected ? 0 : undefined
282
+ const text = _points === null || _points === void 0 ? void 0 : (_points_i_data_j = _points[i].data[j]) === null || _points_i_data_j === void 0 ? void 0 : _points_i_data_j.text;
283
+ if (!_isTextMode.current) {
284
+ pointsForSeries.push(/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("circle", {
285
+ id: circleId,
286
+ key: circleId,
287
+ r: Math.max(circleRadius, 4),
288
+ cx: _xAxisScale(x) + _xBandwidth,
289
+ cy: _yAxisScale(y),
290
+ "data-is-focusable": isLegendSelected,
291
+ onMouseOver: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
292
+ onMouseMove: (event)=>_handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event),
293
+ onMouseOut: _handleMouseOut,
294
+ onFocus: (event)=>_handleFocus(event, seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
295
+ onBlur: _handleMouseOut,
296
+ ..._getClickHandler(_points[i].data[j].onDataPointClick),
297
+ opacity: isLegendSelected && !currentPointHidden ? 1 : 0.1,
298
+ fill: _getPointFill(seriesColor, circleId, j, false),
299
+ stroke: seriesColor,
300
+ role: "img",
301
+ "aria-label": _getAriaLabel(i, j),
302
+ tabIndex: isLegendSelected ? 0 : undefined
303
+ }), ",", text && /*#__PURE__*/ React.createElement("text", {
304
+ key: `${circleId}-label`,
305
+ x: _xAxisScale(x) + _xBandwidth,
306
+ y: _yAxisScale(y) + Math.max(circleRadius + 12, 16),
307
+ className: classes.markerLabel
308
+ }, text)));
309
+ }
310
+ }
311
+ if (_isScatterPolarRef.current) {
312
+ var _points_i;
313
+ // Render category labels for all series at once to avoid overlap
314
+ const allSeriesData = _points.map((s)=>({
315
+ data: s.data.filter((pt)=>typeof pt.x === 'number' && typeof pt.y === 'number').map((pt)=>({
316
+ x: pt.x,
317
+ y: pt.y,
318
+ text: pt.text
319
+ }))
320
+ }));
321
+ pointsForSeries.push(...renderScatterPolarCategoryLabels({
322
+ allSeriesData,
323
+ xAxisScale: _xAxisScale.current,
324
+ yAxisScale: _yAxisScale.current,
325
+ className: classes.markerLabel || '',
326
+ lineOptions: _points === null || _points === void 0 ? void 0 : (_points_i = _points[i]) === null || _points_i === void 0 ? void 0 : _points_i.lineOptions
296
327
  }));
297
328
  }
298
329
  series.push(/*#__PURE__*/ React.createElement("g", {
@@ -420,6 +451,7 @@ import { toImage } from '../../utilities/image-export-utils';
420
451
  function _isChartEmpty() {
421
452
  return !(props.data && props.data.scatterChartData && props.data.scatterChartData.length > 0 && props.data.scatterChartData.filter((item)=>item.data.length).length > 0);
422
453
  }
454
+ const _getMinMaxofXAxis = React.useCallback((points, yAxisType)=>_getNumericMinMaxOfY(points, yAxisType), []);
423
455
  const { legendProps, tickValues, tickFormat } = props;
424
456
  _points = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);
425
457
  let points = _points;
@@ -431,7 +463,7 @@ import { toImage } from '../../utilities/image-export-utils';
431
463
  // reduce computation cost by only creating legendBars
432
464
  // if when hideLegend is false.
433
465
  // NOTE: they are rendered only when hideLegend is false in CartesianChart.
434
- if (!props.hideLegend) {
466
+ if (!props.hideLegend && !_isTextMode.current) {
435
467
  legendBars = _createLegends(_points); // ToDo: Memoize legends to improve performance.
436
468
  }
437
469
  var _props_culture;
@@ -467,7 +499,7 @@ import { toImage } from '../../utilities/image-export-utils';
467
499
  getmargins: _getMargins,
468
500
  getGraphData: _initializeScatterChartData,
469
501
  xAxisType: _xAxisType,
470
- getMinMaxOfYAxis: _getNumericMinMaxOfY,
502
+ getMinMaxOfYAxis: _getMinMaxofXAxis,
471
503
  getDomainNRangeValues: _getDomainNRangeValues,
472
504
  createYAxis: createNumericYAxis,
473
505
  createStringYAxis: createStringYAxis,
@@ -475,6 +507,10 @@ import { toImage } from '../../utilities/image-export-utils';
475
507
  enableFirstRenderOptimization: _firstRenderOptimization,
476
508
  datasetForXAxisDomain: _xAxisLabels,
477
509
  componentRef: cartesianChartRef,
510
+ ..._isScatterPolarRef.current ? {
511
+ yMaxValue: 1,
512
+ yMinValue: -1
513
+ } : {},
478
514
  /* eslint-disable react/jsx-no-bind */ // eslint-disable-next-line react/no-children-prop
479
515
  children: (props)=>{
480
516
  _xAxisScale = props.xScale;