@fluentui/react-charting 5.24.2 → 5.24.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.
- package/CHANGELOG.json +79 -1
- package/CHANGELOG.md +28 -2
- package/dist/react-charting.d.ts +204 -38
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +65 -12
- package/lib/ScatterChart.d.ts +1 -0
- package/lib/ScatterChart.js +2 -0
- package/lib/ScatterChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib/components/AreaChart/AreaChart.base.js +4 -1
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +9 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +317 -126
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +22 -3
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib/components/HeatMapChart/HeatMapChart.base.js +95 -37
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +24 -3
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.base.js +482 -0
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.js +10 -0
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js +19 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib/components/ScatterChart/ScatterChart.types.js +2 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib/components/ScatterChart/index.d.ts +2 -0
- package/lib/components/ScatterChart/index.js +3 -0
- package/lib/components/ScatterChart/index.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +27 -6
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +48 -31
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +91 -11
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/SVGTooltipText.d.ts +4 -0
- package/lib/utilities/SVGTooltipText.js +1 -2
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/utilities.d.ts +32 -5
- package/lib/utilities/utilities.js +132 -2
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/ScatterChart.d.ts +1 -0
- package/lib-amd/ScatterChart.js +6 -0
- package/lib-amd/ScatterChart.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js +4 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +155 -78
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js +11 -2
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +327 -134
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +21 -2
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +94 -36
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +23 -2
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +476 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js +12 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js +23 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js +5 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-amd/components/ScatterChart/index.d.ts +2 -0
- package/lib-amd/components/ScatterChart/index.js +7 -0
- package/lib-amd/components/ScatterChart/index.js.map +1 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +26 -5
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +47 -30
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/index.d.ts +3 -1
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +91 -11
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-amd/utilities/SVGTooltipText.js +1 -2
- package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +32 -5
- package/lib-amd/utilities/utilities.js +135 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/ScatterChart.d.ts +1 -0
- package/lib-commonjs/ScatterChart.js +5 -0
- package/lib-commonjs/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +4 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +11 -2
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +327 -134
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +21 -2
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +94 -36
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +23 -2
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +485 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +13 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js +23 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +3 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/index.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/index.js +6 -0
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +26 -5
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +47 -30
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/index.d.ts +3 -1
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +91 -11
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-commonjs/utilities/SVGTooltipText.js +1 -2
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +32 -5
- package/lib-commonjs/utilities/utilities.js +135 -2
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CommonComponents/CartesianChart.types.ts +45 -2
- package/src/components/ScatterChart/ScatterChart.types.ts +67 -0
|
@@ -6,6 +6,7 @@ import { IFocusZoneProps, FocusZoneDirection } from '@fluentui/react-focus';
|
|
|
6
6
|
import { ICalloutProps } from '@fluentui/react/lib/Callout';
|
|
7
7
|
import { ILegendsProps } from '../Legends/index';
|
|
8
8
|
import {
|
|
9
|
+
AxisCategoryOrder,
|
|
9
10
|
IAccessibilityProps,
|
|
10
11
|
IChart,
|
|
11
12
|
IDataPoint,
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
IHorizontalBarChartWithAxisDataPoint,
|
|
15
16
|
ILineChartPoints,
|
|
16
17
|
IMargins,
|
|
18
|
+
IScatterChartDataPoint,
|
|
17
19
|
IVerticalBarChartDataPoint,
|
|
18
20
|
IVerticalStackedBarDataPoint,
|
|
19
21
|
} from '../../types/index';
|
|
@@ -159,10 +161,15 @@ export interface ICartesianChartStyles {
|
|
|
159
161
|
tooltip?: IStyle;
|
|
160
162
|
|
|
161
163
|
/**
|
|
162
|
-
* styles for
|
|
164
|
+
* styles for axis title
|
|
163
165
|
*/
|
|
164
166
|
axisTitle?: IStyle;
|
|
165
167
|
|
|
168
|
+
/**
|
|
169
|
+
* styles for axis annotation
|
|
170
|
+
*/
|
|
171
|
+
axisAnnotation?: IStyle;
|
|
172
|
+
|
|
166
173
|
/**
|
|
167
174
|
* Style for the chart Title.
|
|
168
175
|
*/
|
|
@@ -182,6 +189,11 @@ export interface ICartesianChartStyles {
|
|
|
182
189
|
* Styles for the chart wrapper div
|
|
183
190
|
*/
|
|
184
191
|
chartWrapper?: IStyle;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Styles for the svg tooltip
|
|
195
|
+
*/
|
|
196
|
+
svgTooltip?: IStyle;
|
|
185
197
|
}
|
|
186
198
|
|
|
187
199
|
/**
|
|
@@ -469,6 +481,32 @@ export interface ICartesianChartProps {
|
|
|
469
481
|
* @default false
|
|
470
482
|
*/
|
|
471
483
|
hideTickOverlap?: boolean;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Prop to set the x axis annotation. Used to display additional information on the x-axis.
|
|
487
|
+
* This is shown on the top of the chart.
|
|
488
|
+
* @default undefined
|
|
489
|
+
*/
|
|
490
|
+
xAxisAnnotation?: string;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Prop to set the y axis annotation. Used to display additional information on the y-axis.
|
|
494
|
+
* This is shown on the right side of the chart. Not shown if secondary y-axis is enabled.
|
|
495
|
+
* @default undefined
|
|
496
|
+
*/
|
|
497
|
+
yAxisAnnotation?: string;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Specifies the ordering logic for categories (or string tick labels) on the x-axis.
|
|
501
|
+
* @default 'default'
|
|
502
|
+
*/
|
|
503
|
+
xAxisCategoryOrder?: AxisCategoryOrder;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Specifies the ordering logic for categories (or string tick labels) on the y-axis.
|
|
507
|
+
* @default 'default'
|
|
508
|
+
*/
|
|
509
|
+
yAxisCategoryOrder?: AxisCategoryOrder;
|
|
472
510
|
}
|
|
473
511
|
|
|
474
512
|
export interface IYValueHover {
|
|
@@ -671,7 +709,12 @@ export interface IModifiedCartesianChartProps extends ICartesianChartProps {
|
|
|
671
709
|
* Get the min and max values of the y-axis
|
|
672
710
|
*/
|
|
673
711
|
getMinMaxOfYAxis: (
|
|
674
|
-
points:
|
|
712
|
+
points:
|
|
713
|
+
| ILineChartPoints[]
|
|
714
|
+
| IHorizontalBarChartWithAxisDataPoint[]
|
|
715
|
+
| IVerticalBarChartDataPoint[]
|
|
716
|
+
| IDataPoint[]
|
|
717
|
+
| IScatterChartDataPoint[],
|
|
675
718
|
yAxisType: YAxisType | undefined,
|
|
676
719
|
useSecondaryYScale?: boolean,
|
|
677
720
|
) => { startValue: number; endValue: number };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
import { IRenderFunction } from '@fluentui/react/lib/Utilities';
|
|
3
|
+
import {
|
|
4
|
+
IChartProps,
|
|
5
|
+
ILineChartPoints,
|
|
6
|
+
IMargins,
|
|
7
|
+
IBasestate,
|
|
8
|
+
IRefArrayData,
|
|
9
|
+
ICustomizedCalloutData,
|
|
10
|
+
} from '../../types/index';
|
|
11
|
+
import {
|
|
12
|
+
ICartesianChartProps,
|
|
13
|
+
ICartesianChartStyleProps,
|
|
14
|
+
ICartesianChartStyles,
|
|
15
|
+
IChildProps,
|
|
16
|
+
} from '../CommonComponents/index';
|
|
17
|
+
import { IStyle } from '@fluentui/react';
|
|
18
|
+
|
|
19
|
+
export type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Line Chart properties
|
|
23
|
+
* {@docCategory LineChart}
|
|
24
|
+
*/
|
|
25
|
+
export interface IScatterChartProps extends ICartesianChartProps {
|
|
26
|
+
/**
|
|
27
|
+
* Data to render in the chart.
|
|
28
|
+
*/
|
|
29
|
+
data: IChartProps;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
33
|
+
*/
|
|
34
|
+
styles?: IScatterChartStyles;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Define a custom callout renderer for a data point
|
|
38
|
+
*/
|
|
39
|
+
onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Callback for getting callout description message
|
|
43
|
+
*/
|
|
44
|
+
getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The prop used to define the culture to localized the numbers
|
|
48
|
+
*/
|
|
49
|
+
culture?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Scatter Chart styles
|
|
54
|
+
* {@docCategory ScatterChart}
|
|
55
|
+
*/
|
|
56
|
+
export interface IScatterChartStyles extends ICartesianChartStyles {
|
|
57
|
+
/**
|
|
58
|
+
* Style for the marker label
|
|
59
|
+
*/
|
|
60
|
+
markerLabel?: IStyle;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Scatter Chart style properties
|
|
65
|
+
* {@docCategory ScatterChart}
|
|
66
|
+
*/
|
|
67
|
+
export interface IScatterChartStyleProps extends ICartesianChartStyleProps {}
|