@fluentui/react-charting 5.21.14 → 5.21.15

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 (98) hide show
  1. package/CHANGELOG.json +24 -1
  2. package/CHANGELOG.md +11 -2
  3. package/dist/react-charting.d.ts +75 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +12 -0
  7. package/lib/components/AreaChart/AreaChart.base.d.ts +1 -0
  8. package/lib/components/AreaChart/AreaChart.base.js +15 -2
  9. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  10. package/lib/components/CommonComponents/CartesianChart.base.js +8 -8
  11. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  12. package/lib/components/CommonComponents/CartesianChart.types.d.ts +23 -2
  13. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  14. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
  15. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +15 -2
  16. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  17. package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +2 -0
  18. package/lib/components/HeatMapChart/HeatMapChart.base.js +15 -2
  19. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  20. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +1 -0
  21. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +12 -2
  22. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  23. package/lib/components/LineChart/LineChart.base.d.ts +1 -0
  24. package/lib/components/LineChart/LineChart.base.js +16 -3
  25. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  26. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  27. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +15 -2
  28. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  29. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  30. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +15 -2
  31. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  32. package/lib/utilities/utilities.d.ts +5 -41
  33. package/lib/utilities/utilities.js +5 -126
  34. package/lib/utilities/utilities.js.map +1 -1
  35. package/lib/version.js +1 -1
  36. package/lib/version.js.map +1 -1
  37. package/lib-amd/components/AreaChart/AreaChart.base.d.ts +1 -0
  38. package/lib-amd/components/AreaChart/AreaChart.base.js +14 -1
  39. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  40. package/lib-amd/components/CommonComponents/CartesianChart.base.js +7 -7
  41. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  42. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +23 -2
  43. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  44. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
  45. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +14 -1
  46. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  47. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +2 -0
  48. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +14 -1
  49. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  50. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +1 -0
  51. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +11 -1
  52. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  53. package/lib-amd/components/LineChart/LineChart.base.d.ts +1 -0
  54. package/lib-amd/components/LineChart/LineChart.base.js +15 -2
  55. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  56. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  57. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +14 -1
  58. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  59. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  60. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +14 -1
  61. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  62. package/lib-amd/utilities/utilities.d.ts +5 -41
  63. package/lib-amd/utilities/utilities.js +8 -133
  64. package/lib-amd/utilities/utilities.js.map +1 -1
  65. package/lib-amd/version.js +1 -1
  66. package/lib-amd/version.js.map +1 -1
  67. package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +1 -0
  68. package/lib-commonjs/components/AreaChart/AreaChart.base.js +14 -1
  69. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  70. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +7 -7
  71. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  72. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +23 -2
  73. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  74. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
  75. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +14 -1
  76. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  77. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +2 -0
  78. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +14 -1
  79. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  80. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +1 -0
  81. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +11 -1
  82. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  83. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +1 -0
  84. package/lib-commonjs/components/LineChart/LineChart.base.js +15 -2
  85. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  86. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  87. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +14 -1
  88. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  89. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  90. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +14 -1
  91. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  92. package/lib-commonjs/utilities/utilities.d.ts +5 -41
  93. package/lib-commonjs/utilities/utilities.js +8 -133
  94. package/lib-commonjs/utilities/utilities.js.map +1 -1
  95. package/lib-commonjs/version.js +1 -1
  96. package/lib-commonjs/version.js.map +1 -1
  97. package/package.json +2 -2
  98. package/src/components/CommonComponents/CartesianChart.types.ts +64 -2
package/CHANGELOG.json CHANGED
@@ -2,7 +2,30 @@
2
2
  "name": "@fluentui/react-charting",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 29 May 2024 07:24:31 GMT",
