@carbon/charts 0.30.20 → 0.30.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/build/demo/data/bar.d.ts +174 -0
  3. package/build/demo/data/bubble.d.ts +41 -0
  4. package/build/demo/data/donut.d.ts +23 -0
  5. package/build/demo/data/line.d.ts +70 -0
  6. package/build/demo/data/pie.d.ts +13 -0
  7. package/build/demo/data/scatter.d.ts +31 -0
  8. package/build/demo/data/step.d.ts +4 -0
  9. package/build/demo/data/time-series-axis.d.ts +55 -3
  10. package/build/src/components/axes/grid.d.ts +3 -3
  11. package/build/src/components/axes/two-dimensional-axes.d.ts +3 -0
  12. package/build/src/components/essentials/threshold.d.ts +17 -0
  13. package/build/src/components/graphs/bar.d.ts +1 -1
  14. package/build/src/components/graphs/scatter.d.ts +1 -0
  15. package/build/src/components/graphs/skeleton.d.ts +22 -0
  16. package/build/src/components/index.d.ts +2 -0
  17. package/build/src/interfaces/axis-scales.d.ts +11 -0
  18. package/build/src/interfaces/charts.d.ts +4 -0
  19. package/build/src/interfaces/components.d.ts +21 -0
  20. package/build/src/interfaces/enums.d.ts +9 -0
  21. package/build/src/interfaces/events.d.ts +7 -0
  22. package/build/src/model.d.ts +1 -0
  23. package/build/src/services/scales-cartesian.d.ts +9 -1
  24. package/build/stories/tutorials/event-listeners.d.ts +1 -0
  25. package/build/stories/tutorials/getting-started/angular.d.ts +1 -0
  26. package/build/stories/tutorials/getting-started/react.d.ts +1 -0
  27. package/build/stories/tutorials/getting-started/vanilla.d.ts +1 -0
  28. package/build/stories/tutorials/getting-started/vue.d.ts +1 -0
  29. package/build/stories/tutorials/index.d.ts +6 -0
  30. package/build/stories/tutorials/tabular-data-format.d.ts +1 -0
  31. package/bundle.js +1 -1
  32. package/charts/bar-grouped.js +4 -2
  33. package/charts/bar-grouped.js.map +1 -1
  34. package/charts/bar-simple.js +4 -2
  35. package/charts/bar-simple.js.map +1 -1
  36. package/charts/bar-stacked.js +4 -2
  37. package/charts/bar-stacked.js.map +1 -1
  38. package/charts/bubble.js +4 -2
  39. package/charts/bubble.js.map +1 -1
  40. package/charts/donut.js +4 -2
  41. package/charts/donut.js.map +1 -1
  42. package/charts/line.js +4 -2
  43. package/charts/line.js.map +1 -1
  44. package/charts/pie.js +4 -2
  45. package/charts/pie.js.map +1 -1
  46. package/charts/scatter.js +4 -2
  47. package/charts/scatter.js.map +1 -1
  48. package/components/axes/axis.js +24 -13
  49. package/components/axes/axis.js.map +1 -1
  50. package/components/axes/grid.d.ts +3 -3
  51. package/components/axes/grid.js +27 -9
  52. package/components/axes/grid.js.map +1 -1
  53. package/components/axes/two-dimensional-axes.d.ts +3 -0
  54. package/components/axes/two-dimensional-axes.js +30 -0
  55. package/components/axes/two-dimensional-axes.js.map +1 -1
  56. package/components/axes/zero-line.js +15 -1
  57. package/components/axes/zero-line.js.map +1 -1
  58. package/components/essentials/threshold.d.ts +17 -0
  59. package/components/essentials/threshold.js +165 -0
  60. package/components/essentials/threshold.js.map +1 -0
  61. package/components/graphs/bar-grouped.js +3 -1
  62. package/components/graphs/bar-grouped.js.map +1 -1
  63. package/components/graphs/bar-simple.js +1 -1
  64. package/components/graphs/bar-simple.js.map +1 -1
  65. package/components/graphs/bar-stacked.js +1 -1
  66. package/components/graphs/bar-stacked.js.map +1 -1
  67. package/components/graphs/bar.d.ts +1 -1
  68. package/components/graphs/bar.js +1 -1
  69. package/components/graphs/bar.js.map +1 -1
  70. package/components/graphs/donut.js +6 -0
  71. package/components/graphs/donut.js.map +1 -1
  72. package/components/graphs/scatter.d.ts +1 -0
  73. package/components/graphs/scatter.js +28 -0
  74. package/components/graphs/scatter.js.map +1 -1
  75. package/components/graphs/skeleton.d.ts +22 -0
  76. package/components/graphs/skeleton.js +241 -0
  77. package/components/graphs/skeleton.js.map +1 -0
  78. package/components/index.d.ts +2 -0
  79. package/components/index.js +2 -0
  80. package/components/index.js.map +1 -1
  81. package/configuration.js +2 -1
  82. package/configuration.js.map +1 -1
  83. package/demo/data/bar.d.ts +174 -0
  84. package/demo/data/bar.js +188 -2
  85. package/demo/data/bar.js.map +1 -1
  86. package/demo/data/bubble.d.ts +41 -0
  87. package/demo/data/bubble.js +43 -0
  88. package/demo/data/bubble.js.map +1 -1
  89. package/demo/data/bundle.js +1 -1
  90. package/demo/data/donut.d.ts +23 -0
  91. package/demo/data/donut.js +25 -0
  92. package/demo/data/donut.js.map +1 -1
  93. package/demo/data/index.js +177 -0
  94. package/demo/data/index.js.map +1 -1
  95. package/demo/data/line.d.ts +70 -0
  96. package/demo/data/line.js +73 -0
  97. package/demo/data/line.js.map +1 -1
  98. package/demo/data/pie.d.ts +13 -0
  99. package/demo/data/pie.js +15 -0
  100. package/demo/data/pie.js.map +1 -1
  101. package/demo/data/scatter.d.ts +31 -0
  102. package/demo/data/scatter.js +33 -0
  103. package/demo/data/scatter.js.map +1 -1
  104. package/demo/data/step.d.ts +4 -0
  105. package/demo/data/step.js +15 -0
  106. package/demo/data/step.js.map +1 -1
  107. package/demo/data/time-series-axis.d.ts +55 -3
  108. package/demo/data/time-series-axis.js +61 -3
  109. package/demo/data/time-series-axis.js.map +1 -1
  110. package/demo/styles.css +292 -0
  111. package/demo/styles.css.map +1 -1
  112. package/demo/styles.min.css +1 -1
  113. package/demo/styles.min.css.map +1 -1
  114. package/demo/tsconfig.tsbuildinfo +248 -245
  115. package/interfaces/axis-scales.d.ts +11 -0
  116. package/interfaces/axis-scales.js.map +1 -1
  117. package/interfaces/charts.d.ts +4 -0
  118. package/interfaces/charts.js.map +1 -1
  119. package/interfaces/components.d.ts +21 -0
  120. package/interfaces/components.js.map +1 -1
  121. package/interfaces/enums.d.ts +9 -0
  122. package/interfaces/enums.js +10 -0
  123. package/interfaces/enums.js.map +1 -1
  124. package/interfaces/events.d.ts +7 -0
  125. package/interfaces/events.js +8 -0
  126. package/interfaces/events.js.map +1 -1
  127. package/model.d.ts +1 -0
  128. package/model.js +3 -0
  129. package/model.js.map +1 -1
  130. package/package.json +1 -1
  131. package/services/scales-cartesian.d.ts +9 -1
  132. package/services/scales-cartesian.js +33 -0
  133. package/services/scales-cartesian.js.map +1 -1
  134. package/services/time-series.js +8 -7
  135. package/services/time-series.js.map +1 -1
  136. package/styles/components/_skeleton.scss +57 -0
  137. package/styles/components/_threshold.scss +49 -0
  138. package/styles/components/index.scss +2 -0
  139. package/styles/graphs/_scatter.scss +4 -0
  140. package/styles-g10.css +76 -0
  141. package/styles-g10.css.map +1 -1
  142. package/styles-g10.min.css +1 -1
  143. package/styles-g10.min.css.map +1 -1
  144. package/styles-g100.css +76 -0
  145. package/styles-g100.css.map +1 -1
  146. package/styles-g100.min.css +1 -1
  147. package/styles-g100.min.css.map +1 -1
  148. package/styles-g90.css +76 -0
  149. package/styles-g90.css.map +1 -1
  150. package/styles-g90.min.css +1 -1
  151. package/styles-g90.min.css.map +1 -1
  152. package/styles.css +76 -0
  153. package/styles.css.map +1 -1
  154. package/styles.min.css +1 -1
  155. package/styles.min.css.map +1 -1
  156. package/tools.js +6 -0
  157. package/tools.js.map +1 -1
  158. package/tsconfig.tsbuildinfo +145 -82
