@carbon/charts 0.48.3 → 0.49.2

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 (78) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/build/demo/data/CHART_TYPES.d.ts +5 -0
  3. package/build/demo/data/alluvial.d.ts +45 -0
  4. package/build/demo/data/index.d.ts +1 -0
  5. package/build/src/charts/alluvial.d.ts +6 -0
  6. package/build/src/charts/index.d.ts +1 -0
  7. package/build/src/components/graphs/alluvial.d.ts +13 -0
  8. package/build/src/components/index.d.ts +1 -0
  9. package/build/src/configuration-non-customizable.d.ts +10 -0
  10. package/build/src/configuration.d.ts +2 -1
  11. package/build/src/interfaces/charts.d.ts +23 -0
  12. package/build/src/interfaces/events.d.ts +13 -0
  13. package/bundle.js +1 -1
  14. package/charts/alluvial.d.ts +6 -0
  15. package/charts/alluvial.js +44 -0
  16. package/charts/alluvial.js.map +1 -0
  17. package/charts/index.d.ts +1 -0
  18. package/charts/index.js +1 -0
  19. package/charts/index.js.map +1 -1
  20. package/components/essentials/legend.js +5 -4
  21. package/components/essentials/legend.js.map +1 -1
  22. package/components/graphs/alluvial.d.ts +13 -0
  23. package/components/graphs/alluvial.js +453 -0
  24. package/components/graphs/alluvial.js.map +1 -0
  25. package/components/graphs/bar-stacked.js +4 -4
  26. package/components/graphs/bar-stacked.js.map +1 -1
  27. package/components/index.d.ts +1 -0
  28. package/components/index.js +1 -0
  29. package/components/index.js.map +1 -1
  30. package/configuration-non-customizable.d.ts +10 -0
  31. package/configuration-non-customizable.js +10 -0
  32. package/configuration-non-customizable.js.map +1 -1
  33. package/configuration.d.ts +2 -1
  34. package/configuration.js +11 -0
  35. package/configuration.js.map +1 -1
  36. package/demo/data/CHART_TYPES.d.ts +5 -0
  37. package/demo/data/CHART_TYPES.js +5 -0
  38. package/demo/data/CHART_TYPES.js.map +1 -1
  39. package/demo/data/alluvial.d.ts +45 -0
  40. package/demo/data/alluvial.js +130 -0
  41. package/demo/data/alluvial.js.map +1 -0
  42. package/demo/data/bundle.js +1 -1
  43. package/demo/data/index.d.ts +1 -0
  44. package/demo/data/index.js +41 -18
  45. package/demo/data/index.js.map +1 -1
  46. package/demo/styles.css +42 -0
  47. package/demo/styles.css.map +1 -1
  48. package/demo/styles.min.css +1 -1
  49. package/demo/styles.min.css.map +1 -1
  50. package/demo/tsconfig.tsbuildinfo +18 -4
  51. package/interfaces/charts.d.ts +23 -0
  52. package/interfaces/charts.js.map +1 -1
  53. package/interfaces/events.d.ts +13 -0
  54. package/interfaces/events.js +14 -0
  55. package/interfaces/events.js.map +1 -1
  56. package/model/model.js +3 -1
  57. package/model/model.js.map +1 -1
  58. package/package.json +2 -1
  59. package/styles/components/_legend.scss +5 -0
  60. package/styles/graphs/_alluvial.scss +30 -0
  61. package/styles/graphs/index.scss +1 -0
  62. package/styles-g10.css +11 -0
  63. package/styles-g10.css.map +1 -1
  64. package/styles-g10.min.css +1 -1
  65. package/styles-g10.min.css.map +1 -1
  66. package/styles-g100.css +12 -0
  67. package/styles-g100.css.map +1 -1
  68. package/styles-g100.min.css +1 -1
  69. package/styles-g100.min.css.map +1 -1
  70. package/styles-g90.css +12 -0
  71. package/styles-g90.css.map +1 -1
  72. package/styles-g90.min.css +1 -1
  73. package/styles-g90.min.css.map +1 -1
  74. package/styles.css +11 -0
  75. package/styles.css.map +1 -1
  76. package/styles.min.css +1 -1
  77. package/styles.min.css.map +1 -1
  78. package/tsconfig.tsbuildinfo +64 -17