5
+ "date": "Thu, 30 May 2024 07:23:32 GMT",
6
+ "tag": "@fluentui/react-charting_v5.21.15",
7
+ "version": "5.21.15",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "120183316+srmukher@users.noreply.github.com",
12
+ "package": "@fluentui/react-charting",
13
+ "commit": "a9227118cfdd8654b9dc9b0462b0ef1feb6329e3",
14
+ "comment": "Refactoring utilities to reduce monosize of components"
15
+ }
16
+ ],
17
+ "none": [
18
+ {
19
+ "author": "martinhochel@microsoft.com",
20
+ "package": "@fluentui/react-charting",
21
+ "commit": "287ce4504b97d6735b3734f0d0768bbc890a3a6e",
22
+ "comment": "chore: normalize all scripts source to live under /src"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "date": "Wed, 29 May 2024 07:24:53 GMT",
6
29
  "tag": "@fluentui/react-charting_v5.21.14",
7
30
  "version": "5.21.14",
8
31
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/react-charting
2
2
 
3
- This log was last generated on Wed, 29 May 2024 07:24:31 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 30 May 2024 07:23:32 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [5.21.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-charting_v5.21.15)
8
+
9
+ Thu, 30 May 2024 07:23:32 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charting_v5.21.14..@fluentui/react-charting_v5.21.15)
11
+
12
+ ### Patches
13
+
14
+ - Refactoring utilities to reduce monosize of components ([PR #31291](https://github.com/microsoft/fluentui/pull/31291) by 120183316+srmukher@users.noreply.github.com)
15
+
7
16
  ## [5.21.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-charting_v5.21.14)
8
17
 
9
- Wed, 29 May 2024 07:24:31 GMT
18
+ Wed, 29 May 2024 07:24:53 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charting_v5.21.13..@fluentui/react-charting_v5.21.14)
11
20
 
12
21
  ### Patches
@@ -16,6 +16,8 @@ import { ITheme as ITheme_2 } from '@fluentui/react';
16
16
  import * as React_2 from 'react';
17
17
  import { SankeyLink } from 'd3-sankey';
18
18
  import { SankeyNode } from 'd3-sankey';
19
+ import { ScaleBand } from 'd3-scale';
20
+ import { ScaleLinear } from 'd3-scale';
19
21
  import { SVGProps } from 'react';
20
22
  import { TimeLocaleDefinition } from 'd3-time-format';
21
23
 
@@ -248,6 +250,10 @@ export declare interface IAreaChartStyleProps extends ICartesianChartStyleProps
248
250
  export declare interface IAreaChartStyles extends ICartesianChartStyles {
249
251
  }
250
252
 
253
+ declare interface IAxisData {
254
+ yAxisDomainValues: number[];
255
+ }
256
+
251
257
  export declare interface IBasestate {
252
258
  _width?: number;
253
259
  _height?: number;
@@ -872,6 +878,13 @@ export declare interface IDataPoint {
872
878
  onClick?: VoidFunction;
873
879
  }
874
880
 
881
+ declare interface IDomainNRange {
882
+ dStartValue: number | Date;
883
+ dEndValue: number | Date;
884
+ rStartValue: number;
885
+ rEndValue: number;
886
+ }
887
+
875
888
  export declare interface IDonutChart {
876
889
  }
877
890
 
@@ -2362,6 +2375,29 @@ export declare interface IMargins {
2362
2375
  bottom?: number;
2363
2376
  }
2364
2377
 
2378
+ declare interface IMargins_2 {
2379
+ /**
2380
+ * left margin for the chart.
2381
+ * @default 40
2382
+ */
2383
+ left?: number;
2384
+ /**
2385
+ * Right margin for the chart.
2386
+ * @default 20
2387
+ */
2388
+ right?: number;
2389
+ /**
2390
+ * Top margin for the chart.
2391
+ * @default 20
2392
+ */
2393
+ top?: number;
2394
+ /**
2395
+ * Bottom margin for the chart.
2396
+ * @default 35
2397
+ */
2398
+ bottom?: number;
2399
+ }
2400
+
2365
2401
  export declare interface IModifiedCartesianChartProps extends ICartesianChartProps {
2366
2402
  /**
2367
2403
  * Define the chart title
@@ -2497,6 +2533,25 @@ export declare interface IModifiedCartesianChartProps extends ICartesianChartPro
2497
2533
  * Used to control the first render cycle Performance optimization code.
2498
2534
  */
2499
2535
  enableFirstRenderOptimization?: boolean;
2536
+ /**
2537
+ * Get the min and max values of the y-axis
2538
+ */
2539
+ getMinMaxOfYAxis: (points: ILineChartPoints[] | IHorizontalBarChartWithAxisDataPoint[] | IVerticalBarChartDataPoint[] | IDataPoint[], yAxisType: YAxisType | undefined) => {
2540
+ startValue: number;
2541
+ endValue: number;
2542
+ };
2543
+ /**
2544
+ * Create the y-axis
2545
+ */
2546
+ createYAxis: (yAxisParams: IYAxisParams, isRtl: boolean, axisData: IAxisData, isIntegralDataset: boolean, useSecondaryYScale?: boolean) => ScaleLinear<number, number, never>;
2547
+ /**
2548
+ * Get the domain and range values
2549
+ */
2550
+ getDomainNRangeValues: (points: ILineChartPoints[] | IVerticalBarChartDataPoint[] | IVerticalStackedBarDataPoint[] | IHorizontalBarChartWithAxisDataPoint[] | IGroupedVerticalBarChartData[] | IHeatMapChartDataPoint[], margins: IMargins, width: number, chartType: ChartTypes, isRTL: boolean, xAxisType: XAxisTypes, barWidth: number, tickValues: Date[] | number[] | undefined, shiftX: number) => IDomainNRange;
2551
+ /**
2552
+ * Create the string y-axis
2553
+ */
2554
+ createStringYAxis: (yAxisParams: IYAxisParams, dataPoints: string[], isRtl: boolean, barWidth: number | undefined) => ScaleBand<string>;
2500
2555
  }
2501
2556
 
2502
2557
  /**
@@ -3878,6 +3933,26 @@ export declare interface IVSChartDataPoint {
3878
3933
  callOutAccessibilityData?: IAccessibilityProps;
3879
3934
  }
3880
3935
 
3936
+ declare interface IYAxisParams {
3937
+ yMinMaxValues?: {
3938
+ startValue: number;
3939
+ endValue: number;
3940
+ };
3941
+ maxOfYVal?: number;
3942
+ margins: IMargins_2;
3943
+ containerWidth: number;
3944
+ containerHeight: number;
3945
+ yAxisElement?: SVGElement | null;
3946
+ yAxisTickFormat?: any;
3947
+ yAxisTickCount: number;
3948
+ yMaxValue?: number;
3949
+ yMinValue?: number;
3950
+ tickPadding?: number;
3951
+ eventAnnotationProps?: IEventsAnnotationProps;
3952
+ eventLabelHeight?: number;
3953
+ yAxisPadding?: number;
3954
+ }
3955
+
3881
3956
  export declare interface IYValueHover {
3882
3957
  legend?: string;
3883
3958
  y?: number;