package/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
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.30.24](https://github.com/IBM/carbon-charts/compare/v0.30.23...v0.30.24) (2020-05-15)
7
+
8
+ **Note:** Version bump only for package @carbon/charts
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.30.23](https://github.com/IBM/carbon-charts/compare/v0.30.22...v0.30.23) (2020-05-13)
15
+
16
+ **Note:** Version bump only for package @carbon/charts
17
+
18
+
19
+
20
+
21
+
22
+ ## [0.30.22](https://github.com/IBM/carbon-charts/compare/v0.30.21...v0.30.22) (2020-05-13)
23
+
24
+ **Note:** Version bump only for package @carbon/charts
25
+
26
+
27
+
28
+
29
+
30
+ ## [0.30.21](https://github.com/IBM/carbon-charts/compare/v0.30.20...v0.30.21) (2020-05-11)
31
+
32
+ **Note:** Version bump only for package @carbon/charts
33
+
34
+
35
+
36
+
37
+
6
38
  ## [0.30.20](https://github.com/IBM/carbon-charts/compare/v0.30.19...v0.30.20) (2020-05-08)
7
39
 
8
40
  **Note:** Version bump only for package @carbon/charts
@@ -182,3 +182,177 @@ export declare const stackedHorizontalBarTimeSeriesData: {
182
182
  date: Date;
183
183
  value: number;
184
184
  }[];
185
+ export declare const simpleBarEmptyStateData: any[];
186
+ export declare const simpleBarEmptyStateOptions: {
187
+ title: string;
188
+ axes: {
189
+ left: {
190
+ primary: boolean;
191
+ };
192
+ bottom: {
193
+ scaleType: string;
194
+ secondary: boolean;
195
+ };
196
+ };
197
+ };
198
+ export declare const simpleBarSkeletonData: any[];
199
+ export declare const simpleBarSkeletonOptions: {
200
+ title: string;
201
+ axes: {
202
+ left: {
203
+ primary: boolean;
204
+ };
205
+ bottom: {
206
+ scaleType: string;
207
+ secondary: boolean;
208
+ };
209
+ };
210
+ data: {
211
+ loading: boolean;
212
+ };
213
+ };
214
+ export declare const groupedBarEmptyStateData: any[];
215
+ export declare const groupedBarEmptyStateOptions: {
216
+ title: string;
217
+ axes: {
218
+ left: {
219
+ primary: boolean;
220
+ };
221
+ bottom: {
222
+ scaleType: string;
223
+ secondary: boolean;
224
+ };
225
+ };
226
+ };
227
+ export declare const groupedBarSkeletonData: any[];
228
+ export declare const groupedBarSkeletonOptions: {
229
+ title: string;
230
+ axes: {
231
+ left: {
232
+ primary: boolean;
233
+ };
234
+ bottom: {
235
+ scaleType: string;
236
+ secondary: boolean;
237
+ };
238
+ };
239
+ data: {
240
+ loading: boolean;
241
+ };
242
+ };
243
+ export declare const stackedBarEmptyStateData: any[];
244
+ export declare const stackedBarEmptyStateOptions: {
245
+ title: string;
246
+ axes: {
247
+ left: {
248
+ primary: boolean;
249
+ };
250
+ bottom: {
251
+ scaleType: string;
252
+ secondary: boolean;
253
+ };
254
+ };
255
+ };
256
+ export declare const stackedBarSkeletonData: any[];
257
+ export declare const stackedBarSkeletonOptions: {
258
+ title: string;
259
+ axes: {
260
+ left: {
261
+ primary: boolean;
262
+ };
263
+ bottom: {
264
+ scaleType: string;
265
+ secondary: boolean;
266
+ };
267
+ };
268
+ data: {
269
+ loading: boolean;
270
+ };
271
+ };
272
+ export declare const simpleHorizontalBarEmptyStateData: any[];
273
+ export declare const simpleHorizontalBarEmptyStateOptions: {
274
+ title: string;
275
+ axes: {
276
+ left: {
277
+ primary: boolean;
278
+ scaleType: string;
279
+ };
280
+ bottom: {
281
+ secondary: boolean;
282
+ };
283
+ };
284
+ };
285
+ export declare const simpleHorizontalBarSkeletonData: any[];
286
+ export declare const simpleHorizontalBarSkeletonOptions: {
287
+ title: string;
288
+ axes: {
289
+ left: {
290
+ primary: boolean;
291
+ scaleType: string;
292
+ };
293
+ bottom: {
294
+ secondary: boolean;
295
+ };
296
+ };
297
+ data: {
298
+ loading: boolean;
299
+ };
300
+ };
301
+ export declare const groupedHorizontalBarEmptyStateData: any[];
302
+ export declare const groupedHorizontalBarEmptyStateOptions: {
303
+ title: string;
304
+ axes: {
305
+ left: {
306
+ primary: boolean;
307
+ scaleType: string;
308
+ };
309
+ bottom: {
310
+ secondary: boolean;
311
+ };
312
+ };
313
+ };
314
+ export declare const groupedHorizontalBarSkeletonData: any[];
315
+ export declare const groupedHorizontalBarSkeletonOptions: {
316
+ title: string;
317
+ axes: {
318
+ left: {
319
+ primary: boolean;
320
+ scaleType: string;
321
+ };
322
+ bottom: {
323
+ secondary: boolean;
324
+ };
325
+ };
326
+ data: {
327
+ loading: boolean;
328
+ };
329
+ };
330
+ export declare const stackedHorizontalBarEmptyStateData: any[];
331
+ export declare const stackedHorizontalBarEmptyStateOptions: {
332
+ title: string;
333
+ axes: {
334
+ left: {
335
+ primary: boolean;
336
+ scaleType: string;
337
+ };
338
+ bottom: {
339
+ secondary: boolean;
340
+ };
341
+ };
342
+ };
343
+ export declare const stackedHorizontalBarSkeletonData: any[];
344
+ export declare const stackedHorizontalBarSkeletonOptions: {
345
+ title: string;
346
+ axes: {
347
+ left: {
348
+ primary: boolean;
349
+ scaleType: string;
350
+ };
351
+ bottom: {
352
+ secondary: boolean;
353
+ };
354
+ };
355
+ data: {
356
+ loading: boolean;
357
+ };
358
+ };
@@ -67,3 +67,44 @@ export declare const bubbleTimeSeriesOptions: {
67
67
  radiusMapsTo: string;
68
68
  };
69
69
  };
