@carbon/charts 0.32.8 → 0.32.12
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 +35 -0
- package/build/demo/data/area.d.ts +17 -0
- package/build/demo/data/bar.d.ts +51 -0
- package/build/demo/data/gauge.d.ts +40 -0
- package/build/demo/data/index.d.ts +6 -0
- package/build/demo/data/line.d.ts +26 -0
- package/build/demo/data/scatter.d.ts +18 -0
- package/build/src/charts/gauge.d.ts +6 -0
- package/build/src/charts/index.d.ts +1 -0
- package/build/src/components/essentials/tooltip-bar.d.ts +2 -2
- package/build/src/components/essentials/tooltip-radar.d.ts +2 -1
- package/build/src/components/essentials/tooltip.d.ts +2 -2
- package/build/src/components/graphs/gauge.d.ts +26 -0
- package/build/src/components/index.d.ts +1 -0
- package/build/src/configuration.d.ts +2 -1
- package/build/src/interfaces/axis-scales.d.ts +2 -0
- package/build/src/interfaces/charts.d.ts +20 -0
- package/build/src/interfaces/components.d.ts +2 -0
- package/build/src/interfaces/enums.d.ts +31 -1
- package/build/src/interfaces/events.d.ts +9 -0
- package/build/src/interfaces/truncation.d.ts +17 -0
- package/build/src/tools.d.ts +9 -0
- package/bundle.js +1 -1
- package/chart.js +21 -22
- package/chart.js.map +1 -1
- package/charts/gauge.d.ts +6 -0
- package/charts/gauge.js +41 -0
- package/charts/gauge.js.map +1 -0
- package/charts/index.d.ts +1 -0
- package/charts/index.js +1 -0
- package/charts/index.js.map +1 -1
- package/components/axes/axis.js +61 -1
- package/components/axes/axis.js.map +1 -1
- package/components/essentials/legend.js +39 -6
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/tooltip-bar.d.ts +2 -2
- package/components/essentials/tooltip-bar.js +20 -7
- package/components/essentials/tooltip-bar.js.map +1 -1
- package/components/essentials/tooltip-pie.js +3 -0
- package/components/essentials/tooltip-pie.js.map +1 -1
- package/components/essentials/tooltip-radar.d.ts +2 -1
- package/components/essentials/tooltip-radar.js +1 -1
- package/components/essentials/tooltip-radar.js.map +1 -1
- package/components/essentials/tooltip-scatter.js +6 -0
- package/components/essentials/tooltip-scatter.js.map +1 -1
- package/components/essentials/tooltip.d.ts +2 -2
- package/components/essentials/tooltip.js +11 -6
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/area-stacked.js +7 -4
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/gauge.d.ts +26 -0
- package/components/graphs/gauge.js +301 -0
- package/components/graphs/gauge.js.map +1 -0
- package/components/graphs/line.js +13 -7
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/scatter-stacked.js +1 -1
- package/components/graphs/scatter-stacked.js.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/configuration.d.ts +2 -1
- package/configuration.js +100 -65
- package/configuration.js.map +1 -1
- package/demo/data/area.d.ts +17 -0
- package/demo/data/area.js +45 -19
- package/demo/data/area.js.map +1 -1
- package/demo/data/bar.d.ts +51 -0
- package/demo/data/bar.js +52 -0
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/donut.js +10 -10
- package/demo/data/donut.js.map +1 -1
- package/demo/data/gauge.d.ts +40 -0
- package/demo/data/gauge.js +41 -0
- package/demo/data/gauge.js.map +1 -0
- package/demo/data/index.d.ts +6 -0
- package/demo/data/index.js +163 -120
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +26 -0
- package/demo/data/line.js +37 -0
- package/demo/data/line.js.map +1 -1
- package/demo/data/scatter.d.ts +18 -0
- package/demo/data/scatter.js +35 -0
- package/demo/data/scatter.js.map +1 -1
- package/demo/styles.css +80 -0
- package/demo/styles.css.map +1 -1
- package/demo/styles.min.css +1 -1
- package/demo/styles.min.css.map +1 -1
- package/demo/tsconfig.tsbuildinfo +62 -23
- package/interfaces/axis-scales.d.ts +2 -0
- package/interfaces/axis-scales.js.map +1 -1
- package/interfaces/charts.d.ts +20 -0
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +2 -0
- package/interfaces/components.js.map +1 -1
- package/interfaces/enums.d.ts +31 -1
- package/interfaces/enums.js +34 -0
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.d.ts +9 -0
- package/interfaces/events.js +10 -0
- package/interfaces/events.js.map +1 -1
- package/interfaces/truncation.d.ts +17 -0
- package/interfaces/truncation.js +1 -0
- package/interfaces/truncation.js.map +1 -0
- package/model.js +15 -0
- package/model.js.map +1 -1
- package/package.json +1 -1
- package/styles/components/_tooltip.scss +2 -0
- package/styles/graphs/_gauge.scss +19 -0
- package/styles/graphs/index.scss +1 -0
- package/styles-g10.css +21 -0
- package/styles-g10.css.map +1 -1
- package/styles-g10.min.css +1 -1
- package/styles-g10.min.css.map +1 -1
- package/styles-g100.css +21 -0
- package/styles-g100.css.map +1 -1
- package/styles-g100.min.css +1 -1
- package/styles-g100.min.css.map +1 -1
- package/styles-g90.css +21 -0
- package/styles-g90.css.map +1 -1
- package/styles-g90.min.css +1 -1
- package/styles-g90.min.css.map +1 -1
- package/styles.css +21 -0
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tools.d.ts +9 -0
- package/tools.js +24 -1
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +106 -40
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.32.12](https://github.com/carbon-design-system/carbon-charts/compare/v0.32.11...v0.32.12) (2020-06-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.32.11](https://github.com/carbon-design-system/carbon-charts/compare/v0.32.10...v0.32.11) (2020-06-24)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.32.10](https://github.com/carbon-design-system/carbon-charts/compare/v0.32.9...v0.32.10) (2020-06-24)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **core:** fix gauge charts without a delta number ([#680](https://github.com/carbon-design-system/carbon-charts/issues/680)) ([f65a084](https://github.com/carbon-design-system/carbon-charts/commit/f65a084bb66f1e8241fdbd6b101daf98d059d548))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.32.9](https://github.com/carbon-design-system/carbon-charts/compare/v0.32.8...v0.32.9) (2020-06-23)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @carbon/charts
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [0.32.8](https://github.com/carbon-design-system/carbon-charts/compare/v0.32.7...v0.32.8) (2020-06-19)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @carbon/charts
|
|
@@ -55,6 +55,23 @@ export declare const stackedAreaTimeSeriesOptions: {
|
|
|
55
55
|
};
|
|
56
56
|
curve: string;
|
|
57
57
|
};
|
|
58
|
+
export declare const stackedAreaTimeSeriesUnevenData: {
|
|
59
|
+
group: string;
|
|
60
|
+
date: Date;
|
|
61
|
+
value: number;
|
|
62
|
+
}[];
|
|
63
|
+
export declare const stackedAreaTimeSeriesUnevenDataOptions: {
|
|
64
|
+
title: string;
|
|
65
|
+
axes: {
|
|
66
|
+
left: {
|
|
67
|
+
stacked: boolean;
|
|
68
|
+
};
|
|
69
|
+
bottom: {
|
|
70
|
+
scaleType: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
curve: string;
|
|
74
|
+
};
|
|
58
75
|
export declare const stackedAreaPercentageTimeSeriesOptions: {
|
|
59
76
|
title: string;
|
|
60
77
|
axes: {
|
package/build/demo/data/bar.d.ts
CHANGED
|
@@ -48,6 +48,29 @@ export declare const simpleBarOptions: {
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
+
export declare const simpleBarLongLabelData: {
|
|
52
|
+
group: string;
|
|
53
|
+
value: number;
|
|
54
|
+
}[];
|
|
55
|
+
export declare const simpleBarLongLabelOptions: {
|
|
56
|
+
title: string;
|
|
57
|
+
axes: {
|
|
58
|
+
left: {
|
|
59
|
+
mapsTo: string;
|
|
60
|
+
};
|
|
61
|
+
bottom: {
|
|
62
|
+
mapsTo: string;
|
|
63
|
+
scaleType: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
legend: {
|
|
67
|
+
truncation: {
|
|
68
|
+
type: string;
|
|
69
|
+
threshold: number;
|
|
70
|
+
numCharacter: number;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
51
74
|
export declare const simpleBarFixedDomainOptions: {
|
|
52
75
|
title: string;
|
|
53
76
|
axes: {
|
|
@@ -65,6 +88,10 @@ export declare const simpleHorizontalBarData: {
|
|
|
65
88
|
group: string;
|
|
66
89
|
value: number;
|
|
67
90
|
}[];
|
|
91
|
+
export declare const simpleHorizontalBarLongLabelData: {
|
|
92
|
+
group: string;
|
|
93
|
+
value: number;
|
|
94
|
+
}[];
|
|
68
95
|
export declare const simpleHorizontalBarOptions: {
|
|
69
96
|
title: string;
|
|
70
97
|
axes: {
|
|
@@ -77,6 +104,30 @@ export declare const simpleHorizontalBarOptions: {
|
|
|
77
104
|
};
|
|
78
105
|
};
|
|
79
106
|
};
|
|
107
|
+
export declare const simpleHorizontalBarLongLabelOptions: {
|
|
108
|
+
title: string;
|
|
109
|
+
axes: {
|
|
110
|
+
left: {
|
|
111
|
+
mapsTo: string;
|
|
112
|
+
scaleType: string;
|
|
113
|
+
truncation: {
|
|
114
|
+
type: string;
|
|
115
|
+
threshold: number;
|
|
116
|
+
numCharacter: number;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
bottom: {
|
|
120
|
+
mapsTo: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
legend: {
|
|
124
|
+
truncation: {
|
|
125
|
+
type: string;
|
|
126
|
+
threshold: number;
|
|
127
|
+
numCharacter: number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
};
|
|
80
131
|
export declare const simpleBarTimeSeriesData: {
|
|
81
132
|
group: string;
|
|
82
133
|
date: Date;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const gaugeData: {
|
|
2
|
+
group: string;
|
|
3
|
+
value: number;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const gaugeDataNoDelta: {
|
|
6
|
+
group: string;
|
|
7
|
+
value: number;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const gaugeOptionsSemi: {
|
|
10
|
+
title: string;
|
|
11
|
+
resizable: boolean;
|
|
12
|
+
height: string;
|
|
13
|
+
width: string;
|
|
14
|
+
gauge: {
|
|
15
|
+
type: string;
|
|
16
|
+
status: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const gaugeOptionsCircular: {
|
|
20
|
+
title: string;
|
|
21
|
+
resizable: boolean;
|
|
22
|
+
height: string;
|
|
23
|
+
gauge: {
|
|
24
|
+
status: string;
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const gaugeOptionsCircularNoDelta: {
|
|
29
|
+
title: string;
|
|
30
|
+
resizable: boolean;
|
|
31
|
+
height: string;
|
|
32
|
+
gauge: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
color: {
|
|
36
|
+
scale: {
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -4,6 +4,7 @@ export * from "./bubble";
|
|
|
4
4
|
export * from "./donut";
|
|
5
5
|
export * from "./line";
|
|
6
6
|
export * from "./pie";
|
|
7
|
+
export * from "./gauge";
|
|
7
8
|
export * from "./scatter";
|
|
8
9
|
export * from "./step";
|
|
9
10
|
export * from "./radar";
|
|
@@ -53,6 +54,11 @@ export declare const chartTypes: {
|
|
|
53
54
|
angular: string;
|
|
54
55
|
vue: string;
|
|
55
56
|
};
|
|
57
|
+
GaugeChart: {
|
|
58
|
+
vanilla: string;
|
|
59
|
+
angular: string;
|
|
60
|
+
vue: string;
|
|
61
|
+
};
|
|
56
62
|
DonutChart: {
|
|
57
63
|
vanilla: string;
|
|
58
64
|
angular: string;
|
|
@@ -24,6 +24,32 @@ export declare const lineOptions: {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
export declare const lineLongLabelData: ({
|
|
28
|
+
group: string;
|
|
29
|
+
key: string;
|
|
30
|
+
value: number;
|
|
31
|
+
audienceSize?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
group: string;
|
|
34
|
+
key: string;
|
|
35
|
+
value: number;
|
|
36
|
+
audienceSize: number;
|
|
37
|
+
})[];
|
|
38
|
+
export declare const lineLongLabelOptions: {
|
|
39
|
+
title: string;
|
|
40
|
+
axes: {
|
|
41
|
+
bottom: {
|
|
42
|
+
title: string;
|
|
43
|
+
mapsTo: string;
|
|
44
|
+
scaleType: string;
|
|
45
|
+
};
|
|
46
|
+
left: {
|
|
47
|
+
mapsTo: string;
|
|
48
|
+
title: string;
|
|
49
|
+
scaleType: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
27
53
|
export declare const lineCustomDomainOptions: {
|
|
28
54
|
title: string;
|
|
29
55
|
axes: {
|
|
@@ -36,6 +36,24 @@ export declare const scatterDiscreteOptions: {
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
export declare const scatterLongLabelDiscreteData: {
|
|
40
|
+
group: string;
|
|
41
|
+
key: string;
|
|
42
|
+
value: number;
|
|
43
|
+
}[];
|
|
44
|
+
export declare const scatterLongLabelDiscreteOptions: {
|
|
45
|
+
title: string;
|
|
46
|
+
axes: {
|
|
47
|
+
bottom: {
|
|
48
|
+
title: string;
|
|
49
|
+
scaleType: string;
|
|
50
|
+
mapsTo: string;
|
|
51
|
+
};
|
|
52
|
+
left: {
|
|
53
|
+
mapsTo: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
39
57
|
export declare const scatterTimeSeriesData: {
|
|
40
58
|
group: string;
|
|
41
59
|
date: Date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tooltip } from "./tooltip";
|
|
2
|
-
import { TooltipPosition } from "./../../interfaces";
|
|
2
|
+
import { TooltipPosition, TooltipTypes } from "./../../interfaces";
|
|
3
3
|
export declare class TooltipBar extends Tooltip {
|
|
4
4
|
init(): void;
|
|
5
5
|
/**
|
|
@@ -18,7 +18,7 @@ export declare class TooltipBar extends Tooltip {
|
|
|
18
18
|
* Returns the html for the bar single point tooltip
|
|
19
19
|
* @param data associated values for the hovered bar
|
|
20
20
|
*/
|
|
21
|
-
getTooltipHTML(data: any): string;
|
|
21
|
+
getTooltipHTML(data: any, type: TooltipTypes): string;
|
|
22
22
|
/**
|
|
23
23
|
* Multip tooltips for bar charts include totals for each stack
|
|
24
24
|
* @param data
|
|
@@ -9,9 +9,9 @@ export declare class Tooltip extends Component {
|
|
|
9
9
|
constructor(model: ChartModel, services: any, configs?: any);
|
|
10
10
|
init(): void;
|
|
11
11
|
getTooltipHTML(data: any, type: TooltipTypes): string;
|
|
12
|
-
getMultilineTooltipHTML(data: any): string;
|
|
12
|
+
getMultilineTooltipHTML(data: any, type: TooltipTypes): string;
|
|
13
13
|
render(): void;
|
|
14
|
-
getTooltipPosition(hoveredElement: any): {
|
|
14
|
+
getTooltipPosition(hoveredElement: any, type: TooltipTypes): {
|
|
15
15
|
placement: TooltipPosition;
|
|
16
16
|
position: {
|
|
17
17
|
left: number;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from "../component";
|
|
2
|
+
export declare class Gauge extends Component {
|
|
3
|
+
type: string;
|
|
4
|
+
arc: any;
|
|
5
|
+
backgroundArc: any;
|
|
6
|
+
init(): void;
|
|
7
|
+
getValue(): number;
|
|
8
|
+
getValueRatio(): number;
|
|
9
|
+
getDelta(): number;
|
|
10
|
+
getArcRatio(): number;
|
|
11
|
+
getArcSize(): number;
|
|
12
|
+
getStartAngle(): number;
|
|
13
|
+
getArrow(delta: any): string;
|
|
14
|
+
render(animate?: boolean): void;
|
|
15
|
+
/**
|
|
16
|
+
* draws the value number associated with the Gauge component in the center
|
|
17
|
+
*/
|
|
18
|
+
drawValueNumber(): void;
|
|
19
|
+
/**
|
|
20
|
+
* adds the delta number for the gauge
|
|
21
|
+
*/
|
|
22
|
+
drawDelta(): void;
|
|
23
|
+
getInnerRadius(): number;
|
|
24
|
+
addEventListeners(): void;
|
|
25
|
+
protected computeRadius(): number;
|
|
26
|
+
}
|
|
@@ -17,6 +17,7 @@ export * from "./graphs/line";
|
|
|
17
17
|
export * from "./graphs/scatter";
|
|
18
18
|
export * from "./graphs/scatter-stacked";
|
|
19
19
|
export * from "./graphs/pie";
|
|
20
|
+
export * from "./graphs/gauge";
|
|
20
21
|
export * from "./graphs/donut";
|
|
21
22
|
export * from "./graphs/skeleton";
|
|
22
23
|
export * from "./layout/spacer";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, AreaChartOptions, PieChartOptions, DonutChartOptions, BubbleChartOptions, RadarChartOptions, GridOptions, TimeScaleOptions, TooltipOptions, AxisTooltipOptions, BarTooltipOptions, LegendOptions } from "./interfaces";
|
|
1
|
+
import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, RadarChartOptions, GridOptions, TimeScaleOptions, TooltipOptions, AxisTooltipOptions, BarTooltipOptions, LegendOptions } from "./interfaces";
|
|
2
2
|
/**
|
|
3
3
|
* Legend options
|
|
4
4
|
*/
|
|
@@ -28,6 +28,7 @@ export declare const options: {
|
|
|
28
28
|
pieChart: PieChartOptions;
|
|
29
29
|
donutChart: DonutChartOptions;
|
|
30
30
|
radarChart: RadarChartOptions;
|
|
31
|
+
gaugeChart: GaugeChartOptions;
|
|
31
32
|
};
|
|
32
33
|
/**
|
|
33
34
|
* Options for line behaviour
|
|
@@ -2,6 +2,7 @@ import { ScaleTypes } from "./enums";
|
|
|
2
2
|
import { AxisDomain } from "d3";
|
|
3
3
|
import { Locale } from "date-fns";
|
|
4
4
|
import { ThresholdOptions } from "./components";
|
|
5
|
+
import { TruncationOptions } from "./truncation";
|
|
5
6
|
/**
|
|
6
7
|
* options to configure a scale. not all options are used by all scales
|
|
7
8
|
*/
|
|
@@ -77,6 +78,7 @@ export interface AxisOptions {
|
|
|
77
78
|
*/
|
|
78
79
|
formatter?: Function;
|
|
79
80
|
};
|
|
81
|
+
truncation?: TruncationOptions;
|
|
80
82
|
}
|
|
81
83
|
/**
|
|
82
84
|
* customize time series scales
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GaugeTypes, Statuses, ArrowDirections } from "./enums";
|
|
1
2
|
import { LegendOptions, TooltipOptions, GridOptions, AxesOptions } from "./index";
|
|
2
3
|
import { AxisTooltipOptions, BarTooltipOptions, BarOptions, StackedBarOptions } from "./components";
|
|
3
4
|
import { TimeScaleOptions } from "./axis-scales";
|
|
@@ -197,6 +198,25 @@ export interface PieChartOptions extends BaseChartOptions {
|
|
|
197
198
|
};
|
|
198
199
|
};
|
|
199
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* options specific to gauge charts
|
|
203
|
+
*/
|
|
204
|
+
export interface GaugeChartOptions extends PieChartOptions {
|
|
205
|
+
gauge?: {
|
|
206
|
+
arcWidth?: number;
|
|
207
|
+
deltaArrow?: {
|
|
208
|
+
direction?: ArrowDirections;
|
|
209
|
+
size?: Function;
|
|
210
|
+
enabled: Boolean;
|
|
211
|
+
};
|
|
212
|
+
status?: Statuses;
|
|
213
|
+
deltaFontSize?: Function;
|
|
214
|
+
numberSpacing?: number;
|
|
215
|
+
numberFormatter?: Function;
|
|
216
|
+
valueFontSize?: Function;
|
|
217
|
+
type?: GaugeTypes;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
200
220
|
/**
|
|
201
221
|
* options specific to donut charts
|
|
202
222
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LayoutGrowth, LegendPositions } from "./enums";
|
|
2
2
|
import { Component } from "../components/component";
|
|
3
|
+
import { TruncationOptions } from "./truncation";
|
|
3
4
|
/**
|
|
4
5
|
* customize the overlay contents
|
|
5
6
|
*/
|
|
@@ -47,6 +48,7 @@ export interface LegendOptions {
|
|
|
47
48
|
radius?: Number;
|
|
48
49
|
spaceAfter?: Number;
|
|
49
50
|
};
|
|
51
|
+
truncation?: TruncationOptions;
|
|
50
52
|
}
|
|
51
53
|
export interface TooltipOptions {
|
|
52
54
|
/**
|
|
@@ -18,6 +18,15 @@ export declare enum AxisPositions {
|
|
|
18
18
|
TOP = "top",
|
|
19
19
|
BOTTOM = "bottom"
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* enum of all possible truncation types
|
|
23
|
+
*/
|
|
24
|
+
export declare enum TruncationTypes {
|
|
25
|
+
END_LINE = "end_line",
|
|
26
|
+
MID_LINE = "mid_line",
|
|
27
|
+
FRONT_LINE = "front_line",
|
|
28
|
+
NONE = "none"
|
|
29
|
+
}
|
|
21
30
|
/**
|
|
22
31
|
* enum of all possible cartesian orientations
|
|
23
32
|
* to be used for determining the orientation
|
|
@@ -51,7 +60,9 @@ export declare enum TooltipPosition {
|
|
|
51
60
|
export declare enum TooltipTypes {
|
|
52
61
|
DATAPOINT = "datapoint",
|
|
53
62
|
GRIDLINE = "gridline",
|
|
54
|
-
TITLE = "title"
|
|
63
|
+
TITLE = "title",
|
|
64
|
+
LEGEND = "legend",
|
|
65
|
+
AXISLABEL = "axislabel"
|
|
55
66
|
}
|
|
56
67
|
/**
|
|
57
68
|
* enum of all possible legend positions
|
|
@@ -118,3 +129,22 @@ export declare enum DominantBaseline {
|
|
|
118
129
|
MIDDLE = "middle",
|
|
119
130
|
HANGING = "hanging"
|
|
120
131
|
}
|
|
132
|
+
export declare enum GaugeTypes {
|
|
133
|
+
SEMI = "semi",
|
|
134
|
+
FULL = "full"
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* enum of all possible callout directions
|
|
138
|
+
*/
|
|
139
|
+
export declare enum ArrowDirections {
|
|
140
|
+
UP = "up",
|
|
141
|
+
DOWN = "down"
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* enum of carbon statuses
|
|
145
|
+
*/
|
|
146
|
+
export declare enum Statuses {
|
|
147
|
+
SUCCESS = "success",
|
|
148
|
+
WARNING = "warning",
|
|
149
|
+
DANGER = "danger"
|
|
150
|
+
}
|
|
@@ -40,6 +40,15 @@ export declare enum Pie {
|
|
|
40
40
|
SLICE_CLICK = "pie-slice-click",
|
|
41
41
|
SLICE_MOUSEOUT = "pie-slice-mouseout"
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* enum of all gauge graph events
|
|
45
|
+
*/
|
|
46
|
+
export declare enum Gauge {
|
|
47
|
+
ARC_MOUSEOVER = "gauge-arc-mouseover",
|
|
48
|
+
ARC_MOUSEMOVE = "gauge-arc-mousemove",
|
|
49
|
+
ARC_CLICK = "gauge-arc-click",
|
|
50
|
+
ARC_MOUSEOUT = "gauge-arc-mouseout"
|
|
51
|
+
}
|
|
43
52
|
/**
|
|
44
53
|
* enum of all bar graph events
|
|
45
54
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface TruncationOptions {
|
|
2
|
+
/**
|
|
3
|
+
* truncation configuration
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* truncation type
|
|
7
|
+
*/
|
|
8
|
+
type?: string;
|
|
9
|
+
/**
|
|
10
|
+
* truncation threshold
|
|
11
|
+
*/
|
|
12
|
+
threshold?: Number;
|
|
13
|
+
/**
|
|
14
|
+
* how many characters to be shown
|
|
15
|
+
*/
|
|
16
|
+
numCharacter?: Number;
|
|
17
|
+
}
|
package/build/src/tools.d.ts
CHANGED
|
@@ -82,6 +82,15 @@ export declare namespace Tools {
|
|
|
82
82
|
* @returns The percentage in the form of a number (1 significant digit if necessary)
|
|
83
83
|
*/
|
|
84
84
|
export function convertValueToPercentage(item: any, fullData: any): number;
|
|
85
|
+
/**
|
|
86
|
+
* Truncate the labels
|
|
87
|
+
* @export
|
|
88
|
+
* @param {any} fullText
|
|
89
|
+
* @param {any} truncationType
|
|
90
|
+
* @param {any} numCharacter
|
|
91
|
+
* @returns Truncated text
|
|
92
|
+
*/
|
|
93
|
+
export function truncateLabel(fullText: any, truncationType: any, numCharacter: any): any;
|
|
85
94
|
/**************************************
|
|
86
95
|
* Object/array related checks *
|
|
87
96
|
*************************************/
|