@fluentui/react-charts 9.0.2 → 9.0.3
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.md +48 -7
- package/dist/index.d.ts +767 -0
- package/lib/AreaChart.js +1 -0
- package/lib/AreaChart.js.map +1 -0
- package/lib/HeatMapChart.js +1 -0
- package/lib/HeatMapChart.js.map +1 -0
- package/lib/HorizontalBarChartWithAxis.js +1 -0
- package/lib/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib/SankeyChart.js +1 -0
- package/lib/SankeyChart.js.map +1 -0
- package/lib/VerticalStackedBarChart.js +1 -0
- package/lib/VerticalStackedBarChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.js +775 -0
- package/lib/components/AreaChart/AreaChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.types.js +4 -0
- package/lib/components/AreaChart/AreaChart.types.js.map +1 -0
- package/lib/components/AreaChart/index.js +3 -0
- package/lib/components/AreaChart/index.js.map +1 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +64 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.js +30 -14
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +112 -65
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +570 -159
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +1 -1
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +1 -1
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +3 -0
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +9 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +588 -0
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -0
- package/lib/components/HeatMapChart/HeatMapChart.types.js +4 -0
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
- package/lib/components/HeatMapChart/index.js +3 -0
- package/lib/components/HeatMapChart/index.js.map +1 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +46 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +571 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +4 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/index.js +3 -0
- package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +76 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
- package/lib/components/Legends/Legends.js +38 -37
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +43 -35
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +1022 -0
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -0
- package/lib/components/SankeyChart/SankeyChart.types.js +3 -0
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -0
- package/lib/components/SankeyChart/index.js +3 -0
- package/lib/components/SankeyChart/index.js.map +1 -0
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +109 -0
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.js +46 -59
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +165 -88
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +904 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/index.js +3 -0
- package/lib/components/VerticalStackedBarChart/index.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +73 -0
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/lib/types/DataPoint.js +1 -3
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js +49 -4
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/colors.js +20 -0
- package/lib/utilities/colors.js.map +1 -1
- package/lib/utilities/string.js +32 -0
- package/lib/utilities/string.js.map +1 -0
- package/lib/utilities/test-data.js +53 -0
- package/lib/utilities/test-data.js.map +1 -1
- package/lib/utilities/utilities.js +90 -18
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/AreaChart.js +6 -0
- package/lib-commonjs/AreaChart.js.map +1 -0
- package/lib-commonjs/HeatMapChart.js +6 -0
- package/lib-commonjs/HeatMapChart.js.map +1 -0
- package/lib-commonjs/HorizontalBarChartWithAxis.js +6 -0
- package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib-commonjs/SankeyChart.js +6 -0
- package/lib-commonjs/SankeyChart.js.map +1 -0
- package/lib-commonjs/VerticalStackedBarChart.js +6 -0
- package/lib-commonjs/VerticalStackedBarChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.js +781 -0
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.types.js +7 -0
- package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -0
- package/lib-commonjs/components/AreaChart/index.js +8 -0
- package/lib-commonjs/components/AreaChart/index.js.map +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +104 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +29 -14
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +120 -73
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +592 -178
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +3 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +9 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +599 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +7 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/index.js +8 -0
- package/lib-commonjs/components/HeatMapChart/index.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +68 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +580 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +7 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +8 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +116 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Legends/Legends.js +37 -37
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +41 -33
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1038 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +6 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/index.js +8 -0
- package/lib-commonjs/components/SankeyChart/index.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +179 -0
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +45 -58
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +164 -87
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +915 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +6 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/index.js +8 -0
- package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +120 -0
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +5 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js +1 -3
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +49 -4
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/colors.js +23 -0
- package/lib-commonjs/utilities/colors.js.map +1 -1
- package/lib-commonjs/utilities/string.js +29 -0
- package/lib-commonjs/utilities/string.js.map +1 -0
- package/lib-commonjs/utilities/test-data.js +59 -0
- package/lib-commonjs/utilities/test-data.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +94 -17
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +11 -8
- package/lib/components/DeclarativeChart/PlotlySchema.js +0 -7
- package/lib/components/DeclarativeChart/PlotlySchema.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +0 -10
- package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
|
|
3
|
+
import { CurveFactory } from 'd3-shape';
|
|
3
4
|
import * as React_2 from 'react';
|
|
5
|
+
import { RefObject } from 'react';
|
|
6
|
+
import { SankeyGraph } from 'd3-sankey';
|
|
7
|
+
import { SankeyLayout } from 'd3-sankey';
|
|
8
|
+
import { SankeyLink } from 'd3-sankey';
|
|
9
|
+
import { SankeyNode } from 'd3-sankey';
|
|
4
10
|
import { SVGProps } from 'react';
|
|
5
11
|
import { TimeLocaleDefinition } from 'd3-time-format';
|
|
6
12
|
|
|
@@ -22,8 +28,83 @@ export declare interface AccessibilityProps {
|
|
|
22
28
|
ariaDescribedBy?: string;
|
|
23
29
|
}
|
|
24
30
|
|
|
31
|
+
/**
|
|
32
|
+
* This is used to introduce dynamic padding for cases where the number of nodes in a column is huge
|
|
33
|
+
* so that we maintain a node to space ratio for such columns as if we fail to do so the
|
|
34
|
+
* chart is devoid of nodes and only shows links.
|
|
35
|
+
*/
|
|
36
|
+
export declare function adjustPadding(sankey: SankeyLayoutGenerator, height: number, nodesInColumn: NodesInColumns): void;
|
|
37
|
+
|
|
25
38
|
export declare const ARC_PADDING = 2;
|
|
26
39
|
|
|
40
|
+
export declare const AreaChart: React_2.FunctionComponent<AreaChartProps>;
|
|
41
|
+
|
|
42
|
+
export declare interface AreaChartAreaPoint {
|
|
43
|
+
xVal: string | number;
|
|
44
|
+
values: AreaChartDataSetPoint;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export declare interface AreaChartDataSetPoint {
|
|
48
|
+
[key: string]: number | string | number[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Area Chart properties.
|
|
53
|
+
* {@docCategory AreaChart}
|
|
54
|
+
*/
|
|
55
|
+
export declare interface AreaChartProps extends CartesianChartProps {
|
|
56
|
+
/**
|
|
57
|
+
* Data to render in the chart.
|
|
58
|
+
*/
|
|
59
|
+
data: ChartProps;
|
|
60
|
+
/**
|
|
61
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
62
|
+
*/
|
|
63
|
+
styles?: CartesianChartStyles;
|
|
64
|
+
/**
|
|
65
|
+
* Define a custom callout renderer for a data point
|
|
66
|
+
*/
|
|
67
|
+
onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;
|
|
68
|
+
/**
|
|
69
|
+
* Define a custom callout renderer for a stack; default is to render per data point
|
|
70
|
+
*/
|
|
71
|
+
onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;
|
|
72
|
+
/**
|
|
73
|
+
* The prop used to define the culture to localized the numbers
|
|
74
|
+
*/
|
|
75
|
+
culture?: string;
|
|
76
|
+
/**
|
|
77
|
+
* @default false
|
|
78
|
+
* The prop used to enable the perf optimization
|
|
79
|
+
*/
|
|
80
|
+
enablePerfOptimization?: boolean;
|
|
81
|
+
optimizeLargeData?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* @default false
|
|
84
|
+
* The prop used to enable gradient fill color for the chart.
|
|
85
|
+
*/
|
|
86
|
+
enableGradient?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* @default tonexty
|
|
89
|
+
* The prop used to define the Y axis mode (tonexty or tozeroy)
|
|
90
|
+
*/
|
|
91
|
+
mode?: 'tozeroy' | 'tonexty';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Area Chart style properties
|
|
96
|
+
* {@docCategory AreaChart}
|
|
97
|
+
*/
|
|
98
|
+
export declare interface AreaChartStyleProps extends CartesianChartStyleProps {
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Area Chart styles
|
|
103
|
+
* {@docCategory AreaChart}
|
|
104
|
+
*/
|
|
105
|
+
export declare interface AreaChartStyles extends CartesianChartStyles {
|
|
106
|
+
}
|
|
107
|
+
|
|
27
108
|
/**
|
|
28
109
|
* {@docCategory ChartData}
|
|
29
110
|
*/
|
|
@@ -298,6 +379,11 @@ export declare interface CartesianChartProps {
|
|
|
298
379
|
* @default true
|
|
299
380
|
*/
|
|
300
381
|
useUTC?: string | boolean;
|
|
382
|
+
/**
|
|
383
|
+
* @default false
|
|
384
|
+
* The prop used to decide rounded ticks on y axis
|
|
385
|
+
*/
|
|
386
|
+
roundedTicks?: boolean;
|
|
301
387
|
/**
|
|
302
388
|
* Determines whether overlapping x-axis tick labels should be hidden.
|
|
303
389
|
* @default false
|
|
@@ -563,6 +649,10 @@ export declare interface ChartProps {
|
|
|
563
649
|
* data for the points in the line chart
|
|
564
650
|
*/
|
|
565
651
|
lineChartData?: LineChartPoints[];
|
|
652
|
+
/**
|
|
653
|
+
* data for the points in the line chart
|
|
654
|
+
*/
|
|
655
|
+
SankeyChartData?: SankeyChartData;
|
|
566
656
|
/**
|
|
567
657
|
* data for the points in the line chart
|
|
568
658
|
*/
|
|
@@ -860,6 +950,15 @@ export declare interface DonutChartStyles {
|
|
|
860
950
|
chartWrapper?: string;
|
|
861
951
|
}
|
|
862
952
|
|
|
953
|
+
export declare interface DPointType {
|
|
954
|
+
values: {
|
|
955
|
+
0: number;
|
|
956
|
+
1: number;
|
|
957
|
+
data: {};
|
|
958
|
+
};
|
|
959
|
+
xVal: number | Date;
|
|
960
|
+
}
|
|
961
|
+
|
|
863
962
|
declare interface EventAnnotation {
|
|
864
963
|
date: Date;
|
|
865
964
|
event: string;
|
|
@@ -971,6 +1070,11 @@ export declare interface GaugeChartProps {
|
|
|
971
1070
|
* @default false
|
|
972
1071
|
*/
|
|
973
1072
|
roundCorners?: boolean;
|
|
1073
|
+
/**
|
|
1074
|
+
* Optional callback to access the Chart interface. Use this instead of ref for accessing
|
|
1075
|
+
* the public methods and properties of the component.
|
|
1076
|
+
*/
|
|
1077
|
+
componentRef?: React.RefObject<Chart>;
|
|
974
1078
|
}
|
|
975
1079
|
|
|
976
1080
|
/**
|
|
@@ -1095,6 +1199,8 @@ export declare type GaugeValueFormat = 'percentage' | 'fraction';
|
|
|
1095
1199
|
|
|
1096
1200
|
export declare const getChartValueLabel: (chartValue: number, minValue: number, maxValue: number, chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string) | undefined, forCallout?: boolean) => string;
|
|
1097
1201
|
|
|
1202
|
+
export declare const getColorContrast: (c1: string, c2: string) => number;
|
|
1203
|
+
|
|
1098
1204
|
export declare const getColorFromToken: (token: string, isDarkTheme?: boolean) => string;
|
|
1099
1205
|
|
|
1100
1206
|
export declare const getNextColor: (index: number, offset?: number, isDarkTheme?: boolean) => string;
|
|
@@ -1211,6 +1317,11 @@ export declare interface GroupedVerticalBarChartStyles extends CartesianChartSty
|
|
|
1211
1317
|
barLabel: string;
|
|
1212
1318
|
}
|
|
1213
1319
|
|
|
1320
|
+
/**
|
|
1321
|
+
* This is used to group nodes by column index.
|
|
1322
|
+
*/
|
|
1323
|
+
export declare function groupNodesByColumn(graph: SankeyChartData): NodesInColumns;
|
|
1324
|
+
|
|
1214
1325
|
/**
|
|
1215
1326
|
* {@docCategory ChartData}
|
|
1216
1327
|
*/
|
|
@@ -1275,6 +1386,161 @@ export declare interface GVSingleDataPoint {
|
|
|
1275
1386
|
[key: string]: GVDataPoint;
|
|
1276
1387
|
}
|
|
1277
1388
|
|
|
1389
|
+
export declare const HeatMapChart: React_2.FunctionComponent<HeatMapChartProps>;
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* {@docCategory ChartData}
|
|
1393
|
+
*/
|
|
1394
|
+
export declare interface HeatMapChartData {
|
|
1395
|
+
/**
|
|
1396
|
+
* name of the legend
|
|
1397
|
+
*/
|
|
1398
|
+
legend: string;
|
|
1399
|
+
data: HeatMapChartDataPoint[];
|
|
1400
|
+
/**
|
|
1401
|
+
* This number will be used to get the color for the legend
|
|
1402
|
+
*/
|
|
1403
|
+
value: number;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
export declare interface HeatMapChartDataPoint {
|
|
1407
|
+
x: string | Date | number;
|
|
1408
|
+
y: string | Date | number;
|
|
1409
|
+
value: number;
|
|
1410
|
+
/**
|
|
1411
|
+
* The value/ text to be rendered in the rectange
|
|
1412
|
+
*/
|
|
1413
|
+
rectText?: string | number;
|
|
1414
|
+
/**
|
|
1415
|
+
* denomination to show in the callout
|
|
1416
|
+
*/
|
|
1417
|
+
ratio?: [number, number];
|
|
1418
|
+
/**
|
|
1419
|
+
* description message to the callout
|
|
1420
|
+
*/
|
|
1421
|
+
descriptionMessage?: string;
|
|
1422
|
+
/**
|
|
1423
|
+
* onClick action for each datapoint in the chart
|
|
1424
|
+
*/
|
|
1425
|
+
onClick?: VoidFunction;
|
|
1426
|
+
/**
|
|
1427
|
+
* Accessibility data for callout
|
|
1428
|
+
*/
|
|
1429
|
+
callOutAccessibilityData?: AccessibilityProps;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
/**
|
|
1433
|
+
* Heat Map Chart properties
|
|
1434
|
+
* {@docCategory HeatMapChart}
|
|
1435
|
+
*/
|
|
1436
|
+
export declare interface HeatMapChartProps extends CartesianChartProps {
|
|
1437
|
+
/**
|
|
1438
|
+
* chart title for the chart
|
|
1439
|
+
*/
|
|
1440
|
+
chartTitle?: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* data to provide for Heat Map
|
|
1443
|
+
*/
|
|
1444
|
+
data: HeatMapChartData[];
|
|
1445
|
+
/**
|
|
1446
|
+
* The domain value for the color scale,
|
|
1447
|
+
*
|
|
1448
|
+
*/
|
|
1449
|
+
domainValuesForColorScale: number[];
|
|
1450
|
+
/**
|
|
1451
|
+
* The range values for the color scale,
|
|
1452
|
+
* fill the array with colors in hex format
|
|
1453
|
+
* note:- it should contain values exactly as many as values in the array
|
|
1454
|
+
* `domainValuesForColorScale`
|
|
1455
|
+
*/
|
|
1456
|
+
rangeValuesForColorScale: string[];
|
|
1457
|
+
/**
|
|
1458
|
+
* date formatter of x axis,
|
|
1459
|
+
* if the x-axis data point are of date type then user can use this
|
|
1460
|
+
* prop to format the date
|
|
1461
|
+
* refer to https://github.com/d3/d3-time-format for string values
|
|
1462
|
+
* @default '%b/%d'
|
|
1463
|
+
*/
|
|
1464
|
+
xAxisDateFormatString?: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* date formatter of y axis,
|
|
1467
|
+
* if the y-axis data point are or date type then user can use this
|
|
1468
|
+
* prop to format the date
|
|
1469
|
+
* refer to https://github.com/d3/d3-time-format for string values
|
|
1470
|
+
* @default '%b/%d'
|
|
1471
|
+
*/
|
|
1472
|
+
yAxisDateFormatString?: string;
|
|
1473
|
+
/**
|
|
1474
|
+
* number formatter of x axis
|
|
1475
|
+
* if the x-axis data pints are of number type then user can
|
|
1476
|
+
* use this prop to format the number
|
|
1477
|
+
* refer to https://github.com/d3/d3-format for string values
|
|
1478
|
+
* @default '.2~s'
|
|
1479
|
+
*/
|
|
1480
|
+
xAxisNumberFormatString?: string;
|
|
1481
|
+
/**
|
|
1482
|
+
* number formatter of y axis
|
|
1483
|
+
* if the y-axis data pints are of number type then user can
|
|
1484
|
+
* use this prop to format the number
|
|
1485
|
+
* refer to https://github.com/d3/d3-format for string values
|
|
1486
|
+
* @default '.2~s'
|
|
1487
|
+
*/
|
|
1488
|
+
yAxisNumberFormatString?: string;
|
|
1489
|
+
/**
|
|
1490
|
+
* string formatter for x-axis.
|
|
1491
|
+
* This prop only applies if the x-axis is of string type
|
|
1492
|
+
*
|
|
1493
|
+
* For the accessiblity reason we sort the x-axis data point given by the consumer in ascending
|
|
1494
|
+
* order and then render in the x-axis. this behaviour would force the order of the data points.
|
|
1495
|
+
* to overcome , user can give x-axis point names as p1 p2...etc and map those p1 and p2 to custom name.
|
|
1496
|
+
* behind the scene the charting will actually sort the p1 and p2 and then we can attach the custom
|
|
1497
|
+
* name to that point by using this prop, hence giving the us the flexiblity of the order in which
|
|
1498
|
+
* label should render
|
|
1499
|
+
*
|
|
1500
|
+
* see the example file for the usage of the prop
|
|
1501
|
+
*/
|
|
1502
|
+
xAxisStringFormatter?: (point: string) => string;
|
|
1503
|
+
/**
|
|
1504
|
+
* string formatter for y-axis.
|
|
1505
|
+
* This prop only applies if the y-axis is of string type
|
|
1506
|
+
*
|
|
1507
|
+
* For the accessiblity reason we sort the x-axis data point given by the consumer in ascending
|
|
1508
|
+
* order and then render in the y-axis. this behaviour would force the order of the data points.
|
|
1509
|
+
* to overcome , user can give y-axis point names as p1 p2...etc and map those p1 and p2 to custom name.
|
|
1510
|
+
* behind the scene the charting will actually sort the p1 and p2 and then we can attach the custom
|
|
1511
|
+
* name to that point by using this prop, hence giving the us the flexiblity of the order in which
|
|
1512
|
+
* label should render
|
|
1513
|
+
*
|
|
1514
|
+
* see the exaple file for the usage of the prop
|
|
1515
|
+
*/
|
|
1516
|
+
yAxisStringFormatter?: (point: string) => string;
|
|
1517
|
+
/**
|
|
1518
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
1519
|
+
*/
|
|
1520
|
+
styles?: HeatMapChartStyles;
|
|
1521
|
+
/**
|
|
1522
|
+
* The prop used to define the culture to localized the numbers
|
|
1523
|
+
*/
|
|
1524
|
+
culture?: string;
|
|
1525
|
+
/**
|
|
1526
|
+
*@default false
|
|
1527
|
+
*Used for showing complete y axis lables */
|
|
1528
|
+
showYAxisLables?: boolean;
|
|
1529
|
+
/**
|
|
1530
|
+
* @default alphabetical
|
|
1531
|
+
* The prop used to decide order of string axis labels */
|
|
1532
|
+
sortOrder?: 'none' | 'alphabetical';
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Heat Map Chart styles
|
|
1537
|
+
* {@docCategory HeatMapChart}
|
|
1538
|
+
*/
|
|
1539
|
+
export declare interface HeatMapChartStyles extends CartesianChartStyles {
|
|
1540
|
+
root?: string;
|
|
1541
|
+
text?: string;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1278
1544
|
/**
|
|
1279
1545
|
* HorizontalBarChart is the context wrapper and container for all HorizontalBarChart content/controls,
|
|
1280
1546
|
* It has no direct style or slot opinions.
|
|
@@ -1439,6 +1705,8 @@ export declare enum HorizontalBarChartVariant {
|
|
|
1439
1705
|
AbsoluteScale = "absolute-scale"
|
|
1440
1706
|
}
|
|
1441
1707
|
|
|
1708
|
+
export declare const HorizontalBarChartWithAxis: React_2.FunctionComponent<HorizontalBarChartWithAxisProps>;
|
|
1709
|
+
|
|
1442
1710
|
/**
|
|
1443
1711
|
* {@docCategory ChartData}
|
|
1444
1712
|
*/
|
|
@@ -1481,6 +1749,128 @@ export declare interface HorizontalBarChartWithAxisDataPoint {
|
|
|
1481
1749
|
callOutAccessibilityData?: AccessibilityProps;
|
|
1482
1750
|
}
|
|
1483
1751
|
|
|
1752
|
+
/**
|
|
1753
|
+
* Horizontal Bar Chart with Axis properties
|
|
1754
|
+
* {@docCategory HorizontalBarChartWithAxis}
|
|
1755
|
+
*/
|
|
1756
|
+
export declare interface HorizontalBarChartWithAxisProps extends CartesianChartProps {
|
|
1757
|
+
/**
|
|
1758
|
+
* Data to render in the chart.
|
|
1759
|
+
*/
|
|
1760
|
+
data?: HorizontalBarChartWithAxisDataPoint[];
|
|
1761
|
+
/**
|
|
1762
|
+
* Define a custom callout renderer for a data point.
|
|
1763
|
+
*/
|
|
1764
|
+
onRenderCalloutPerDataPoint?: RenderFunction<HorizontalBarChartWithAxisDataPoint>;
|
|
1765
|
+
/**
|
|
1766
|
+
* Width of each bar in the chart.
|
|
1767
|
+
*/
|
|
1768
|
+
barHeight?: number;
|
|
1769
|
+
/**
|
|
1770
|
+
* Colors from which to select the color of each bar.
|
|
1771
|
+
*/
|
|
1772
|
+
colors?: string[];
|
|
1773
|
+
/**
|
|
1774
|
+
* chart title for the chart
|
|
1775
|
+
*/
|
|
1776
|
+
chartTitle?: string;
|
|
1777
|
+
/**
|
|
1778
|
+
* This prop makes sure that all the bars are of same color.
|
|
1779
|
+
* it will take the first color from the array of colors in
|
|
1780
|
+
* prop `colors` or if `colors` prop is not given then default color is palette.blueLight
|
|
1781
|
+
* @default false
|
|
1782
|
+
*/
|
|
1783
|
+
useSingleColor?: boolean;
|
|
1784
|
+
/**
|
|
1785
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
1786
|
+
*/
|
|
1787
|
+
styles?: HorizontalBarChartWithAxisStyles;
|
|
1788
|
+
/**
|
|
1789
|
+
* The prop used to define the culture to localized the numbers
|
|
1790
|
+
*/
|
|
1791
|
+
culture?: string;
|
|
1792
|
+
/**
|
|
1793
|
+
* it's padding between bar's or lines in the graph
|
|
1794
|
+
*/
|
|
1795
|
+
yAxisPadding?: number;
|
|
1796
|
+
/**
|
|
1797
|
+
*@default false
|
|
1798
|
+
*Used for to elipse y axis labes and show tooltip on x axis labels
|
|
1799
|
+
*/
|
|
1800
|
+
showYAxisLablesTooltip?: boolean;
|
|
1801
|
+
/**
|
|
1802
|
+
*@default false
|
|
1803
|
+
*Used for showing complete y axis lables */
|
|
1804
|
+
showYAxisLables?: boolean;
|
|
1805
|
+
/**
|
|
1806
|
+
* @default false
|
|
1807
|
+
* The prop used to enable gradient fill color for the chart.
|
|
1808
|
+
*/
|
|
1809
|
+
enableGradient?: boolean;
|
|
1810
|
+
/**
|
|
1811
|
+
* @default false
|
|
1812
|
+
* The prop used to enable rounded corners for the bars.
|
|
1813
|
+
*/
|
|
1814
|
+
roundCorners?: boolean;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* Horizontal Bar Chart with Axis style properties
|
|
1819
|
+
* {@docCategory HorizontalBarChartWithAxis}
|
|
1820
|
+
*/
|
|
1821
|
+
export declare interface HorizontalBarChartWithAxisStyleProps extends CartesianChartStyleProps {
|
|
1822
|
+
/**
|
|
1823
|
+
* color of the datapoint legend
|
|
1824
|
+
*/
|
|
1825
|
+
legendColor?: string;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* Horizontal Bar Chart with Axis styles
|
|
1830
|
+
* {@docCategory HorizontalBarChartWithAxis}
|
|
1831
|
+
*/
|
|
1832
|
+
export declare interface HorizontalBarChartWithAxisStyles extends CartesianChartStyles {
|
|
1833
|
+
/**
|
|
1834
|
+
* Style for the chart label.
|
|
1835
|
+
*
|
|
1836
|
+
*/
|
|
1837
|
+
chartLabel?: string;
|
|
1838
|
+
/**
|
|
1839
|
+
* Style for the line representing the domain of the x-axis.
|
|
1840
|
+
*
|
|
1841
|
+
*/
|
|
1842
|
+
xAxisDomain?: string;
|
|
1843
|
+
/**
|
|
1844
|
+
* Style for the lines representing the ticks along the x-axis.
|
|
1845
|
+
*
|
|
1846
|
+
*/
|
|
1847
|
+
xAxisTicks?: string;
|
|
1848
|
+
/**
|
|
1849
|
+
* Style for the text labeling each tick along the x-axis.
|
|
1850
|
+
*
|
|
1851
|
+
*/
|
|
1852
|
+
xAxisText?: string;
|
|
1853
|
+
/**
|
|
1854
|
+
* Style for the line representing the domain of the y-axis.
|
|
1855
|
+
*
|
|
1856
|
+
*/
|
|
1857
|
+
yAxisDomain?: string;
|
|
1858
|
+
/**
|
|
1859
|
+
* Style for the lines representing the ticks along the y-axis.
|
|
1860
|
+
*
|
|
1861
|
+
*/
|
|
1862
|
+
yAxisTicks?: string;
|
|
1863
|
+
/**
|
|
1864
|
+
* Style for the text labeling each tick along the y-axis.
|
|
1865
|
+
*
|
|
1866
|
+
*/
|
|
1867
|
+
yAxisText?: string;
|
|
1868
|
+
/**
|
|
1869
|
+
* Style to change the opacity of bars in dataviz when we hover on a single bar or legends
|
|
1870
|
+
*/
|
|
1871
|
+
opacityChangeOnHover: string;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1484
1874
|
/**
|
|
1485
1875
|
* {@docCategory ChartData}
|
|
1486
1876
|
*/
|
|
@@ -1814,6 +2204,11 @@ export declare interface LineChartLineOptions extends SVGProps<SVGPathElement> {
|
|
|
1814
2204
|
* Color of border around the line. Default white.
|
|
1815
2205
|
*/
|
|
1816
2206
|
lineBorderColor?: string;
|
|
2207
|
+
/**
|
|
2208
|
+
* Defines the type of interpolation used to render the line.
|
|
2209
|
+
* @default 'linear'
|
|
2210
|
+
*/
|
|
2211
|
+
curve?: 'linear' | 'natural' | 'step' | 'stepAfter' | 'stepBefore' | CurveFactory;
|
|
1817
2212
|
}
|
|
1818
2213
|
|
|
1819
2214
|
/**
|
|
@@ -1965,6 +2360,15 @@ export declare interface LineDataInVerticalStackedBarChart {
|
|
|
1965
2360
|
* False by default.
|
|
1966
2361
|
*/
|
|
1967
2362
|
useSecondaryYScale?: boolean;
|
|
2363
|
+
/**
|
|
2364
|
+
* options for the line drawn
|
|
2365
|
+
*/
|
|
2366
|
+
lineOptions?: LineChartLineOptions;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
export declare interface MapXToDataSet {
|
|
2370
|
+
[key: string]: LineChartDataPoint[];
|
|
2371
|
+
[key: number]: LineChartDataPoint[];
|
|
1968
2372
|
}
|
|
1969
2373
|
|
|
1970
2374
|
/**
|
|
@@ -2055,10 +2459,18 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
|
|
|
2055
2459
|
* Children elements specific to derived chart types.
|
|
2056
2460
|
*/
|
|
2057
2461
|
children(props: ChildProps): React_2.ReactNode;
|
|
2462
|
+
/**
|
|
2463
|
+
* To enable callout for individual bar or complete stack. Using for only Vertical stacked bar chart.
|
|
2464
|
+
* @default false
|
|
2465
|
+
* @type \{boolean \}
|
|
2466
|
+
*/
|
|
2467
|
+
isCalloutForStack?: boolean;
|
|
2058
2468
|
/** dataset values to find out domain of the String axis
|
|
2059
2469
|
* Present using for only vertical stacked bar chart and grouped vertical bar chart
|
|
2060
2470
|
*/
|
|
2061
2471
|
datasetForXAxisDomain?: string[];
|
|
2472
|
+
/** Own callout design */
|
|
2473
|
+
customizedCallout?: any;
|
|
2062
2474
|
/**
|
|
2063
2475
|
* if the data points for the y-axis is of type string, then we need to give this
|
|
2064
2476
|
* prop to construct the y-axis
|
|
@@ -2095,6 +2507,10 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
|
|
|
2095
2507
|
enableFirstRenderOptimization?: boolean;
|
|
2096
2508
|
}
|
|
2097
2509
|
|
|
2510
|
+
declare type NodesInColumns = {
|
|
2511
|
+
[key: number]: SNode[];
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2098
2514
|
/**
|
|
2099
2515
|
* we need to make sure that if we add any property to this, then
|
|
2100
2516
|
* we need to also add that in pointTypes below and vise-versa
|
|
@@ -2128,6 +2544,12 @@ export declare interface PopoverComponentStyles {
|
|
|
2128
2544
|
calloutContainer: string;
|
|
2129
2545
|
}
|
|
2130
2546
|
|
|
2547
|
+
export declare function preRenderLayout(margins: Margins, containerWidth: number, containerHeight: number, isRtl: boolean): {
|
|
2548
|
+
sankey: SankeyLayoutGenerator;
|
|
2549
|
+
height: number;
|
|
2550
|
+
width: number;
|
|
2551
|
+
};
|
|
2552
|
+
|
|
2131
2553
|
export declare interface RefArrayData {
|
|
2132
2554
|
index?: string;
|
|
2133
2555
|
refElement?: SVGGElement;
|
|
@@ -2151,6 +2573,154 @@ declare interface ResponsiveContainerProps {
|
|
|
2151
2573
|
height?: number | string;
|
|
2152
2574
|
}
|
|
2153
2575
|
|
|
2576
|
+
export declare const SankeyChart: React_2.FunctionComponent<SankeyChartProps>;
|
|
2577
|
+
|
|
2578
|
+
/**
|
|
2579
|
+
* Set of strings which are used when rendering accessibility information within the chart.
|
|
2580
|
+
*/
|
|
2581
|
+
export declare interface SankeyChartAccessibilityProps {
|
|
2582
|
+
/**
|
|
2583
|
+
* Aria label for when the chart is empty.
|
|
2584
|
+
*/
|
|
2585
|
+
emptyAriaLabel?: string;
|
|
2586
|
+
/**
|
|
2587
|
+
* A value similar to "node \{0\} with weight \{1\}".
|
|
2588
|
+
* \{0\} is the name of the node.
|
|
2589
|
+
* \{1\} is the weight of the node (as computed by the sankey layout engine via the links to or from this node).
|
|
2590
|
+
*/
|
|
2591
|
+
nodeAriaLabel?: string;
|
|
2592
|
+
/**
|
|
2593
|
+
* A value similar to "link from \{0\} to $\{1\} with weight $\{2\}".
|
|
2594
|
+
* \{0\} is the source node, \{1\} is the target node, and \{2\} is the value of the link.
|
|
2595
|
+
*/
|
|
2596
|
+
linkAriaLabel?: string;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
/**
|
|
2600
|
+
* {@docCategory ChartData}
|
|
2601
|
+
*/
|
|
2602
|
+
export declare interface SankeyChartData {
|
|
2603
|
+
nodes: SNode[];
|
|
2604
|
+
links: SLink[];
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* Sankey Chart properties
|
|
2609
|
+
* {@docCategory SankeyChart}
|
|
2610
|
+
*/
|
|
2611
|
+
export declare interface SankeyChartProps {
|
|
2612
|
+
/**
|
|
2613
|
+
* Data to render in the chart.
|
|
2614
|
+
*/
|
|
2615
|
+
data: ChartProps;
|
|
2616
|
+
/**
|
|
2617
|
+
* Width of the chart.
|
|
2618
|
+
*/
|
|
2619
|
+
width?: number;
|
|
2620
|
+
/**
|
|
2621
|
+
* Height of the chart.
|
|
2622
|
+
*/
|
|
2623
|
+
height?: number;
|
|
2624
|
+
/**
|
|
2625
|
+
* Additional CSS class(es) to apply to the SankeyChart.
|
|
2626
|
+
*/
|
|
2627
|
+
className?: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
2630
|
+
*/
|
|
2631
|
+
styles?: SankeyChartStyles;
|
|
2632
|
+
/**
|
|
2633
|
+
* this prop takes its parent as a HTML element to define the width and height of the Sankey chart
|
|
2634
|
+
*/
|
|
2635
|
+
parentRef?: HTMLElement | null;
|
|
2636
|
+
/**
|
|
2637
|
+
* should chart resize when parent resize.
|
|
2638
|
+
*/
|
|
2639
|
+
shouldResize?: number;
|
|
2640
|
+
/**
|
|
2641
|
+
* Color for path
|
|
2642
|
+
*/
|
|
2643
|
+
pathColor?: string;
|
|
2644
|
+
/**
|
|
2645
|
+
* Colors for nodes
|
|
2646
|
+
*/
|
|
2647
|
+
colorsForNodes?: string[];
|
|
2648
|
+
/**
|
|
2649
|
+
* Colors for nodes border
|
|
2650
|
+
*/
|
|
2651
|
+
borderColorsForNodes?: string[];
|
|
2652
|
+
/**
|
|
2653
|
+
* Localized strings to show in the UX.
|
|
2654
|
+
*/
|
|
2655
|
+
strings?: SankeyChartStrings;
|
|
2656
|
+
/**
|
|
2657
|
+
* Localized strings to use for the chart's accessibility features.
|
|
2658
|
+
*/
|
|
2659
|
+
accessibility?: SankeyChartAccessibilityProps;
|
|
2660
|
+
/**
|
|
2661
|
+
* Format node and link values.
|
|
2662
|
+
*/
|
|
2663
|
+
formatNumberOptions?: Intl.NumberFormatOptions;
|
|
2664
|
+
/**
|
|
2665
|
+
* Prop to disable shrinking of the chart beyond a certain limit and enable scrolling when the chart overflows
|
|
2666
|
+
* @default true
|
|
2667
|
+
*/
|
|
2668
|
+
enableReflow?: boolean;
|
|
2669
|
+
/**
|
|
2670
|
+
* Optional callback to access the Chart interface. Use this instead of ref for accessing
|
|
2671
|
+
* the public methods and properties of the component.
|
|
2672
|
+
*/
|
|
2673
|
+
componentRef?: RefObject<Chart>;
|
|
2674
|
+
/**
|
|
2675
|
+
* props for the callout in the chart
|
|
2676
|
+
*/
|
|
2677
|
+
calloutProps?: ChartPopoverProps;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
/**
|
|
2681
|
+
* Set of strings which are used when rendering the chart.
|
|
2682
|
+
*/
|
|
2683
|
+
export declare interface SankeyChartStrings {
|
|
2684
|
+
/**
|
|
2685
|
+
* A value similar to "from \{0\}" where \{0\} is the name of the source node for a link.
|
|
2686
|
+
* This is shown in the `ChartHoverCard` when the user hovers the mouse over a link.
|
|
2687
|
+
*/
|
|
2688
|
+
linkFrom?: string;
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
/**
|
|
2692
|
+
* Sankey Chart styles
|
|
2693
|
+
* {@docCategory SankeyChart}
|
|
2694
|
+
*/
|
|
2695
|
+
export declare interface SankeyChartStyles {
|
|
2696
|
+
/**
|
|
2697
|
+
* Style for the root element.
|
|
2698
|
+
*/
|
|
2699
|
+
root?: string;
|
|
2700
|
+
/**
|
|
2701
|
+
* Style for the nodes.
|
|
2702
|
+
*/
|
|
2703
|
+
nodes?: string;
|
|
2704
|
+
/**
|
|
2705
|
+
* Style for the links.
|
|
2706
|
+
*/
|
|
2707
|
+
links?: string;
|
|
2708
|
+
/**
|
|
2709
|
+
* Style for the text inside node.
|
|
2710
|
+
*/
|
|
2711
|
+
nodeTextContainer?: string;
|
|
2712
|
+
/**
|
|
2713
|
+
* Style for the tooltip ,when user hover over the truncated node detail.
|
|
2714
|
+
*/
|
|
2715
|
+
toolTip?: string;
|
|
2716
|
+
/**
|
|
2717
|
+
* Styles for the chart wrapper div
|
|
2718
|
+
*/
|
|
2719
|
+
chartWrapper?: string;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
declare type SankeyLayoutGenerator = SankeyLayout<SankeyGraph<{}, {}>, {}, {}>;
|
|
2723
|
+
|
|
2154
2724
|
/**
|
|
2155
2725
|
* ScatterChart component
|
|
2156
2726
|
* {@docCategory ScatterChart}
|
|
@@ -2238,6 +2808,41 @@ export declare interface ShapeProps {
|
|
|
2238
2808
|
style?: React_2.CSSProperties | undefined;
|
|
2239
2809
|
}
|
|
2240
2810
|
|
|
2811
|
+
export declare type SLink = SankeyLink<SNodeExtra, SLinkExtra>;
|
|
2812
|
+
|
|
2813
|
+
declare interface SLinkExtra {
|
|
2814
|
+
/**
|
|
2815
|
+
* The index within `ISankeyChartData.nodes` of the source node.
|
|
2816
|
+
*/
|
|
2817
|
+
source: number;
|
|
2818
|
+
/**
|
|
2819
|
+
* The index within `ISankeyChartData.nodes` of the target node.
|
|
2820
|
+
*/
|
|
2821
|
+
target: number;
|
|
2822
|
+
/**
|
|
2823
|
+
* The weight of this link between the two nodes.
|
|
2824
|
+
*/
|
|
2825
|
+
value: number;
|
|
2826
|
+
unnormalizedValue?: number;
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
export declare type SNode = SankeyNode<SNodeExtra, SLinkExtra>;
|
|
2830
|
+
|
|
2831
|
+
declare interface SNodeExtra {
|
|
2832
|
+
/**
|
|
2833
|
+
* A unique identifier for this node.
|
|
2834
|
+
*/
|
|
2835
|
+
nodeId: number | string;
|
|
2836
|
+
/**
|
|
2837
|
+
* The display name for this node in the UX.
|
|
2838
|
+
*/
|
|
2839
|
+
name: string;
|
|
2840
|
+
color?: string;
|
|
2841
|
+
borderColor?: string;
|
|
2842
|
+
actualValue?: number;
|
|
2843
|
+
layer?: number;
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2241
2846
|
/**
|
|
2242
2847
|
* Sparkline is the context wrapper and container for all Sparkline content/controls,
|
|
2243
2848
|
* It has no direct style or slot opinions.
|
|
@@ -2446,6 +3051,21 @@ export declare interface VerticalBarChartProps extends CartesianChartProps {
|
|
|
2446
3051
|
* Only applicable to string x-axis.
|
|
2447
3052
|
*/
|
|
2448
3053
|
xAxisOuterPadding?: number;
|
|
3054
|
+
/**
|
|
3055
|
+
* @default false
|
|
3056
|
+
* The prop used to enable gradient fill color for the chart.
|
|
3057
|
+
*/
|
|
3058
|
+
enableGradient?: boolean;
|
|
3059
|
+
/**
|
|
3060
|
+
* @default false
|
|
3061
|
+
* The prop used to enable rounded corners for the chart.
|
|
3062
|
+
*/
|
|
3063
|
+
roundCorners?: boolean;
|
|
3064
|
+
/**
|
|
3065
|
+
* Specifies the mode of the chart.
|
|
3066
|
+
* @default 'default'
|
|
3067
|
+
*/
|
|
3068
|
+
mode?: 'default' | 'plotly';
|
|
2449
3069
|
}
|
|
2450
3070
|
|
|
2451
3071
|
/**
|
|
@@ -2470,6 +3090,149 @@ export declare interface VerticalBarChartStyles extends CartesianChartStyles {
|
|
|
2470
3090
|
barLabel: string;
|
|
2471
3091
|
}
|
|
2472
3092
|
|
|
3093
|
+
export declare const VerticalStackedBarChart: React_2.FunctionComponent<VerticalStackedBarChartProps>;
|
|
3094
|
+
|
|
3095
|
+
/**
|
|
3096
|
+
* Vertical Stacked Bar Chart properties
|
|
3097
|
+
* {@docCategory VerticalStackedBarChart}
|
|
3098
|
+
*/
|
|
3099
|
+
export declare interface VerticalStackedBarChartProps extends CartesianChartProps {
|
|
3100
|
+
/**
|
|
3101
|
+
* Data to render in the chart.
|
|
3102
|
+
*/
|
|
3103
|
+
data: VerticalStackedChartProps[];
|
|
3104
|
+
/**
|
|
3105
|
+
* Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,
|
|
3106
|
+
* which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.
|
|
3107
|
+
*/
|
|
3108
|
+
barWidth?: number | 'default' | 'auto';
|
|
3109
|
+
/**
|
|
3110
|
+
* Gap (max) between bars in a stack. When non-zero, the bars in a stack will
|
|
3111
|
+
* be separated by gaps. The actual size of each gap is calculated as 20% of
|
|
3112
|
+
* the height of that stack, with a minimum size of 1px and a maximum given by
|
|
3113
|
+
* this prop.
|
|
3114
|
+
* @default 0
|
|
3115
|
+
*/
|
|
3116
|
+
barGapMax?: number;
|
|
3117
|
+
/**
|
|
3118
|
+
* Corner radius of the bars
|
|
3119
|
+
* @default 0
|
|
3120
|
+
*/
|
|
3121
|
+
barCornerRadius?: number;
|
|
3122
|
+
/**
|
|
3123
|
+
* The minimum height of a bar; bars below this height will be displayed at
|
|
3124
|
+
* this height. Note that this setting will result in the height of these data
|
|
3125
|
+
* points not being to scale.
|
|
3126
|
+
* @default 0
|
|
3127
|
+
*/
|
|
3128
|
+
barMinimumHeight?: number;
|
|
3129
|
+
/**
|
|
3130
|
+
* chart title for the chart
|
|
3131
|
+
*/
|
|
3132
|
+
chartTitle?: string;
|
|
3133
|
+
/**
|
|
3134
|
+
* To display multi stack callout or single callout
|
|
3135
|
+
* @default flase
|
|
3136
|
+
*/
|
|
3137
|
+
isCalloutForStack?: boolean;
|
|
3138
|
+
/**
|
|
3139
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
3140
|
+
*/
|
|
3141
|
+
styles?: VerticalStackedBarChartStyles;
|
|
3142
|
+
/**
|
|
3143
|
+
* Define a custom callout renderer for a stack; default is to render per data point
|
|
3144
|
+
*/
|
|
3145
|
+
onRenderCalloutPerStack?: RenderFunction<VerticalStackedChartProps>;
|
|
3146
|
+
/**
|
|
3147
|
+
* Define a custom callout renderer for a data point
|
|
3148
|
+
*/
|
|
3149
|
+
onRenderCalloutPerDataPoint?: RenderFunction<VSChartDataPoint>;
|
|
3150
|
+
/**
|
|
3151
|
+
* yMinValue is not supported for bar charts, so only allow "undefined"
|
|
3152
|
+
*/
|
|
3153
|
+
yMinValue?: undefined;
|
|
3154
|
+
/**
|
|
3155
|
+
* Allow hover actions on the legend
|
|
3156
|
+
* @default true
|
|
3157
|
+
*/
|
|
3158
|
+
allowHoverOnLegend?: boolean;
|
|
3159
|
+
/**
|
|
3160
|
+
* Click handler for bars; type of data is dependant on isCalloutForStack
|
|
3161
|
+
*/
|
|
3162
|
+
onBarClick?: (event: React_2.MouseEvent<SVGElement>, data: VerticalStackedChartProps | VSChartDataPoint) => void;
|
|
3163
|
+
/**
|
|
3164
|
+
* The prop used to define the culture to localized the numbers
|
|
3165
|
+
*/
|
|
3166
|
+
culture?: string;
|
|
3167
|
+
/**
|
|
3168
|
+
* it's padding between bar's or lines in the graph
|
|
3169
|
+
*/
|
|
3170
|
+
xAxisPadding?: number;
|
|
3171
|
+
/**
|
|
3172
|
+
* options for the line drawn
|
|
3173
|
+
*/
|
|
3174
|
+
lineOptions?: LineChartLineOptions;
|
|
3175
|
+
/**
|
|
3176
|
+
* Prop to hide the bar labels
|
|
3177
|
+
* @default false
|
|
3178
|
+
*/
|
|
3179
|
+
hideLabels?: boolean;
|
|
3180
|
+
/**
|
|
3181
|
+
* Maximum width of a bar, in pixels.
|
|
3182
|
+
* @default 24
|
|
3183
|
+
*/
|
|
3184
|
+
maxBarWidth?: number;
|
|
3185
|
+
/**
|
|
3186
|
+
* Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).
|
|
3187
|
+
* Takes a number in the range [0, 1]. Only applicable to string x-axis.
|
|
3188
|
+
* @default 2/3
|
|
3189
|
+
*/
|
|
3190
|
+
xAxisInnerPadding?: number;
|
|
3191
|
+
/**
|
|
3192
|
+
* Padding before the first bar and after the last bar as a fraction of
|
|
3193
|
+
* the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].
|
|
3194
|
+
* Only applicable to string x-axis.
|
|
3195
|
+
*/
|
|
3196
|
+
xAxisOuterPadding?: number;
|
|
3197
|
+
/**
|
|
3198
|
+
* @default false
|
|
3199
|
+
* The prop used to enable gradient fill color for the chart.
|
|
3200
|
+
*/
|
|
3201
|
+
enableGradient?: boolean;
|
|
3202
|
+
/**
|
|
3203
|
+
* @default false
|
|
3204
|
+
* The prop used to enable rounded corners for the chart.
|
|
3205
|
+
*/
|
|
3206
|
+
roundCorners?: boolean;
|
|
3207
|
+
/**
|
|
3208
|
+
* Specifies the mode of the chart.
|
|
3209
|
+
* @default 'default'
|
|
3210
|
+
*/
|
|
3211
|
+
mode?: 'default' | 'plotly';
|
|
3212
|
+
}
|
|
3213
|
+
|
|
3214
|
+
/**
|
|
3215
|
+
* Vertical Stacked Bar Chart style properties
|
|
3216
|
+
* {@docCategory VerticalStackedBarChart}
|
|
3217
|
+
*/
|
|
3218
|
+
export declare interface VerticalStackedBarChartStyleProps extends CartesianChartStyleProps {
|
|
3219
|
+
}
|
|
3220
|
+
|
|
3221
|
+
/**
|
|
3222
|
+
* Vertical Stacked Bar Chart styles
|
|
3223
|
+
* {@docCategory VerticalStackedBarChart}
|
|
3224
|
+
*/
|
|
3225
|
+
export declare interface VerticalStackedBarChartStyles extends CartesianChartStyles {
|
|
3226
|
+
/**
|
|
3227
|
+
* Style to change the opacity of bars in dataviz when we hover on a single bar or legends
|
|
3228
|
+
*/
|
|
3229
|
+
opacityChangeOnHover?: string;
|
|
3230
|
+
/**
|
|
3231
|
+
* Style for the bar labels
|
|
3232
|
+
*/
|
|
3233
|
+
barLabel: string;
|
|
3234
|
+
}
|
|
3235
|
+
|
|
2473
3236
|
/**
|
|
2474
3237
|
* {@docCategory ChartData}
|
|
2475
3238
|
*/
|
|
@@ -2540,6 +3303,10 @@ export declare interface VSChartDataPoint {
|
|
|
2540
3303
|
* Accessibility data for callout
|
|
2541
3304
|
*/
|
|
2542
3305
|
callOutAccessibilityData?: AccessibilityProps;
|
|
3306
|
+
/**
|
|
3307
|
+
* The prop used to define the culture to localized the numbers
|
|
3308
|
+
*/
|
|
3309
|
+
culture?: string;
|
|
2543
3310
|
}
|
|
2544
3311
|
|
|
2545
3312
|
declare enum XAxisTypes {
|