70
+ export declare const bubbleEmptyStateData: any[];
71
+ export declare const bubbleEmptyStateOptions: {
72
+ title: string;
73
+ axes: {
74
+ bottom: {
75
+ title: string;
76
+ mapsTo: string;
77
+ includeZero: boolean;
78
+ };
79
+ left: {
80
+ title: string;
81
+ mapsTo: string;
82
+ includeZero: boolean;
83
+ };
84
+ };
85
+ bubble: {
86
+ radiusMapsTo: string;
87
+ };
88
+ };
89
+ export declare const bubbleSkeletonData: any[];
90
+ export declare const bubbleSkeletonOptions: {
91
+ title: string;
92
+ axes: {
93
+ bottom: {
94
+ title: string;
95
+ mapsTo: string;
96
+ includeZero: boolean;
97
+ };
98
+ left: {
99
+ title: string;
100
+ mapsTo: string;
101
+ includeZero: boolean;
102
+ };
103
+ };
104
+ bubble: {
105
+ radiusMapsTo: string;
106
+ };
107
+ data: {
108
+ loading: boolean;
109
+ };
110
+ };
@@ -11,3 +11,26 @@ export declare const donutOptions: {
11
11
  };
12
12
  };
13
13
  };
14
+ export declare const donutEmptyStateData: any[];
15
+ export declare const donutEmptyStateOptions: {
16
+ title: string;
17
+ resizable: boolean;
18
+ donut: {
19
+ center: {
20
+ label: string;
21
+ };
22
+ };
23
+ };
24
+ export declare const donutSkeletonData: any[];
25
+ export declare const donutSkeletonOptions: {
26
+ title: string;
27
+ resizable: boolean;
28
+ donut: {
29
+ center: {
30
+ label: string;
31
+ };
32
+ };
33
+ data: {
34
+ loading: boolean;
35
+ };
36
+ };
@@ -23,6 +23,9 @@ export declare const lineOptions: {
23
23
  scaleType: string;
24
24
  };