package/CHANGELOG.md CHANGED
@@ -3,6 +3,47 @@
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.49.2](https://github.com/carbon-design-system/carbon-charts/compare/v0.49.1...v0.49.2) (2021-09-20)
7
+
8
+ **Note:** Version bump only for package @carbon/charts
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.49.1](https://github.com/carbon-design-system/carbon-charts/compare/v0.49.0...v0.49.1) (2021-09-17)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **core:** groupMapsTo in stacked bar charts ([#1156](https://github.com/carbon-design-system/carbon-charts/issues/1156)) ([4d6b61b](https://github.com/carbon-design-system/carbon-charts/commit/4d6b61ba86c154787f9e8acdf3ed8851dc8c6b17))
20
+
21
+
22
+
23
+
24
+
25
+ # [0.49.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.48.4...v0.49.0) (2021-09-15)
26
+
27
+
28
+ ### Features
29
+
30
+ * **core:** create alluvial chart ([#1132](https://github.com/carbon-design-system/carbon-charts/issues/1132)) ([08fa194](https://github.com/carbon-design-system/carbon-charts/commit/08fa194f1c59ab2110c0d221886fc0174c936194)), closes [#871](https://github.com/carbon-design-system/carbon-charts/issues/871)
31
+
32
+
33
+
34
+
35
+
36
+ ## [0.48.4](https://github.com/carbon-design-system/carbon-charts/compare/v0.48.3...v0.48.4) (2021-09-13)
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * **core:** legend alignment incorrect initial rendering ([#1151](https://github.com/carbon-design-system/carbon-charts/issues/1151)) ([0b01426](https://github.com/carbon-design-system/carbon-charts/commit/0b0142677fd67041ee8576aa19cfa53f24e39a55))
42
+
43
+
44
+
45
+
46
+
6
47
  ## [0.48.3](https://github.com/carbon-design-system/carbon-charts/compare/v0.48.2...v0.48.3) (2021-09-13)
7
48
 
8
49
 
@@ -1,4 +1,9 @@
1
1
  declare const _default: {
2
+ AlluvialChart: {
3
+ vanilla: string;
4
+ angular: string;
5
+ vue: string;
6
+ };
2
7
  AreaChart: {
3
8
  vanilla: string;
4
9
  angular: string;
@@ -0,0 +1,45 @@
1
+ export declare const alluvialSimpleData: {
2
+ source: string;
3
+ target: string;
4
+ value: number;
5
+ }[];
6
+ export declare const alluvialSimpleOptions: {
7
+ title: string;
8
+ alluvial: {
9
+ units: string;
10
+ nodes: {
11
+ name: string;
12
+ category: string;
13
+ }[];
14
+ };
15
+ };
16
+ export declare const alluvialMultipleCategoryOptions: {
17
+ title: string;
18
+ alluvial: {
19
+ nodes: {
20
+ name: string;
21
+ category: string;
22
+ }[];
23
+ };
24
+ };
25
+ export declare const alluvialMultipleCategoryData: {
26
+ source: string;
27
+ target: string;
28
+ value: number;
29
+ }[];
30
+ export declare const alluvialMonochromeData: {
31
+ source: string;
32
+ target: string;
33
+ value: number;
34
+ }[];
35
+ export declare const alluvialMonochromeOptions: {
36
+ title: string;
37
+ alluvial: {
38
+ nodes: {
39
+ name: string;
40
+ category: string;
41
+ }[];
42
+ monochrome: boolean;
43
+ nodePadding: number;
44
+ };
45
+ };
@@ -21,6 +21,7 @@ export * from './toolbar';
21
21
  export * from './wordcloud';
22
22
  export * from './zoom-bar';
23
23
  export * from './high-scale';
24
+ export * from './alluvial';
24
25
  export * from './CHART_TYPES';
25
26
  export declare enum DemoGroupTypes {
26
27
  UTILITY = "utility",
@@ -0,0 +1,6 @@
1
+ import { Chart } from '../chart';
2
+ import { ChartConfig, AlluvialChartOptions } from '../interfaces/index';
3
+ export declare class AlluvialChart extends Chart {
4
+ constructor(holder: Element, chartConfigs: ChartConfig<AlluvialChartOptions>);
5
+ getComponents(): any[];
6
+ }
@@ -20,3 +20,4 @@ export * from './tree';
20
20
  export * from './treemap';
21
21
  export * from './circle-pack';
22
22
  export * from './wordcloud';
23
+ export * from './alluvial';
@@ -0,0 +1,13 @@
1
+ import { Component } from '../component';
2
+ import { RenderTypes } from '../../interfaces';
3
+ export declare class Alluvial extends Component {
4
+ type: string;
5
+ renderType: RenderTypes;
6
+ private graph;
7
+ render(animate?: boolean): void;
8
+ addLineEventListener(): void;
9
+ addNodeEventListener(): void;
10
+ private traverse;
11
+ getRightArrowIcon(): string;
12
+ destroy(): void;
13
+ }
@@ -31,6 +31,7 @@ export * from './graphs/treemap';
31
31
  export * from './graphs/radar';
32
32
  export * from './graphs/circle-pack';
33
33
  export * from './graphs/wordcloud';
34
+ export * from './graphs/alluvial';
34
35
  export * from './layout/spacer';
35
36
  export * from './layout/layout';
36
37
  export * from './axes/two-dimensional-axes';
@@ -188,6 +188,16 @@ export declare const radar: {
188
188
  xAxisRectHeight: number;
189
189
  dotsRadius: number;
190
190
  };
191
+ export declare const alluvial: {
192
+ nodeWidth: number;
193
+ nodeHoveredWidth: number;
194
+ minNodePadding: number;
195
+ opacity: {
196
+ unfocus: number;
197
+ default: number;
198
+ selected: number;
199
+ };
200
+ };
191
201
  export declare const spacers: {
192
202
  default: {
193
203
  size: number;
@@ -1,4 +1,4 @@
1
- import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, BulletChartOptions, HistogramChartOptions, RadarChartOptions, ComboChartOptions, TreeChartOptions, TreemapChartOptions, CirclePackChartOptions, WorldCloudChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions, ProportionalMeterChartOptions } from './interfaces';
1
+ import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, BulletChartOptions, HistogramChartOptions, RadarChartOptions, ComboChartOptions, TreeChartOptions, TreemapChartOptions, CirclePackChartOptions, WorldCloudChartOptions, AlluvialChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions, ProportionalMeterChartOptions } from './interfaces';
2
2
  /**
3
3
  * Grid options
4
4
  */
@@ -38,5 +38,6 @@ export declare const options: {
38
38
  treemapChart: TreemapChartOptions;
39
39
  circlePackChart: CirclePackChartOptions;
40
40
  wordCloudChart: WorldCloudChartOptions;
41
+ alluvialChart: AlluvialChartOptions;
41
42
  };
42
43
  export * from './configuration-non-customizable';
@@ -411,3 +411,26 @@ export interface CirclePackChartOptions extends BaseChartOptions {
411
411
  };
412
412
  };
413
413
  }
414
+ /**
415
+ * options specific to Alluvial charts
416
+ */
417
+ export interface AlluvialChartOptions extends BaseChartOptions {
418
+ alluvial: {
419
+ units?: string;
420
+ /**
421
+ * List of nodes to draw
422
+ */
423
+ nodes: Array<{
424
+ name: string;
425
+ category?: string;
426
+ }>;
427
+ /**
428
+ * Set the node padding
429
+ */
430
+ nodePadding?: number;
431
+ /**
432
+ * Enable single color usage for lines
433
+ */
434
+ monochrome?: boolean;
435
+ };
436
+ }
@@ -193,6 +193,19 @@ export declare enum CirclePack {
193
193
  CIRCLE_MOUSEOUT = "circle-leaf-mouseout",
194
194
  CIRCLE_MOUSEMOVE = "circle-leaf-mousemove"
195
195
  }
196
+ /**
197
+ * enum of all alluvial related events
198
+ */
199
+ export declare enum Alluvial {
200
+ NODE_MOUSEOVER = "alluvial-node-mouseover",
201
+ NODE_CLICK = "alluvial-node-click",
202
+ NODE_MOUSEOUT = "alluvial-node-mouseout",
203
+ NODE_MOUSEMOVE = "alluvial-node-mousemove",
204
+ LINE_MOUSEOVER = "alluvial-line-mouseover",
205
+ LINE_CLICK = "alluvial-line-click",
206
+ LINE_MOUSEOUT = "alluvial-line-mouseout",
207
+ LINE_MOUSEMOVE = "alluvial-line-mousemove"
208
+ }
196
209
  /**
197
210
  * enum of all meter related events
198
211
  */