@fluentui/react-charts 9.0.1 → 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 +58 -2
- package/dist/index.d.ts +1432 -238
- package/lib/AreaChart.js +1 -0
- package/lib/AreaChart.js.map +1 -0
- package/lib/GaugeChart.js +1 -0
- package/lib/GaugeChart.js.map +1 -0
- package/lib/GroupedVerticalBarChart.js +1 -0
- package/lib/GroupedVerticalBarChart.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/ScatterChart.js +1 -0
- package/lib/ScatterChart.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 +592 -0
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -0
- package/lib/components/GaugeChart/GaugeChart.types.js +4 -0
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -0
- package/lib/components/GaugeChart/index.js +3 -0
- package/lib/components/GaugeChart/index.js.map +1 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +174 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +501 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +4 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/index.js +3 -0
- package/lib/components/GroupedVerticalBarChart/index.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +90 -0
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
- 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/Legends/Legends.types.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 +465 -0
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.types.js +4 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib/components/ScatterChart/index.js +3 -0
- package/lib/components/ScatterChart/index.js.map +1 -0
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +65 -0
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
- package/lib/components/Sparkline/Sparkline.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 +8 -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 +210 -20
- 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/GaugeChart.js +6 -0
- package/lib-commonjs/GaugeChart.js.map +1 -0
- package/lib-commonjs/GroupedVerticalBarChart.js +6 -0
- package/lib-commonjs/GroupedVerticalBarChart.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/ScatterChart.js +6 -0
- package/lib-commonjs/ScatterChart.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 +621 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +7 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/index.js +8 -0
- package/lib-commonjs/components/GaugeChart/index.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +252 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +507 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +7 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js +8 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +139 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
- 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/Legends/Legends.types.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 +471 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/index.js +8 -0
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +96 -0
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.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 +8 -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 +206 -19
- 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,6 +28,115 @@ 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
|
+
|
|
38
|
+
export declare const ARC_PADDING = 2;
|
|
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
|
+
|
|
108
|
+
/**
|
|
109
|
+
* {@docCategory ChartData}
|
|
110
|
+
*/
|
|
111
|
+
declare interface BaseDataPoint {
|
|
112
|
+
/**
|
|
113
|
+
* Defines the function that is executed on clicking line
|
|
114
|
+
*/
|
|
115
|
+
onDataPointClick?: () => void;
|
|
116
|
+
/**
|
|
117
|
+
* Callout data for x axis
|
|
118
|
+
*/
|
|
119
|
+
xAxisCalloutData?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Callout data for y axis
|
|
122
|
+
*/
|
|
123
|
+
yAxisCalloutData?: string | {
|
|
124
|
+
[id: string]: number;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Whether to hide callout data for the point.
|
|
128
|
+
*/
|
|
129
|
+
hideCallout?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Accessibility data for callout
|
|
132
|
+
*/
|
|
133
|
+
callOutAccessibilityData?: AccessibilityProps;
|
|
134
|
+
/**
|
|
135
|
+
* X axis Accessibility data for callout
|
|
136
|
+
*/
|
|
137
|
+
xAxisCalloutAccessibilityData?: AccessibilityProps;
|
|
138
|
+
}
|
|
139
|
+
|
|
25
140
|
export declare interface Basestate {
|
|
26
141
|
_width?: number;
|
|
27
142
|
_height?: number;
|
|
@@ -48,6 +163,14 @@ export declare interface Basestate {
|
|
|
48
163
|
containerHeight?: number;
|
|
49
164
|
}
|
|
50
165
|
|
|
166
|
+
export declare const BREAKPOINTS: {
|
|
167
|
+
minRadius: number;
|
|
168
|
+
arcWidth: number;
|
|
169
|
+
fontSize: number;
|
|
170
|
+
}[];
|
|
171
|
+
|
|
172
|
+
export declare const calcNeedleRotation: (chartValue: number, minValue: number, maxValue: number) => number;
|
|
173
|
+
|
|
51
174
|
/**
|
|
52
175
|
* Cartesian Chart component
|
|
53
176
|
* {@docCategory CartesianChart}
|
|
@@ -256,6 +379,11 @@ export declare interface CartesianChartProps {
|
|
|
256
379
|
* @default true
|
|
257
380
|
*/
|
|
258
381
|
useUTC?: string | boolean;
|
|
382
|
+
/**
|
|
383
|
+
* @default false
|
|
384
|
+
* The prop used to decide rounded ticks on y axis
|
|
385
|
+
*/
|
|
386
|
+
roundedTicks?: boolean;
|
|
259
387
|
/**
|
|
260
388
|
* Determines whether overlapping x-axis tick labels should be hidden.
|
|
261
389
|
* @default false
|
|
@@ -521,6 +649,10 @@ export declare interface ChartProps {
|
|
|
521
649
|
* data for the points in the line chart
|
|
522
650
|
*/
|
|
523
651
|
lineChartData?: LineChartPoints[];
|
|
652
|
+
/**
|
|
653
|
+
* data for the points in the line chart
|
|
654
|
+
*/
|
|
655
|
+
SankeyChartData?: SankeyChartData;
|
|
524
656
|
/**
|
|
525
657
|
* data for the points in the line chart
|
|
526
658
|
*/
|
|
@@ -538,7 +670,8 @@ declare enum ChartTypes {
|
|
|
538
670
|
VerticalStackedBarChart = 3,
|
|
539
671
|
GroupedVerticalBarChart = 4,
|
|
540
672
|
HeatMapChart = 5,
|
|
541
|
-
HorizontalBarChartWithAxis = 6
|
|
673
|
+
HorizontalBarChartWithAxis = 6,
|
|
674
|
+
ScatterChart = 7
|
|
542
675
|
}
|
|
543
676
|
|
|
544
677
|
export declare interface ChildProps {
|
|
@@ -817,6 +950,15 @@ export declare interface DonutChartStyles {
|
|
|
817
950
|
chartWrapper?: string;
|
|
818
951
|
}
|
|
819
952
|
|
|
953
|
+
export declare interface DPointType {
|
|
954
|
+
values: {
|
|
955
|
+
0: number;
|
|
956
|
+
1: number;
|
|
957
|
+
data: {};
|
|
958
|
+
};
|
|
959
|
+
xVal: number | Date;
|
|
960
|
+
}
|
|
961
|
+
|
|
820
962
|
declare interface EventAnnotation {
|
|
821
963
|
date: Date;
|
|
822
964
|
event: string;
|
|
@@ -835,192 +977,670 @@ export declare interface EventsAnnotationProps {
|
|
|
835
977
|
mergedLabel: (count: number) => string;
|
|
836
978
|
}
|
|
837
979
|
|
|
838
|
-
export declare
|
|
980
|
+
export declare interface ExtendedSegment extends GaugeChartSegment {
|
|
981
|
+
start: number;
|
|
982
|
+
end: number;
|
|
983
|
+
}
|
|
839
984
|
|
|
840
|
-
export declare const
|
|
985
|
+
export declare const GaugeChart: React_2.FunctionComponent<GaugeChartProps>;
|
|
841
986
|
|
|
842
987
|
/**
|
|
843
|
-
*
|
|
988
|
+
* Gauge Chart properties
|
|
989
|
+
* {@docCategory GaugeChart}
|
|
844
990
|
*/
|
|
845
|
-
export declare interface
|
|
991
|
+
export declare interface GaugeChartProps {
|
|
846
992
|
/**
|
|
847
|
-
*
|
|
993
|
+
* Width of the chart
|
|
848
994
|
*/
|
|
849
|
-
|
|
995
|
+
width?: number;
|
|
850
996
|
/**
|
|
851
|
-
*
|
|
997
|
+
* Height of the chart
|
|
852
998
|
*/
|
|
853
|
-
|
|
999
|
+
height?: number;
|
|
854
1000
|
/**
|
|
855
|
-
*
|
|
1001
|
+
* Title of the chart
|
|
856
1002
|
*/
|
|
857
|
-
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* {@docCategory ChartData}
|
|
862
|
-
*/
|
|
863
|
-
export declare interface GVBarChartSeriesPoint {
|
|
1003
|
+
chartTitle?: string;
|
|
864
1004
|
/**
|
|
865
|
-
*
|
|
1005
|
+
* Current value of the gauge
|
|
866
1006
|
*/
|
|
867
|
-
|
|
1007
|
+
chartValue: number;
|
|
868
1008
|
/**
|
|
869
|
-
*
|
|
1009
|
+
* Sections of the gauge
|
|
870
1010
|
*/
|
|
871
|
-
|
|
1011
|
+
segments: GaugeChartSegment[];
|
|
872
1012
|
/**
|
|
873
|
-
*
|
|
1013
|
+
* Minimum value of the gauge
|
|
1014
|
+
* @defaultvalue 0
|
|
874
1015
|
*/
|
|
875
|
-
|
|
1016
|
+
minValue?: number;
|
|
876
1017
|
/**
|
|
877
|
-
*
|
|
1018
|
+
* Maximum value of the gauge
|
|
878
1019
|
*/
|
|
879
|
-
|
|
1020
|
+
maxValue?: number;
|
|
880
1021
|
/**
|
|
881
|
-
*
|
|
882
|
-
* This is an optional prop, If haven;t given legend will take
|
|
1022
|
+
* Additional text to display below the chart value
|
|
883
1023
|
*/
|
|
884
|
-
|
|
1024
|
+
sublabel?: string;
|
|
885
1025
|
/**
|
|
886
|
-
*
|
|
887
|
-
*
|
|
1026
|
+
* Hide the min and max values of the gauge
|
|
1027
|
+
* @defaultvalue false
|
|
888
1028
|
*/
|
|
889
|
-
|
|
1029
|
+
hideMinMax?: boolean;
|
|
890
1030
|
/**
|
|
891
|
-
*
|
|
1031
|
+
* Format of the chart value
|
|
1032
|
+
* @defaultvalue GaugeValueFormat.Percentage
|
|
892
1033
|
*/
|
|
893
|
-
|
|
1034
|
+
chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string);
|
|
894
1035
|
/**
|
|
895
|
-
*
|
|
1036
|
+
* Decides whether to show/hide legends
|
|
1037
|
+
* @defaultvalue false
|
|
896
1038
|
*/
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
export declare interface GVDataPoint {
|
|
1039
|
+
hideLegend?: boolean;
|
|
1040
|
+
legendProps?: Partial<LegendsProps>;
|
|
901
1041
|
/**
|
|
902
|
-
*
|
|
903
|
-
*
|
|
1042
|
+
* Do not show tooltips in chart
|
|
1043
|
+
* @defaultvalue false
|
|
904
1044
|
*/
|
|
905
|
-
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
export declare interface GVForBarChart {
|
|
1045
|
+
hideTooltip?: boolean;
|
|
909
1046
|
/**
|
|
910
|
-
*
|
|
911
|
-
* These datapoints are used for to draw graph.
|
|
1047
|
+
* Call to provide customized styling that will layer on top of the variant rules
|
|
912
1048
|
*/
|
|
913
|
-
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
export declare interface GVSingleDataPoint {
|
|
1049
|
+
styles?: GaugeChartStyles;
|
|
917
1050
|
/**
|
|
918
|
-
*
|
|
919
|
-
* These datapoints are used for to draw graph easily.
|
|
1051
|
+
* Defines the culture to localize the numbers and dates
|
|
920
1052
|
*/
|
|
921
|
-
|
|
1053
|
+
culture?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Props for the callout in the chart
|
|
1056
|
+
*/
|
|
1057
|
+
calloutProps?: Partial<ChartPopoverProps>;
|
|
1058
|
+
/**
|
|
1059
|
+
* Specifies the variant of GaugeChart to be rendered
|
|
1060
|
+
* @defaultvalue GaugeChartVariant.MultipleSegments
|
|
1061
|
+
*/
|
|
1062
|
+
variant?: GaugeChartVariant;
|
|
1063
|
+
/**
|
|
1064
|
+
* Prop to enable the gradient in the chart
|
|
1065
|
+
* @default false
|
|
1066
|
+
*/
|
|
1067
|
+
enableGradient?: boolean;
|
|
1068
|
+
/**
|
|
1069
|
+
* Prop to enable the round corners in the chart
|
|
1070
|
+
* @default false
|
|
1071
|
+
*/
|
|
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>;
|
|
922
1078
|
}
|
|
923
1079
|
|
|
924
1080
|
/**
|
|
925
|
-
*
|
|
926
|
-
*
|
|
927
|
-
*
|
|
928
|
-
* HorizontalBarChart also provides API interfaces for callbacks that will occur on navigation events.
|
|
1081
|
+
* Gauge Chart segment interface.
|
|
1082
|
+
* {@docCategory GaugeChart}
|
|
929
1083
|
*/
|
|
930
|
-
export declare
|
|
1084
|
+
export declare interface GaugeChartSegment {
|
|
1085
|
+
/**
|
|
1086
|
+
* Legend text for a segment
|
|
1087
|
+
*/
|
|
1088
|
+
legend: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* Size of the segment
|
|
1091
|
+
*/
|
|
1092
|
+
size: number;
|
|
1093
|
+
/**
|
|
1094
|
+
* Color of the segment
|
|
1095
|
+
*/
|
|
1096
|
+
color?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Gradient color of the segment
|
|
1099
|
+
*/
|
|
1100
|
+
gradient?: [string, string];
|
|
1101
|
+
/**
|
|
1102
|
+
* Accessibility data for the segment
|
|
1103
|
+
*/
|
|
1104
|
+
accessibilityData?: AccessibilityProps;
|
|
1105
|
+
}
|
|
931
1106
|
|
|
932
1107
|
/**
|
|
933
|
-
*
|
|
934
|
-
* {@docCategory
|
|
1108
|
+
* Gauge Chart styles
|
|
1109
|
+
* {@docCategory GaugeChart}
|
|
935
1110
|
*/
|
|
936
|
-
export declare interface
|
|
1111
|
+
export declare interface GaugeChartStyles {
|
|
937
1112
|
/**
|
|
938
|
-
*
|
|
1113
|
+
* Styles for the root element
|
|
939
1114
|
*/
|
|
940
|
-
|
|
1115
|
+
root?: string;
|
|
941
1116
|
/**
|
|
942
|
-
*
|
|
1117
|
+
* Styles for the chart
|
|
943
1118
|
*/
|
|
944
|
-
|
|
1119
|
+
chart?: string;
|
|
945
1120
|
/**
|
|
946
|
-
*
|
|
947
|
-
* @default 15
|
|
1121
|
+
* Styles for the min and max values
|
|
948
1122
|
*/
|
|
949
|
-
|
|
1123
|
+
limits?: string;
|
|
950
1124
|
/**
|
|
951
|
-
*
|
|
1125
|
+
* Styles for the chart value
|
|
952
1126
|
*/
|
|
953
|
-
|
|
1127
|
+
chartValue?: string;
|
|
954
1128
|
/**
|
|
955
|
-
*
|
|
1129
|
+
* Styles for the sublabel
|
|
956
1130
|
*/
|
|
957
|
-
|
|
1131
|
+
sublabel?: string;
|
|
958
1132
|
/**
|
|
959
|
-
*
|
|
960
|
-
*
|
|
961
|
-
* @default false
|
|
1133
|
+
* Styles for the needle
|
|
962
1134
|
*/
|
|
963
|
-
|
|
1135
|
+
needle?: string;
|
|
964
1136
|
/**
|
|
965
|
-
*
|
|
966
|
-
* If barChartCustomData props added, then this props will be overrided.
|
|
967
|
-
* @default 'default'
|
|
1137
|
+
* Styles for the chart title
|
|
968
1138
|
*/
|
|
969
|
-
|
|
1139
|
+
chartTitle?: string;
|
|
970
1140
|
/**
|
|
971
|
-
*
|
|
1141
|
+
* Styles for the segments
|
|
972
1142
|
*/
|
|
973
|
-
|
|
1143
|
+
segment?: string;
|
|
974
1144
|
/**
|
|
975
|
-
*
|
|
1145
|
+
* Styles for gradient segments
|
|
976
1146
|
*/
|
|
1147
|
+
gradientSegment?: string;
|
|
977
1148
|
/**
|
|
978
|
-
*
|
|
1149
|
+
* Styles for the legends container
|
|
979
1150
|
*/
|
|
980
|
-
|
|
1151
|
+
legendsContainer?: string;
|
|
981
1152
|
/**
|
|
982
|
-
*
|
|
983
|
-
* IChartProps will be available as props to the method prop.
|
|
984
|
-
* If this method not given, default values (IHorizontalDataPoint \{x,y\})
|
|
985
|
-
* will be used to display the data/text based on given chartModeData prop.
|
|
1153
|
+
* Styles for callout root-content
|
|
986
1154
|
*/
|
|
1155
|
+
calloutContentRoot?: string;
|
|
987
1156
|
/**
|
|
988
|
-
*
|
|
1157
|
+
* Styles for callout x-content
|
|
989
1158
|
*/
|
|
990
|
-
|
|
1159
|
+
calloutContentX?: string;
|
|
991
1160
|
/**
|
|
992
|
-
*
|
|
993
|
-
* @default HorizontalBarChartVariant.PartToWhole
|
|
1161
|
+
* Styles for callout y-content
|
|
994
1162
|
*/
|
|
995
|
-
|
|
1163
|
+
calloutContentY?: string;
|
|
996
1164
|
/**
|
|
997
|
-
*
|
|
998
|
-
* @default false
|
|
1165
|
+
* Styles for description message
|
|
999
1166
|
*/
|
|
1000
|
-
|
|
1167
|
+
descriptionMessage?: string;
|
|
1001
1168
|
/**
|
|
1002
|
-
*
|
|
1169
|
+
* Styles for callout Date time container
|
|
1003
1170
|
*/
|
|
1004
|
-
|
|
1171
|
+
calloutDateTimeContainer?: string;
|
|
1005
1172
|
/**
|
|
1006
|
-
*
|
|
1173
|
+
* Styles for callout info container
|
|
1007
1174
|
*/
|
|
1008
|
-
|
|
1009
|
-
legendsOverflowText?: any;
|
|
1010
|
-
legendProps?: Partial<LegendsProps>;
|
|
1175
|
+
calloutInfoContainer?: string;
|
|
1011
1176
|
/**
|
|
1012
|
-
*
|
|
1177
|
+
* Styles for callout block container
|
|
1013
1178
|
*/
|
|
1014
|
-
|
|
1179
|
+
calloutBlockContainer?: string;
|
|
1015
1180
|
/**
|
|
1016
|
-
*
|
|
1181
|
+
* Styles for callout legend text
|
|
1017
1182
|
*/
|
|
1018
|
-
|
|
1183
|
+
calloutlegendText?: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* Styles for the shape object in the callout
|
|
1186
|
+
*/
|
|
1187
|
+
shapeStyles?: string;
|
|
1019
1188
|
}
|
|
1020
1189
|
|
|
1021
1190
|
/**
|
|
1022
|
-
*
|
|
1023
|
-
|
|
1191
|
+
* {@docCategory GaugeChart}
|
|
1192
|
+
*/
|
|
1193
|
+
export declare type GaugeChartVariant = 'single-segment' | 'multiple-segments';
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* {@docCategory GaugeChart}
|
|
1197
|
+
*/
|
|
1198
|
+
export declare type GaugeValueFormat = 'percentage' | 'fraction';
|
|
1199
|
+
|
|
1200
|
+
export declare const getChartValueLabel: (chartValue: number, minValue: number, maxValue: number, chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string) | undefined, forCallout?: boolean) => string;
|
|
1201
|
+
|
|
1202
|
+
export declare const getColorContrast: (c1: string, c2: string) => number;
|
|
1203
|
+
|
|
1204
|
+
export declare const getColorFromToken: (token: string, isDarkTheme?: boolean) => string;
|
|
1205
|
+
|
|
1206
|
+
export declare const getNextColor: (index: number, offset?: number, isDarkTheme?: boolean) => string;
|
|
1207
|
+
|
|
1208
|
+
export declare const getSegmentLabel: (segment: ExtendedSegment, minValue: number, maxValue: number, variant?: GaugeChartVariant, isAriaLabel?: boolean) => string;
|
|
1209
|
+
|
|
1210
|
+
export declare const GroupedVerticalBarChart: React_2.FC<GroupedVerticalBarChartProps>;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* {@docCategory ChartData}
|
|
1214
|
+
*/
|
|
1215
|
+
export declare interface GroupedVerticalBarChartData {
|
|
1216
|
+
/**
|
|
1217
|
+
* Data for X axis label
|
|
1218
|
+
*/
|
|
1219
|
+
name: string;
|
|
1220
|
+
/**
|
|
1221
|
+
* Data points for Grouped vertical bar chart
|
|
1222
|
+
*/
|
|
1223
|
+
series: GVBarChartSeriesPoint[];
|
|
1224
|
+
/**
|
|
1225
|
+
* Accessibility data for Group Bars Stack Callout
|
|
1226
|
+
*/
|
|
1227
|
+
stackCallOutAccessibilityData?: AccessibilityProps;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Vertical Bar Chart properties
|
|
1232
|
+
* {@docCategory VerticalBarChart}
|
|
1233
|
+
*/
|
|
1234
|
+
export declare interface GroupedVerticalBarChartProps extends CartesianChartProps {
|
|
1235
|
+
/**
|
|
1236
|
+
* Data to render in the chart.
|
|
1237
|
+
*/
|
|
1238
|
+
data?: GroupedVerticalBarChartData[];
|
|
1239
|
+
/**
|
|
1240
|
+
* Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,
|
|
1241
|
+
* which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.
|
|
1242
|
+
* @default 16
|
|
1243
|
+
*/
|
|
1244
|
+
barWidth?: number | 'default' | 'auto';
|
|
1245
|
+
/**
|
|
1246
|
+
* Colors from which to select the color of each bar.
|
|
1247
|
+
*/
|
|
1248
|
+
colors?: string[];
|
|
1249
|
+
/**
|
|
1250
|
+
* chart title for the chart
|
|
1251
|
+
*/
|
|
1252
|
+
chartTitle?: string;
|
|
1253
|
+
/**
|
|
1254
|
+
* This prop makes sure that all the bars are of same color.
|
|
1255
|
+
* it will take the first color from the array of colors in
|
|
1256
|
+
* prop `colors` or if `colors` prop is not given then default color is palette.blueLight
|
|
1257
|
+
* @default false
|
|
1258
|
+
*/
|
|
1259
|
+
useSingleColor?: boolean;
|
|
1260
|
+
/**
|
|
1261
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
1262
|
+
*/
|
|
1263
|
+
styles?: GroupedVerticalBarChartStyles;
|
|
1264
|
+
/**
|
|
1265
|
+
* The prop used to define the culture to localized the numbers
|
|
1266
|
+
*/
|
|
1267
|
+
culture?: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* To display multi stack callout or single callout
|
|
1270
|
+
* @default false
|
|
1271
|
+
*/
|
|
1272
|
+
isCalloutForStack?: boolean;
|
|
1273
|
+
/**
|
|
1274
|
+
* Prop to hide the bar labels
|
|
1275
|
+
* @default false
|
|
1276
|
+
*/
|
|
1277
|
+
hideLabels?: boolean;
|
|
1278
|
+
/**
|
|
1279
|
+
* Maximum width of a bar, in pixels.
|
|
1280
|
+
* @default 24
|
|
1281
|
+
*/
|
|
1282
|
+
maxBarWidth?: number;
|
|
1283
|
+
/**
|
|
1284
|
+
* Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).
|
|
1285
|
+
* Takes a number in the range [0, 1]. Only applicable to string x-axis.
|
|
1286
|
+
* @default 2/3
|
|
1287
|
+
*/
|
|
1288
|
+
xAxisInnerPadding?: number;
|
|
1289
|
+
/**
|
|
1290
|
+
* Padding before the first bar and after the last bar as a fraction of
|
|
1291
|
+
* the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].
|
|
1292
|
+
* Only applicable to string x-axis.
|
|
1293
|
+
*/
|
|
1294
|
+
xAxisOuterPadding?: number;
|
|
1295
|
+
/**
|
|
1296
|
+
* Specifies the mode of the chart.
|
|
1297
|
+
* @default 'default'
|
|
1298
|
+
*/
|
|
1299
|
+
mode?: 'default' | 'plotly';
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* Vertical Bar Chart style properties
|
|
1304
|
+
* {@docCategory VerticalBarChart}
|
|
1305
|
+
*/
|
|
1306
|
+
export declare interface GroupedVerticalBarChartStyleProps extends CartesianChartStyleProps {
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Vertical Bar Chart styles
|
|
1311
|
+
* {@docCategory VerticalBarChart}
|
|
1312
|
+
*/
|
|
1313
|
+
export declare interface GroupedVerticalBarChartStyles extends CartesianChartStyles {
|
|
1314
|
+
/**
|
|
1315
|
+
* Style for the bar labels
|
|
1316
|
+
*/
|
|
1317
|
+
barLabel: string;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* This is used to group nodes by column index.
|
|
1322
|
+
*/
|
|
1323
|
+
export declare function groupNodesByColumn(graph: SankeyChartData): NodesInColumns;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* {@docCategory ChartData}
|
|
1327
|
+
*/
|
|
1328
|
+
export declare interface GVBarChartSeriesPoint {
|
|
1329
|
+
/**
|
|
1330
|
+
* Text for // need to check use of this
|
|
1331
|
+
*/
|
|
1332
|
+
key: string;
|
|
1333
|
+
/**
|
|
1334
|
+
* Data for bar height of Grouped vertical bar chart
|
|
1335
|
+
*/
|
|
1336
|
+
data: number;
|
|
1337
|
+
/**
|
|
1338
|
+
* Color for the legend in the chart
|
|
1339
|
+
*/
|
|
1340
|
+
color: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Legend text in the chart
|
|
1343
|
+
*/
|
|
1344
|
+
legend: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* Callout data for x axis
|
|
1347
|
+
* This is an optional prop, If haven;t given legend will take
|
|
1348
|
+
*/
|
|
1349
|
+
xAxisCalloutData?: string;
|
|
1350
|
+
/**
|
|
1351
|
+
* Callout data for y axis
|
|
1352
|
+
* This is an optional prop, If haven't given data will take
|
|
1353
|
+
*/
|
|
1354
|
+
yAxisCalloutData?: string;
|
|
1355
|
+
/**
|
|
1356
|
+
* onClick action for each datapoint in the chart
|
|
1357
|
+
*/
|
|
1358
|
+
onClick?: VoidFunction;
|
|
1359
|
+
/**
|
|
1360
|
+
* Accessibility data for callout
|
|
1361
|
+
*/
|
|
1362
|
+
callOutAccessibilityData?: AccessibilityProps;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
export declare interface GVDataPoint {
|
|
1366
|
+
/**
|
|
1367
|
+
* This interface used for - While forming datapoints from given prop "data" in code
|
|
1368
|
+
* datapoints are used for to draw graph
|
|
1369
|
+
*/
|
|
1370
|
+
[key: string]: number | string;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
export declare interface GVForBarChart {
|
|
1374
|
+
/**
|
|
1375
|
+
* While forming datapoints from given prop "data"
|
|
1376
|
+
* These datapoints are used for to draw graph.
|
|
1377
|
+
*/
|
|
1378
|
+
[key: string]: GVBarChartSeriesPoint;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
export declare interface GVSingleDataPoint {
|
|
1382
|
+
/**
|
|
1383
|
+
* While forming datapoints from given prop "data" in code.
|
|
1384
|
+
* These datapoints are used for to draw graph easily.
|
|
1385
|
+
*/
|
|
1386
|
+
[key: string]: GVDataPoint;
|
|
1387
|
+
}
|
|
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
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* HorizontalBarChart is the context wrapper and container for all HorizontalBarChart content/controls,
|
|
1546
|
+
* It has no direct style or slot opinions.
|
|
1547
|
+
*
|
|
1548
|
+
* HorizontalBarChart also provides API interfaces for callbacks that will occur on navigation events.
|
|
1549
|
+
*/
|
|
1550
|
+
export declare const HorizontalBarChart: React_2.FunctionComponent<HorizontalBarChartProps>;
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* Horizontal Bar Chart properties
|
|
1554
|
+
* {@docCategory HorizontalBarChart}
|
|
1555
|
+
*/
|
|
1556
|
+
export declare interface HorizontalBarChartProps extends React_2.RefAttributes<HTMLDivElement> {
|
|
1557
|
+
/**
|
|
1558
|
+
* An array of chart data points for the Horizontal bar chart
|
|
1559
|
+
*/
|
|
1560
|
+
data?: ChartProps[];
|
|
1561
|
+
/**
|
|
1562
|
+
* Width of bar chart
|
|
1563
|
+
*/
|
|
1564
|
+
width?: number;
|
|
1565
|
+
/**
|
|
1566
|
+
* Height of bar chart
|
|
1567
|
+
* @default 15
|
|
1568
|
+
*/
|
|
1569
|
+
barHeight?: number;
|
|
1570
|
+
/**
|
|
1571
|
+
* Additional CSS class(es) to apply to the StackedBarChart.
|
|
1572
|
+
*/
|
|
1573
|
+
className?: string;
|
|
1574
|
+
/**
|
|
1575
|
+
* This property tells whether to show ratio on top of stacked bar chart or not.
|
|
1576
|
+
*/
|
|
1577
|
+
hideRatio?: boolean[];
|
|
1578
|
+
/**
|
|
1579
|
+
* Do not show tooltips in chart
|
|
1580
|
+
*
|
|
1581
|
+
* @default false
|
|
1582
|
+
*/
|
|
1583
|
+
hideTooltip?: boolean;
|
|
1584
|
+
/**
|
|
1585
|
+
* This property tells how to show data text on top right of bar chart.
|
|
1586
|
+
* If barChartCustomData props added, then this props will be overrided.
|
|
1587
|
+
* @default 'default'
|
|
1588
|
+
*/
|
|
1589
|
+
chartDataMode?: ChartDataMode;
|
|
1590
|
+
/**
|
|
1591
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
1592
|
+
*/
|
|
1593
|
+
styles?: HorizontalBarChartStyles;
|
|
1594
|
+
/**
|
|
1595
|
+
* Define a custom callout renderer for a horizontal bar
|
|
1596
|
+
*/
|
|
1597
|
+
/**
|
|
1598
|
+
* props for the callout in the chart
|
|
1599
|
+
*/
|
|
1600
|
+
calloutProps?: ChartPopoverProps;
|
|
1601
|
+
/**
|
|
1602
|
+
* Custom text to the chart (right side of the chart)
|
|
1603
|
+
* IChartProps will be available as props to the method prop.
|
|
1604
|
+
* If this method not given, default values (IHorizontalDataPoint \{x,y\})
|
|
1605
|
+
* will be used to display the data/text based on given chartModeData prop.
|
|
1606
|
+
*/
|
|
1607
|
+
/**
|
|
1608
|
+
* The prop used to define the culture to localized the numbers
|
|
1609
|
+
*/
|
|
1610
|
+
culture?: string;
|
|
1611
|
+
/**
|
|
1612
|
+
* Prop to define the variant of HorizontalBarChart to render
|
|
1613
|
+
* @default HorizontalBarChartVariant.PartToWhole
|
|
1614
|
+
*/
|
|
1615
|
+
variant?: HorizontalBarChartVariant;
|
|
1616
|
+
/**
|
|
1617
|
+
* Prop to hide the bar labels
|
|
1618
|
+
* @default false
|
|
1619
|
+
*/
|
|
1620
|
+
hideLabels?: boolean;
|
|
1621
|
+
/**
|
|
1622
|
+
* line color for callout
|
|
1623
|
+
*/
|
|
1624
|
+
color?: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* prop to check if benchmark data is provided
|
|
1627
|
+
*/
|
|
1628
|
+
showTriangle?: boolean;
|
|
1629
|
+
legendsOverflowText?: any;
|
|
1630
|
+
legendProps?: Partial<LegendsProps>;
|
|
1631
|
+
/**
|
|
1632
|
+
* prop to render the custom callout
|
|
1633
|
+
*/
|
|
1634
|
+
onRenderCalloutPerHorizontalBar?: (props: ChartDataPoint) => JSX.Element | undefined;
|
|
1635
|
+
/**
|
|
1636
|
+
* Define a custom callout props override
|
|
1637
|
+
*/
|
|
1638
|
+
calloutPropsPerDataPoint?: (dataPointCalloutProps: ChartDataPoint) => ChartPopoverProps;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* Horizontal Bar Chart styles
|
|
1643
|
+
* {@docCategory HorizontalBarChart}
|
|
1024
1644
|
*/
|
|
1025
1645
|
export declare interface HorizontalBarChartStyles {
|
|
1026
1646
|
/**
|
|
@@ -1085,6 +1705,8 @@ export declare enum HorizontalBarChartVariant {
|
|
|
1085
1705
|
AbsoluteScale = "absolute-scale"
|
|
1086
1706
|
}
|
|
1087
1707
|
|
|
1708
|
+
export declare const HorizontalBarChartWithAxis: React_2.FunctionComponent<HorizontalBarChartWithAxisProps>;
|
|
1709
|
+
|
|
1088
1710
|
/**
|
|
1089
1711
|
* {@docCategory ChartData}
|
|
1090
1712
|
*/
|
|
@@ -1127,6 +1749,128 @@ export declare interface HorizontalBarChartWithAxisDataPoint {
|
|
|
1127
1749
|
callOutAccessibilityData?: AccessibilityProps;
|
|
1128
1750
|
}
|
|
1129
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
|
+
|
|
1130
1874
|
/**
|
|
1131
1875
|
* {@docCategory ChartData}
|
|
1132
1876
|
*/
|
|
@@ -1276,20 +2020,55 @@ export declare interface LegendsProps {
|
|
|
1276
2020
|
*/
|
|
1277
2021
|
canSelectMultipleLegends?: boolean;
|
|
1278
2022
|
/**
|
|
1279
|
-
* Callback issued when the selected option changes.
|
|
2023
|
+
* Callback issued when the selected option changes.
|
|
2024
|
+
*/
|
|
2025
|
+
onChange?: (selectedLegends: string[], event: React_2.MouseEvent<HTMLButtonElement>, currentLegend?: Legend) => void;
|
|
2026
|
+
/**
|
|
2027
|
+
* Keys (title) that will be initially used to set selected items. This prop is used for multi-select scenarios when
|
|
2028
|
+
* canSelectMultipleLegends is true; for single-select, use defaultSelectedLegend.
|
|
2029
|
+
*
|
|
2030
|
+
* Updating this prop does not change the selection after the component has been initialized. For controlled
|
|
2031
|
+
* selections, use selectedLegends instead.
|
|
2032
|
+
*
|
|
2033
|
+
* @see selectedLegends for setting the selected legends in controlled mode.
|
|
2034
|
+
* @see defaultSelectedLegend for setting the initially selected legend when canSelectMultipleLegends is false.
|
|
2035
|
+
*/
|
|
2036
|
+
defaultSelectedLegends?: string[];
|
|
2037
|
+
/**
|
|
2038
|
+
* Key that will be initially used to set selected item. This prop is used for single-select scenarios when
|
|
2039
|
+
* canSelectMultipleLegends is false or unspecified; for multi-select, use defaultSelectedLegends.
|
|
2040
|
+
*
|
|
2041
|
+
* Updating this prop does not change the selection after the component has been initialized. For controlled
|
|
2042
|
+
* selections, use selectedLegend instead.
|
|
2043
|
+
*
|
|
2044
|
+
* @see selectedLegend for setting the selected legend in controlled mode.
|
|
2045
|
+
* @see defaultSelectedLegends for setting the initially selected legends when canSelectMultipleLegends is true.
|
|
1280
2046
|
*/
|
|
1281
|
-
|
|
2047
|
+
defaultSelectedLegend?: string;
|
|
1282
2048
|
/**
|
|
1283
|
-
* Keys (title) that will be
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
2049
|
+
* Keys (title) that will be used to set selected items in multi-select scenarios when canSelectMultipleLegends is
|
|
2050
|
+
* true. For single-select, use selectedLegend.
|
|
2051
|
+
*
|
|
2052
|
+
* When this prop is provided, the component is controlled and does not automatically update the selection based on
|
|
2053
|
+
* user interactions; the parent component must update the value passed to this property by handling the onChange
|
|
2054
|
+
* event.
|
|
2055
|
+
*
|
|
2056
|
+
* @see defaultSelectedLegends for setting the initially-selected legends in uncontrolled mode.
|
|
2057
|
+
* @see selectedLegends for setting the selected legends when `canSelectMultipleLegends` is `true`.
|
|
1286
2058
|
*/
|
|
1287
|
-
|
|
2059
|
+
selectedLegends?: string[];
|
|
1288
2060
|
/**
|
|
1289
|
-
* Key that will be
|
|
1290
|
-
*
|
|
2061
|
+
* Key (title) that will be used to set the selected item in single-select scenarios when canSelectMultipleLegends is
|
|
2062
|
+
* false or unspecified. For multi-select, use selectedLegends.
|
|
2063
|
+
*
|
|
2064
|
+
* When this prop is provided, the component is controlled and does not automatically update the selection based on
|
|
2065
|
+
* user interactions; the parent component must update the value passed to this property by handling the onChange
|
|
2066
|
+
* event.
|
|
2067
|
+
*
|
|
2068
|
+
* @see defaultSelectedLegend for setting the initially-selected legend in uncontrolled mode.
|
|
2069
|
+
* @see selectedLegend for setting the selected legend when `canSelectMultipleLegends` is `false`.
|
|
1291
2070
|
*/
|
|
1292
|
-
|
|
2071
|
+
selectedLegend?: string;
|
|
1293
2072
|
/**
|
|
1294
2073
|
* The shape for the legend.
|
|
1295
2074
|
*/
|
|
@@ -1366,43 +2145,15 @@ export declare const LineChart: React_2.FunctionComponent<LineChartProps>;
|
|
|
1366
2145
|
/**
|
|
1367
2146
|
* {@docCategory ChartData}
|
|
1368
2147
|
*/
|
|
1369
|
-
export declare interface LineChartDataPoint {
|
|
2148
|
+
export declare interface LineChartDataPoint extends BaseDataPoint {
|
|
1370
2149
|
/**
|
|
1371
2150
|
* Independent value of the data point, rendered along the x-axis.
|
|
1372
|
-
* If x is a number, then each y-coordinate is plotted at its x-coordinate.
|
|
1373
|
-
* If data type on x is Date, then the data is spaced evenly by d3-scale
|
|
1374
2151
|
*/
|
|
1375
2152
|
x: number | Date;
|
|
1376
2153
|
/**
|
|
1377
2154
|
* Dependent value of the data point, rendered along the y-axis.
|
|
1378
2155
|
*/
|
|
1379
2156
|
y: number;
|
|
1380
|
-
/**
|
|
1381
|
-
* Defines the function that is executed on clicking line
|
|
1382
|
-
*/
|
|
1383
|
-
onDataPointClick?: () => void;
|
|
1384
|
-
/**
|
|
1385
|
-
* Callout data for x axis
|
|
1386
|
-
*/
|
|
1387
|
-
xAxisCalloutData?: string;
|
|
1388
|
-
/**
|
|
1389
|
-
* Callout data for y axis
|
|
1390
|
-
*/
|
|
1391
|
-
yAxisCalloutData?: string | {
|
|
1392
|
-
[id: string]: number;
|
|
1393
|
-
};
|
|
1394
|
-
/**
|
|
1395
|
-
* Whether to hide callout data for the point.
|
|
1396
|
-
*/
|
|
1397
|
-
hideCallout?: boolean;
|
|
1398
|
-
/**
|
|
1399
|
-
* Accessibility data for callout
|
|
1400
|
-
*/
|
|
1401
|
-
callOutAccessibilityData?: AccessibilityProps;
|
|
1402
|
-
/**
|
|
1403
|
-
* X axis Accessibility data for callout
|
|
1404
|
-
*/
|
|
1405
|
-
xAxisCalloutAccessibilityData?: AccessibilityProps;
|
|
1406
2157
|
}
|
|
1407
2158
|
|
|
1408
2159
|
/**
|
|
@@ -1453,6 +2204,11 @@ export declare interface LineChartLineOptions extends SVGProps<SVGPathElement> {
|
|
|
1453
2204
|
* Color of border around the line. Default white.
|
|
1454
2205
|
*/
|
|
1455
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;
|
|
1456
2212
|
}
|
|
1457
2213
|
|
|
1458
2214
|
/**
|
|
@@ -1471,7 +2227,7 @@ export declare interface LineChartPoints {
|
|
|
1471
2227
|
/**
|
|
1472
2228
|
* dataPoints for the line chart
|
|
1473
2229
|
*/
|
|
1474
|
-
data: LineChartDataPoint[];
|
|
2230
|
+
data: LineChartDataPoint[] | ScatterChartDataPoint[];
|
|
1475
2231
|
/**
|
|
1476
2232
|
* gaps in the line chart where a line is not drawn
|
|
1477
2233
|
*/
|
|
@@ -1604,6 +2360,15 @@ export declare interface LineDataInVerticalStackedBarChart {
|
|
|
1604
2360
|
* False by default.
|
|
1605
2361
|
*/
|
|
1606
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[];
|
|
1607
2372
|
}
|
|
1608
2373
|
|
|
1609
2374
|
/**
|
|
@@ -1668,126 +2433,358 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
|
|
|
1668
2433
|
* It also contians an optional param xAxisElement - defines as x axis scale element.
|
|
1669
2434
|
* This param used to enable feature word wrap of Xaxis.
|
|
1670
2435
|
*/
|
|
1671
|
-
getGraphData?: any;
|
|
2436
|
+
getGraphData?: any;
|
|
2437
|
+
/**
|
|
2438
|
+
* Used for bar chart graphs.
|
|
2439
|
+
* To define width of the bar
|
|
2440
|
+
*/
|
|
2441
|
+
barwidth?: number;
|
|
2442
|
+
/**
|
|
2443
|
+
* Used for tick styles of the x axis of the chart
|
|
2444
|
+
* Tick params are applicable for date axis only.
|
|
2445
|
+
*/
|
|
2446
|
+
tickParams?: {
|
|
2447
|
+
tickValues?: number[] | Date[] | string[];
|
|
2448
|
+
tickFormat?: string;
|
|
2449
|
+
};
|
|
2450
|
+
/**
|
|
2451
|
+
* it's padding between bar's or lines in the graph
|
|
2452
|
+
*/
|
|
2453
|
+
xAxisPadding?: number;
|
|
2454
|
+
/**
|
|
2455
|
+
* it's padding between bar's or lines in the graph
|
|
2456
|
+
*/
|
|
2457
|
+
yAxisPadding?: number;
|
|
2458
|
+
/**
|
|
2459
|
+
* Children elements specific to derived chart types.
|
|
2460
|
+
*/
|
|
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;
|
|
2468
|
+
/** dataset values to find out domain of the String axis
|
|
2469
|
+
* Present using for only vertical stacked bar chart and grouped vertical bar chart
|
|
2470
|
+
*/
|
|
2471
|
+
datasetForXAxisDomain?: string[];
|
|
2472
|
+
/** Own callout design */
|
|
2473
|
+
customizedCallout?: any;
|
|
2474
|
+
/**
|
|
2475
|
+
* if the data points for the y-axis is of type string, then we need to give this
|
|
2476
|
+
* prop to construct the y-axis
|
|
2477
|
+
*/
|
|
2478
|
+
stringDatasetForYAxisDomain?: string[];
|
|
2479
|
+
/**
|
|
2480
|
+
* The prop used to define the culture to localize the numbers and date
|
|
2481
|
+
*/
|
|
2482
|
+
culture?: string;
|
|
2483
|
+
getAxisData?: any;
|
|
2484
|
+
/**
|
|
2485
|
+
* Callback method used when mouse leaves the chart boundary.
|
|
2486
|
+
*/
|
|
2487
|
+
onChartMouseLeave?: () => void;
|
|
2488
|
+
/** Callback method to get extra margins for domain */
|
|
2489
|
+
getDomainMargins?: (containerWidth: number) => Margins;
|
|
2490
|
+
/** Padding between each bar/line-point */
|
|
2491
|
+
xAxisInnerPadding?: number;
|
|
2492
|
+
/** Padding before first bar/line-point and after last bar/line-point */
|
|
2493
|
+
xAxisOuterPadding?: number;
|
|
2494
|
+
/**
|
|
2495
|
+
*@default false
|
|
2496
|
+
*Used for to elipse y axis labes and show tooltip on x axis labels
|
|
2497
|
+
*/
|
|
2498
|
+
showYAxisLablesTooltip?: boolean;
|
|
2499
|
+
/**
|
|
2500
|
+
*@default false
|
|
2501
|
+
*Used for showing complete y axis lables */
|
|
2502
|
+
showYAxisLables?: boolean;
|
|
2503
|
+
/**
|
|
2504
|
+
* @default false
|
|
2505
|
+
* Used to control the first render cycle Performance optimization code.
|
|
2506
|
+
*/
|
|
2507
|
+
enableFirstRenderOptimization?: boolean;
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
declare type NodesInColumns = {
|
|
2511
|
+
[key: number]: SNode[];
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* we need to make sure that if we add any property to this, then
|
|
2516
|
+
* we need to also add that in pointTypes below and vise-versa
|
|
2517
|
+
*/
|
|
2518
|
+
declare enum Points {
|
|
2519
|
+
circle = 0,
|
|
2520
|
+
square = 1,
|
|
2521
|
+
triangle = 2,
|
|
2522
|
+
diamond = 3,
|
|
2523
|
+
pyramid = 4,
|
|
2524
|
+
hexagon = 5,
|
|
2525
|
+
pentagon = 6,
|
|
2526
|
+
octagon = 7
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
export declare interface PopoverComponentStyles {
|
|
2530
|
+
calloutContentRoot: string;
|
|
2531
|
+
calloutDateTimeContainer: string;
|
|
2532
|
+
calloutContentX: string;
|
|
2533
|
+
calloutBlockContainer: string;
|
|
2534
|
+
calloutBlockContainertoDrawShapefalse: string;
|
|
2535
|
+
calloutBlockContainertoDrawShapetrue: string;
|
|
2536
|
+
shapeStyles: string;
|
|
2537
|
+
calloutlegendText: string;
|
|
2538
|
+
calloutContentY: string;
|
|
2539
|
+
descriptionMessage: string;
|
|
2540
|
+
ratio: string;
|
|
2541
|
+
numerator: string;
|
|
2542
|
+
denominator: string;
|
|
2543
|
+
calloutInfoContainer: string;
|
|
2544
|
+
calloutContainer: string;
|
|
2545
|
+
}
|
|
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
|
+
|
|
2553
|
+
export declare interface RefArrayData {
|
|
2554
|
+
index?: string;
|
|
2555
|
+
refElement?: SVGGElement;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* Render function interface for providing overrideable render callbacks.
|
|
2560
|
+
*
|
|
2561
|
+
* @public
|
|
2562
|
+
*/
|
|
2563
|
+
declare interface RenderFunction<P> {
|
|
2564
|
+
(props?: P, defaultRender?: (props?: P) => JSX.Element | null): JSX.Element | null;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
export declare const ResponsiveContainer: React_2.FC<ResponsiveContainerProps>;
|
|
2568
|
+
|
|
2569
|
+
declare interface ResponsiveContainerProps {
|
|
2570
|
+
children: React_2.ReactElement;
|
|
2571
|
+
onResize?: (width: number, height: number) => void;
|
|
2572
|
+
width?: number | string;
|
|
2573
|
+
height?: number | string;
|
|
2574
|
+
}
|
|
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;
|
|
1672
2704
|
/**
|
|
1673
|
-
*
|
|
1674
|
-
* To define width of the bar
|
|
2705
|
+
* Style for the links.
|
|
1675
2706
|
*/
|
|
1676
|
-
|
|
2707
|
+
links?: string;
|
|
1677
2708
|
/**
|
|
1678
|
-
*
|
|
1679
|
-
* Tick params are applicable for date axis only.
|
|
2709
|
+
* Style for the text inside node.
|
|
1680
2710
|
*/
|
|
1681
|
-
|
|
1682
|
-
tickValues?: number[] | Date[] | string[];
|
|
1683
|
-
tickFormat?: string;
|
|
1684
|
-
};
|
|
2711
|
+
nodeTextContainer?: string;
|
|
1685
2712
|
/**
|
|
1686
|
-
*
|
|
2713
|
+
* Style for the tooltip ,when user hover over the truncated node detail.
|
|
1687
2714
|
*/
|
|
1688
|
-
|
|
2715
|
+
toolTip?: string;
|
|
1689
2716
|
/**
|
|
1690
|
-
*
|
|
2717
|
+
* Styles for the chart wrapper div
|
|
1691
2718
|
*/
|
|
1692
|
-
|
|
2719
|
+
chartWrapper?: string;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
declare type SankeyLayoutGenerator = SankeyLayout<SankeyGraph<{}, {}>, {}, {}>;
|
|
2723
|
+
|
|
2724
|
+
/**
|
|
2725
|
+
* ScatterChart component
|
|
2726
|
+
* {@docCategory ScatterChart}
|
|
2727
|
+
*/
|
|
2728
|
+
export declare const ScatterChart: React_2.FunctionComponent<ScatterChartProps>;
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* {@docCategory ChartData}
|
|
2732
|
+
* ScatterChartDataPoint interface.
|
|
2733
|
+
*/
|
|
2734
|
+
export declare interface ScatterChartDataPoint extends BaseDataPoint {
|
|
1693
2735
|
/**
|
|
1694
|
-
*
|
|
2736
|
+
* Independent value of the data point, rendered along the x-axis.
|
|
1695
2737
|
*/
|
|
1696
|
-
|
|
1697
|
-
/**
|
|
1698
|
-
*
|
|
2738
|
+
x: number | Date | string;
|
|
2739
|
+
/**
|
|
2740
|
+
* Dependent value of the data point, rendered along the y-axis.
|
|
1699
2741
|
*/
|
|
1700
|
-
|
|
2742
|
+
y: number;
|
|
1701
2743
|
/**
|
|
1702
|
-
*
|
|
1703
|
-
* prop to construct the y-axis
|
|
2744
|
+
* Marker size of the points
|
|
1704
2745
|
*/
|
|
1705
|
-
|
|
2746
|
+
markerSize?: number;
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
/**
|
|
2750
|
+
* Line Chart properties
|
|
2751
|
+
* {@docCategory LineChart}
|
|
2752
|
+
*/
|
|
2753
|
+
export declare interface ScatterChartProps extends CartesianChartProps {
|
|
1706
2754
|
/**
|
|
1707
|
-
*
|
|
2755
|
+
* Data to render in the chart.
|
|
1708
2756
|
*/
|
|
1709
|
-
|
|
1710
|
-
getAxisData?: any;
|
|
2757
|
+
data: ChartProps;
|
|
1711
2758
|
/**
|
|
1712
|
-
*
|
|
2759
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
1713
2760
|
*/
|
|
1714
|
-
|
|
1715
|
-
/** Callback method to get extra margins for domain */
|
|
1716
|
-
getDomainMargins?: (containerWidth: number) => Margins;
|
|
1717
|
-
/** Padding between each bar/line-point */
|
|
1718
|
-
xAxisInnerPadding?: number;
|
|
1719
|
-
/** Padding before first bar/line-point and after last bar/line-point */
|
|
1720
|
-
xAxisOuterPadding?: number;
|
|
2761
|
+
styles?: ScatterChartStyles;
|
|
1721
2762
|
/**
|
|
1722
|
-
|
|
1723
|
-
*Used for to elipse y axis labes and show tooltip on x axis labels
|
|
2763
|
+
* Define a custom callout renderer for a data point
|
|
1724
2764
|
*/
|
|
1725
|
-
|
|
2765
|
+
onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;
|
|
1726
2766
|
/**
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
2767
|
+
* Callback for getting callout description message
|
|
2768
|
+
*/
|
|
2769
|
+
getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;
|
|
1730
2770
|
/**
|
|
1731
|
-
*
|
|
1732
|
-
* Used to control the first render cycle Performance optimization code.
|
|
2771
|
+
* The prop used to define the culture to localized the numbers
|
|
1733
2772
|
*/
|
|
1734
|
-
|
|
2773
|
+
culture?: string;
|
|
1735
2774
|
}
|
|
1736
2775
|
|
|
1737
2776
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
*
|
|
2777
|
+
* Scatter Chart style properties
|
|
2778
|
+
* {@docCategory ScatterChart}
|
|
1740
2779
|
*/
|
|
1741
|
-
declare
|
|
1742
|
-
circle = 0,
|
|
1743
|
-
square = 1,
|
|
1744
|
-
triangle = 2,
|
|
1745
|
-
diamond = 3,
|
|
1746
|
-
pyramid = 4,
|
|
1747
|
-
hexagon = 5,
|
|
1748
|
-
pentagon = 6,
|
|
1749
|
-
octagon = 7
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
export declare interface PopoverComponentStyles {
|
|
1753
|
-
calloutContentRoot: string;
|
|
1754
|
-
calloutDateTimeContainer: string;
|
|
1755
|
-
calloutContentX: string;
|
|
1756
|
-
calloutBlockContainer: string;
|
|
1757
|
-
calloutBlockContainertoDrawShapefalse: string;
|
|
1758
|
-
calloutBlockContainertoDrawShapetrue: string;
|
|
1759
|
-
shapeStyles: string;
|
|
1760
|
-
calloutlegendText: string;
|
|
1761
|
-
calloutContentY: string;
|
|
1762
|
-
descriptionMessage: string;
|
|
1763
|
-
ratio: string;
|
|
1764
|
-
numerator: string;
|
|
1765
|
-
denominator: string;
|
|
1766
|
-
calloutInfoContainer: string;
|
|
1767
|
-
calloutContainer: string;
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
export declare interface RefArrayData {
|
|
1771
|
-
index?: string;
|
|
1772
|
-
refElement?: SVGGElement;
|
|
2780
|
+
export declare interface ScatterChartStyleProps extends CartesianChartStyleProps {
|
|
1773
2781
|
}
|
|
1774
2782
|
|
|
1775
2783
|
/**
|
|
1776
|
-
*
|
|
1777
|
-
*
|
|
1778
|
-
* @public
|
|
2784
|
+
* Scatter Chart styles
|
|
2785
|
+
* {@docCategory ScatterChart}
|
|
1779
2786
|
*/
|
|
1780
|
-
declare interface
|
|
1781
|
-
(props?: P, defaultRender?: (props?: P) => JSX.Element | null): JSX.Element | null;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
export declare const ResponsiveContainer: React_2.FC<ResponsiveContainerProps>;
|
|
1785
|
-
|
|
1786
|
-
declare interface ResponsiveContainerProps {
|
|
1787
|
-
children: React_2.ReactElement;
|
|
1788
|
-
onResize?: (width: number, height: number) => void;
|
|
1789
|
-
width?: number | string;
|
|
1790
|
-
height?: number | string;
|
|
2787
|
+
export declare interface ScatterChartStyles extends CartesianChartStyles {
|
|
1791
2788
|
}
|
|
1792
2789
|
|
|
1793
2790
|
/**
|
|
@@ -1811,6 +2808,41 @@ export declare interface ShapeProps {
|
|
|
1811
2808
|
style?: React_2.CSSProperties | undefined;
|
|
1812
2809
|
}
|
|
1813
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
|
+
|
|
1814
2846
|
/**
|
|
1815
2847
|
* Sparkline is the context wrapper and container for all Sparkline content/controls,
|
|
1816
2848
|
* It has no direct style or slot opinions.
|
|
@@ -2019,6 +3051,21 @@ export declare interface VerticalBarChartProps extends CartesianChartProps {
|
|
|
2019
3051
|
* Only applicable to string x-axis.
|
|
2020
3052
|
*/
|
|
2021
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';
|
|
2022
3069
|
}
|
|
2023
3070
|
|
|
2024
3071
|
/**
|
|
@@ -2043,6 +3090,149 @@ export declare interface VerticalBarChartStyles extends CartesianChartStyles {
|
|
|
2043
3090
|
barLabel: string;
|
|
2044
3091
|
}
|
|
2045
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
|
+
|
|
2046
3236
|
/**
|
|
2047
3237
|
* {@docCategory ChartData}
|
|
2048
3238
|
*/
|
|
@@ -2113,6 +3303,10 @@ export declare interface VSChartDataPoint {
|
|
|
2113
3303
|
* Accessibility data for callout
|
|
2114
3304
|
*/
|
|
2115
3305
|
callOutAccessibilityData?: AccessibilityProps;
|
|
3306
|
+
/**
|
|
3307
|
+
* The prop used to define the culture to localized the numbers
|
|
3308
|
+
*/
|
|
3309
|
+
culture?: string;
|
|
2116
3310
|
}
|
|
2117
3311
|
|
|
2118
3312
|
declare enum XAxisTypes {
|