25
25
  };
26
+ chartTypes: {
27
+ "line": string[];
28
+ };
26
29
  };
27
30
  export declare const lineTimeSeriesData: {
28
31
  group: string;
@@ -45,6 +48,36 @@ export declare const lineTimeSeriesOptions: {
45
48
  };
46
49
  curve: string;
47
50
  };
51
+ export declare const lineTimeSeriesWithThresholdsOptions: {
52
+ title: string;
53
+ axes: {
54
+ bottom: {
55
+ title: string;
56
+ mapsTo: string;
57
+ scaleType: string;
58
+ thresholds: {
59
+ value: Date;
60
+ label: string;
61
+ valueFormatter: (date: Date) => string;
62
+ }[];
63
+ };
64
+ left: {
65
+ mapsTo: string;
66
+ title: string;
67
+ scaleType: string;
68
+ thresholds: ({
69
+ value: number;
70
+ label: string;
71
+ fillColor: string;
72
+ } | {
73
+ value: number;
74
+ fillColor: string;
75
+ label?: undefined;
76
+ })[];
77
+ };
78
+ };
79
+ curve: string;
80
+ };
48
81
  export declare const lineTimeSeriesDenseData: {
49
82
  group: string;
50
83
  date: Date;
@@ -115,3 +148,40 @@ export declare const lineTimeSeriesHorizontalOptions: {
115
148
  };
116
149
  curve: string;
117
150
  };
151
+ export declare const lineEmptyStateData: any[];
152
+ export declare const lineEmptyStateOptions: {
153
+ title: string;
154
+ axes: {
155
+ bottom: {
156
+ title: string;
157
+ mapsTo: string;
158
+ scaleType: string;
159
+ };
160
+ left: {
161
+ mapsTo: string;
162
+ title: string;
163
+ scaleType: string;
164
+ };
165
+ };
166
+ curve: string;
167
+ };
168
+ export declare const lineSkeletonData: any[];
169
+ export declare const lineSkeletonOptions: {
170
+ title: string;
171
+ axes: {
172
+ bottom: {
173
+ title: string;
174
+ mapsTo: string;
175
+ scaleType: string;
176
+ };
177
+ left: {
178
+ mapsTo: string;
179
+ title: string;
180
+ scaleType: string;
181
+ };
182
+ };
183
+ curve: string;
184
+ data: {
185
+ loading: boolean;
186
+ };
187
+ };
@@ -6,3 +6,16 @@ export declare const pieOptions: {
6
6
  title: string;
7
7
  resizable: boolean;
8
8
  };
9
+ export declare const pieEmptyStateData: any[];
10
+ export declare const pieEmptyStateOptions: {
11
+ title: string;
12
+ resizable: boolean;
13
+ };
14
+ export declare const pieSkeletonData: any[];
15
+ export declare const pieSkeletonOptions: {
16
+ title: string;
17
+ resizable: boolean;
18
+ data: {
19
+ loading: boolean;
20
+ };
21
+ };
@@ -54,3 +54,34 @@ export declare const scatterTimeSeriesOptions: {
54
54
  };
55
55
  };
56
56
  };
57
+ export declare const scatterEmptyStateData: any[];
58
+ export declare const scatterEmptyStateOptions: {
59
+ title: string;
60
+ axes: {
61
+ bottom: {
62
+ title: string;
63
+ scaleType: string;
64
+ mapsTo: string;
65
+ };
66
+ left: {
67
+ mapsTo: string;
68
+ };
69
+ };
70
+ };
71
+ export declare const scatterSkeletonData: any[];
72
+ export declare const scatterSkeletonOptions: {
73
+ title: string;
74
+ axes: {
75
+ bottom: {
76
+ title: string;
77
+ scaleType: string;
78
+ mapsTo: string;
79
+ };
80
+ left: {
81
+ mapsTo: string;
82
+ };
83
+ };
84
+ data: {
85
+ loading: boolean;
86
+ };
87
+ };
@@ -16,3 +16,7 @@ export declare const stepTimeSeriesData: {
16
16
  date: Date;
17
17
  value: number;
18
18
  }[];
19
+ export declare const stepEmptyStateData: any[];
20
+ export declare const stepEmptyStateOptions: any;
21
+ export declare const stepSkeletonData: any[];
22
+ export declare const stepSkeletonOptions: any;
@@ -261,8 +261,60 @@ export declare const lineTimeSeriesNoExtendedDomainOptions: {
261
261
  timeScale: {
262
262
  addSpaceOnEdges: number;
263
263
  };
264
- points: {
265
- radius: number;
264
+ };
265
+ export declare const lineTimeSeriesDataTwoIdenticalLabels: {
266
+ labels: string[];
267
+ datasets: {
268
+ label: string;
269
+ data: {
270
+ date: Date;
271
+ value: number;
272
+ }[];
273
+ }[];
274
+ };
275
+ export declare const lineTimeSeriesTwoIdenticalLabelsOptions: {
276
+ title: string;
277
+ axes: {
278
+ left: {};
279
+ bottom: {
280
+ scaleType: string;
281
+ };
282
+ };
283
+ timeScale: {
284
+ addSpaceOnEdges: number;
285
+ };
286
+ };
287
+ export declare const lineTimeSeriesTwoIdenticalLabels2Options: {
288
+ title: string;
289
+ axes: {
290
+ left: {};
291
+ bottom: {
292
+ scaleType: string;
293
+ };
294
+ };
295
+ timeScale: {
296
+ addSpaceOnEdges: number;
297
+ };
298
+ };
299
+ export declare const lineTimeSeriesDataAllLabelsInPrimaryFormat: {
300
+ labels: string[];
301
+ datasets: {
302
+ label: string;
303
+ data: {
304
+ date: Date;
305
+ value: number;
306
+ }[];
307
+ }[];
308
+ };
309
+ export declare const lineTimeSeriesAllLabelsInPrimaryFormatOptions: {
310
+ title: string;
311
+ axes: {
312
+ left: {};
313
+ bottom: {
314
+ scaleType: string;
315
+ };
316
+ };
317
+ timeScale: {
318
+ addSpaceOnEdges: number;
266
319
  };
267
- filled: boolean;
268
320
  };
@@ -2,9 +2,9 @@ import { Component } from "../component";
2
2
  export declare class Grid extends Component {
3
3
  type: string;
4
4
  backdrop: any;
5
- render(): void;
6
- drawXGrid(): void;
7
- drawYGrid(): void;
5
+ render(animate?: boolean): void;
6
+ drawXGrid(animate: boolean): void;
7
+ drawYGrid(animate: boolean): void;
8
8
  /**
9
9
  * Returns the threshold for the gridline tooltips based on the mouse location.
10
10
  * Calculated based on the mouse position between the two closest gridlines or edges of chart.
@@ -1,7 +1,9 @@
1
1
  import { Component } from "../component";
2
+ import { Threshold } from "../essentials/threshold";
2
3
  export declare class TwoDimensionalAxes extends Component {
3
4
  type: string;
4
5
  children: any;
6
+ thresholds: Threshold[];
5
7
  margins: {
6
8
  top: number;
7
9
  right: number;
@@ -9,4 +11,5 @@ export declare class TwoDimensionalAxes extends Component {
9
11
  left: number;
10
12
  };
11
13
  render(animate?: boolean): void;
14
+ addAxisThresholds(animate: any, axisPosition: any): void;
12
15
  }
@@ -0,0 +1,17 @@
1
+ import { Component } from "../component";
2
+ import { ChartModel } from "../../model";
3
+ import Position from "@carbon/utils-position";
4
+ export declare class Threshold extends Component {
5
+ type: string;
6
+ threshold: any;
7
+ thresholdClass: string;
8
+ thresholdIdentifierClass: string;
9
+ label: any;
10
+ positionService: Position;
11
+ constructor(model: ChartModel, services: any, configs: any);
12
+ render(animate?: boolean): void;
13
+ getFormattedValue(): any;
14
+ appendThresholdLabel(): void;
15
+ setThresholdLabelPosition(): void;
16
+ addEventListeners(): void;
17
+ }
@@ -1,4 +1,4 @@
1
1
  import { Component } from "../component";
2
2
  export declare class Bar extends Component {
3
- protected getBarWidth(): number;
3
+ protected getBarWidth(allDataLabels?: string[]): number;
4
4
  }
@@ -4,6 +4,7 @@ export declare class Scatter extends Component {
4
4
  type: string;
5
5
  init(): void;
6
6
  render(animate: boolean): void;
7
+ isDatapointThresholdAnomaly(datum: any, index: number): boolean;
7
8
  styleCircles(selection: Selection<any, any, any, any>, animate: boolean): void;
8
9
  handleLegendOnHover: (event: CustomEvent<any>) => void;
9
10
  handleLegendMouseOut: (event: CustomEvent<any>) => void;
@@ -0,0 +1,22 @@
1
+ import { Component } from "../component";
2
+ export declare class Skeleton extends Component {
3
+ type: string;
4
+ xScale: any;
5
+ yScale: any;
6
+ backdrop: any;
7
+ render(): void;
8
+ renderSkeleton(showShimmerEffect: boolean): void;
9
+ renderGridSkeleton(showShimmerEffect: boolean): void;
10
+ renderVertOrHorizSkeleton(showShimmerEffect: boolean): void;
11
+ renderPieSkeleton(showShimmerEffect: boolean): void;
12
+ renderDonutSkeleton(showShimmerEffect: boolean): void;
13
+ setScales(): void;
14
+ drawBackdrop(showShimmerEffect: boolean): void;
15
+ drawXGrid(showShimmerEffect: boolean): void;
16
+ drawYGrid(showShimmerEffect: boolean): void;
17
+ drawRing(outerRadius: number, innerRadius: number, shimmer?: boolean): void;
18
+ computeOuterRadius(): any;
19
+ computeInnerRadius(): number;
20
+ setShimmerEffect(gradientId: string): void;
21
+ removeSkeleton(): void;
22
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./component";
2
2
  export * from "./essentials/legend";
3
+ export * from "./essentials/threshold";
3
4
  export * from "./essentials/title";
4
5
  export * from "./essentials/tooltip";
5
6
  export * from "./essentials/tooltip-bar";
@@ -14,6 +15,7 @@ export * from "./graphs/line";
14
15
  export * from "./graphs/scatter";
15
16
  export * from "./graphs/pie";
16
17
  export * from "./graphs/donut";
18
+ export * from "./graphs/skeleton";
17
19
  export * from "./layout/spacer";
18
20
  export * from "./layout/layout";
19
21
  export * from "./axes/two-dimensional-axes";
@@ -1,6 +1,7 @@
1
1
  import { ScaleTypes } from "./enums";
2
2
  import { AxisDomain } from "d3";
3
3
  import { Locale } from "date-fns";
4
+ import { ThresholdOptions } from "./components";
4
5
  /**
5
6
  * options to configure a scale. not all options are used by all scales
6
7
  */
@@ -31,6 +32,16 @@ export interface AxisOptions {
31
32
  * optional title for the scales
32
33
  */
33
34
  title?: string;
35
+ /**
36
+ * thresholds
37
+ * Example:
38
+ * [
39
+ * {value: 10000},
40
+ * {value: 40020, valueFormatter: (x) => x},
41
+ * {value: 55000, label: "Custom label", fillColor: "#03a9f4"},
42
+ * ]
43
+ */
44
+ thresholds?: ThresholdOptions[];
34
45
  /**
35
46
  * tick configuration
36
47
  */
@@ -57,6 +57,10 @@ export interface BaseChartOptions {
57
57
  * identifier for data groups
58
58
  */
59
59
  groupMapsTo?: string;
60
+ /**
61
+ * used to simulate data loading
62
+ */
63
+ loading?: Boolean;
60
64
  };
61
65
  /**
62
66
  * options related to color scales
@@ -86,6 +86,27 @@ export interface TooltipOptions {
86
86
  width?: number;
87
87
  };
88
88
  }
89
+ /**
90
+ * Threshold options
91
+ */
92
+ export interface ThresholdOptions {
93
+ /**
94
+ * threshold value
95
+ */
96
+ value: number | Date;
97
+ /**
98
+ * a function to format the threshold values
99
+ */
100
+ valueFormatter?: Function;
101
+ /**
102
+ * hex threshold line color
103
+ */
104
+ fillColor: string;
105
+ /**
106
+ * threshold label
107
+ */
108
+ label: string;
109
+ }
89
110
  /**
90
111
  * extends tooltip options to provide support for multiple gridline tooltips
91
112
  */
@@ -93,6 +93,15 @@ export declare enum CalloutDirections {
93
93
  LEFT = "left",
94
94
  RIGHT = "right"
95
95
  }
96
+ /**
97
+ * enum of all possible skeleton/empty state types
98
+ */
99
+ export declare enum Skeletons {
100
+ GRID = "grid",
101
+ VERT_OR_HORIZ = "vertOrHoriz",
102
+ PIE = "pie",
103
+ DONUT = "donut"
104
+ }
96
105
  /**
97
106
  * enum of all possible attributes used to aling text horizontally
98
107
  */