@carbon/charts 0.41.62 → 0.41.66

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 (101) hide show
  1. package/CHANGELOG.md +34 -3
  2. package/build/demo/data/CHART_TYPES.d.ts +5 -0
  3. package/build/demo/data/circle-pack.d.ts +82 -0
  4. package/build/demo/data/index.d.ts +1 -0
  5. package/build/src/charts/circle-pack.d.ts +8 -0
  6. package/build/src/charts/index.d.ts +1 -0
  7. package/build/src/components/essentials/canvas-chart-clip.d.ts +6 -0
  8. package/build/src/components/graphs/circle-pack.d.ts +17 -0
  9. package/build/src/components/index.d.ts +2 -0
  10. package/build/src/configuration-non-customizable.d.ts +35 -10
  11. package/build/src/configuration.d.ts +2 -1
  12. package/build/src/interfaces/charts.d.ts +12 -0
  13. package/build/src/interfaces/enums.d.ts +2 -1
  14. package/build/src/interfaces/events.d.ts +16 -0
  15. package/build/src/model-circle-pack.d.ts +26 -0
  16. package/build/src/services/canvas-zoom.d.ts +11 -0
  17. package/build/src/services/index.d.ts +1 -0
  18. package/bundle.js +1 -1
  19. package/chart.js +8 -2
  20. package/chart.js.map +1 -1
  21. package/charts/circle-pack.d.ts +8 -0
  22. package/charts/circle-pack.js +45 -0
  23. package/charts/circle-pack.js.map +1 -0
  24. package/charts/index.d.ts +1 -0
  25. package/charts/index.js +1 -0
  26. package/charts/index.js.map +1 -1
  27. package/components/essentials/canvas-chart-clip.d.ts +6 -0
  28. package/components/essentials/canvas-chart-clip.js +46 -0
  29. package/components/essentials/canvas-chart-clip.js.map +1 -0
  30. package/components/essentials/legend.js +39 -1
  31. package/components/essentials/legend.js.map +1 -1
  32. package/components/essentials/tooltip.js +6 -3
  33. package/components/essentials/tooltip.js.map +1 -1
  34. package/components/graphs/bar-simple.js +16 -2
  35. package/components/graphs/bar-simple.js.map +1 -1
  36. package/components/graphs/circle-pack.d.ts +17 -0
  37. package/components/graphs/circle-pack.js +349 -0
  38. package/components/graphs/circle-pack.js.map +1 -0
  39. package/components/index.d.ts +2 -0
  40. package/components/index.js +2 -0
  41. package/components/index.js.map +1 -1
  42. package/configuration-non-customizable.d.ts +35 -10
  43. package/configuration-non-customizable.js +30 -10
  44. package/configuration-non-customizable.js.map +1 -1
  45. package/configuration.d.ts +2 -1
  46. package/configuration.js +10 -0
  47. package/configuration.js.map +1 -1
  48. package/demo/data/CHART_TYPES.d.ts +5 -0
  49. package/demo/data/CHART_TYPES.js +5 -0
  50. package/demo/data/CHART_TYPES.js.map +1 -1
  51. package/demo/data/bundle.js +1 -1
  52. package/demo/data/circle-pack.d.ts +82 -0
  53. package/demo/data/circle-pack.js +215 -0
  54. package/demo/data/circle-pack.js.map +1 -0
  55. package/demo/data/index.d.ts +1 -0
  56. package/demo/data/index.js +33 -0
  57. package/demo/data/index.js.map +1 -1
  58. package/demo/styles.css +200 -32
  59. package/demo/styles.css.map +1 -1
  60. package/demo/styles.min.css +1 -1
  61. package/demo/styles.min.css.map +1 -1
  62. package/demo/tsconfig.tsbuildinfo +18 -4
  63. package/interfaces/charts.d.ts +12 -0
  64. package/interfaces/charts.js.map +1 -1
  65. package/interfaces/enums.d.ts +2 -1
  66. package/interfaces/enums.js +1 -0
  67. package/interfaces/enums.js.map +1 -1
  68. package/interfaces/events.d.ts +16 -0
  69. package/interfaces/events.js +18 -0
  70. package/interfaces/events.js.map +1 -1
  71. package/model-circle-pack.d.ts +26 -0
  72. package/model-circle-pack.js +137 -0
  73. package/model-circle-pack.js.map +1 -0
  74. package/package.json +2 -2
  75. package/services/canvas-zoom.d.ts +11 -0
  76. package/services/canvas-zoom.js +72 -0
  77. package/services/canvas-zoom.js.map +1 -0
  78. package/services/index.d.ts +1 -0
  79. package/services/index.js +1 -0
  80. package/services/index.js.map +1 -1
  81. package/styles/components/_legend.scss +6 -0
  82. package/styles/components/_tooltip.scss +33 -10
  83. package/styles/graphs/_circle-pack.scss +38 -0
  84. package/styles/graphs/index.scss +1 -0
  85. package/styles-g10.css +52 -8
  86. package/styles-g10.css.map +1 -1
  87. package/styles-g10.min.css +1 -1
  88. package/styles-g10.min.css.map +1 -1
  89. package/styles-g100.css +52 -8
  90. package/styles-g100.css.map +1 -1
  91. package/styles-g100.min.css +1 -1
  92. package/styles-g100.min.css.map +1 -1
  93. package/styles-g90.css +52 -8
  94. package/styles-g90.css.map +1 -1
  95. package/styles-g90.min.css +1 -1
  96. package/styles-g90.min.css.map +1 -1
  97. package/styles.css +52 -8
  98. package/styles.css.map +1 -1
  99. package/styles.min.css +1 -1
  100. package/styles.min.css.map +1 -1
  101. package/tsconfig.tsbuildinfo +152 -39
package/CHANGELOG.md CHANGED
@@ -3,16 +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.41.62](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.61...v0.41.62) (2021-04-29)
6
+ ## [0.41.66](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.65...v0.41.66) (2021-05-25)
7
+
8
+ **Note:** Version bump only for package @carbon/charts
7
9
 
8
10
 
9
- ### Bug Fixes
10
11
 
11
- * **core:** fix minor bug with data values that are undefined ([#1007](https://github.com/carbon-design-system/carbon-charts/issues/1007)) ([5c4db99](https://github.com/carbon-design-system/carbon-charts/commit/5c4db996e3aaf5b8c8146b686945c9eb4a191b46))
12
12
 
13
13
 
14
+ ## [0.41.65](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.64...v0.41.65) (2021-05-19)
15
+
16
+ **Note:** Version bump only for package @carbon/charts
17
+
18
+
19
+
20
+
21
+
22
+ # Change Log
23
+
24
+ All notable changes to this project will be documented in this file. See
25
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
14
26
 
27
+ ## [0.41.64](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.63...v0.41.64) (2021-05-10)
28
+
29
+ **Note:** Version bump only for package @carbon/charts
30
+
31
+ ## [0.41.63](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.62...v0.41.63) (2021-05-10)
32
+
33
+ **Note:** Version bump only for package @carbon/charts
34
+
35
+ # Change Log
36
+
37
+ All notable changes to this project will be documented in this file. See
38
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
39
+
40
+ ## [0.41.62](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.61...v0.41.62) (2021-04-29)
41
+
42
+ ### Bug Fixes
15
43
 
44
+ - **core:** fix minor bug with data values that are undefined
45
+ ([#1007](https://github.com/carbon-design-system/carbon-charts/issues/1007))
46
+ ([5c4db99](https://github.com/carbon-design-system/carbon-charts/commit/5c4db996e3aaf5b8c8146b686945c9eb4a191b46))
16
47
 
17
48
  # Change Log
18
49
 
@@ -14,6 +14,11 @@ declare const _default: {
14
14
  angular: string;
15
15
  vue: string;
16
16
  };
17
+ CirclePackChart: {
18
+ vanilla: string;
19
+ angular: string;
20
+ vue: string;
21
+ };
17
22
  BulletChart: {
18
23
  vanilla: string;
19
24
  angular: string;
@@ -0,0 +1,82 @@
1
+ export declare const circlePackTwoLevelData: {
2
+ name: string;
3
+ children: {
4
+ name: string;
5
+ value: number;
6
+ }[];
7
+ }[];
8
+ export declare const circlePackTwoLevelOptions: {
9
+ experimental: string;
10
+ title: string;
11
+ canvasZoom: {
12
+ enabled: boolean;
13
+ };
14
+ };
15
+ export declare const circlePackSingleOptions: {
16
+ experimental: string;
17
+ title: string;
18
+ canvasZoom: {
19
+ enabled: boolean;
20
+ };
21
+ };
22
+ export declare const circlePackSingleLevelData: {
23
+ name: string;
24
+ value: number;
25
+ }[];
26
+ export declare const circlePackThreeLevelOptions: {
27
+ experimental: string;
28
+ title: string;
29
+ canvasZoom: {
30
+ enabled: boolean;
31
+ };
32
+ };
33
+ export declare const circlePackThreeLevelData: {
34
+ name: string;
35
+ children: ({
36
+ name: string;
37
+ children: {
38
+ name: string;
39
+ value: number;
40
+ }[];
41
+ value?: undefined;
42
+ } | {
43
+ name: string;
44
+ value: number;
45
+ children?: undefined;
46
+ })[];
47
+ }[];
48
+ export declare const circlePackThreeLevelsMonochromeOptions: {
49
+ experimental: string;
50
+ title: string;
51
+ canvasZoom: {
52
+ enabled: boolean;
53
+ };
54
+ };
55
+ export declare const circlePackThreeLevelsMonochromeData: {
56
+ name: string;
57
+ children: {
58
+ name: string;
59
+ children: ({
60
+ name: string;
61
+ children: {
62
+ name: string;
63
+ value: number;
64
+ }[];
65
+ value?: undefined;
66
+ } | {
67
+ name: string;
68
+ value: number;
69
+ children?: undefined;
70
+ })[];
71
+ }[];
72
+ }[];
73
+ export declare const circlePackThreeLevelNoZoomOptions: {
74
+ experimental: string;
75
+ title: string;
76
+ circlePack: {
77
+ hierarchyLevel: number;
78
+ };
79
+ canvasZoom: {
80
+ enabled: boolean;
81
+ };
82
+ };
@@ -15,6 +15,7 @@ export * from './scatter';
15
15
  export * from './step';
16
16
  export * from './time-series-axis';
17
17
  export * from './treemap';
18
+ export * from './circle-pack';
18
19
  export * from './toolbar';
19
20
  export * from './wordcloud';
20
21
  export * from './zoom-bar';
@@ -0,0 +1,8 @@
1
+ import { Chart } from '../chart';
2
+ import { CirclePackChartModel } from './../model-circle-pack';
3
+ import { ChartConfig, CirclePackChartOptions } from '../interfaces/index';
4
+ export declare class CirclePackChart extends Chart {
5
+ model: CirclePackChartModel;
6
+ constructor(holder: Element, chartConfigs: ChartConfig<CirclePackChartOptions>);
7
+ getComponents(): any[];
8
+ }
@@ -16,4 +16,5 @@ export * from './radar';
16
16
  export * from './gauge';
17
17
  export * from './combo';
18
18
  export * from './treemap';
19
+ export * from './circle-pack';
19
20
  export * from './wordcloud';
@@ -0,0 +1,6 @@
1
+ import { ChartClip } from './../axes/chart-clip';
2
+ export declare class CanvasChartClip extends ChartClip {
3
+ type: string;
4
+ chartClipId: string;
5
+ createClipPath(): void;
6
+ }
@@ -0,0 +1,17 @@
1
+ import { Component } from '../component';
2
+ export declare class CirclePack extends Component {
3
+ type: string;
4
+ focal: any;
5
+ render(animate?: boolean): void;
6
+ unhighlightChildren(childData: any): void;
7
+ highlightChildren(childData: any, classname?: any): void;
8
+ getZoomClass(node: any): "focal" | "non-focal";
9
+ addLegendListeners(): void;
10
+ removeBackgroundListeners(): void;
11
+ setBackgroundListeners(): void;
12
+ handleLegendOnHover: (event: CustomEvent<any>) => void;
13
+ handleLegendMouseOut: (event: CustomEvent<any>) => void;
14
+ getZoomIcon(): string;
15
+ addEventListeners(): void;
16
+ destroy(): void;
17
+ }
@@ -5,6 +5,7 @@ export * from './essentials/title';
5
5
  export * from './essentials/title-meter';
6
6
  export * from './essentials/tooltip';
7
7
  export * from './essentials/tooltip-axis';
8
+ export * from './essentials/canvas-chart-clip';
8
9
  export * from './graphs/area';
9
10
  export * from './graphs/area-stacked';
10
11
  export * from './graphs/bar-simple';
@@ -24,6 +25,7 @@ export * from './graphs/skeleton';
24
25
  export * from './graphs/skeleton-lines';
25
26
  export * from './graphs/treemap';
26
27
  export * from './graphs/radar';
28
+ export * from './graphs/circle-pack';
27
29
  export * from './graphs/wordcloud';
28
30
  export * from './layout/spacer';
29
31
  export * from './layout/layout';
@@ -1,14 +1,5 @@
1
1
  import { ZoomBarTypes } from './interfaces';
2
- export declare const color: {
3
- pairingOptions: {
4
- '1-color': number;
5
- '2-color': number;
6
- '3-color': number;
7
- '4-color': number;
8
- '5-color': number;
9
- '14-color': number;
10
- };
11
- };
2
+ import { easeCubicInOut } from 'd3-ease';
12
3
  export declare const area: {
13
4
  opacity: {
14
5
  unselected: number;
@@ -28,6 +19,31 @@ export declare const axis: {
28
19
  };
29
20
  paddingRatio: number;
30
21
  };
22
+ export declare const canvasZoomSettings: {
23
+ duration: number;
24
+ ease: typeof easeCubicInOut;
25
+ zoomLevel: number;
26
+ };
27
+ export declare const circlePack: {
28
+ circles: {
29
+ fillOpacity: number;
30
+ };
31
+ padding: {
32
+ mainGroup: number;
33
+ children: number;
34
+ };
35
+ hierarchyLevel: number;
36
+ };
37
+ export declare const color: {
38
+ pairingOptions: {
39
+ '1-color': number;
40
+ '2-color': number;
41
+ '3-color': number;
42
+ '4-color': number;
43
+ '5-color': number;
44
+ '14-color': number;
45
+ };
46
+ };
31
47
  export declare const boxplot: {
32
48
  circle: {
33
49
  radius: number;
@@ -99,6 +115,15 @@ export declare const legend: {
99
115
  height: number;
100
116
  }[];
101
117
  };
118
+ zoom: {
119
+ iconData: {
120
+ x: number;
121
+ y: number;
122
+ width: number;
123
+ height: number;
124
+ }[];
125
+ color: string;
126
+ };
102
127
  };
103
128
  export declare const lines: {
104
129
  opacity: {
@@ -1,4 +1,4 @@
1
- import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, BulletChartOptions, RadarChartOptions, ComboChartOptions, TreemapChartOptions, WorldCloudChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions } from './interfaces';
1
+ import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, BulletChartOptions, RadarChartOptions, ComboChartOptions, TreemapChartOptions, CirclePackChartOptions, WorldCloudChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions } from './interfaces';
2
2
  /**
3
3
  * Grid options
4
4
  */
@@ -33,6 +33,7 @@ export declare const options: {
33
33
  gaugeChart: GaugeChartOptions;
34
34
  comboChart: ComboChartOptions;
35
35
  treemapChart: TreemapChartOptions;
36
+ circlePackChart: CirclePackChartOptions;
36
37
  wordCloudChart: WorldCloudChartOptions;
37
38
  };
38
39
  export * from './configuration-non-customizable';
@@ -348,3 +348,15 @@ export interface ComboChartOptions extends AxisChartOptions {
348
348
  }
349
349
  export interface TreemapChartOptions extends BaseChartOptions {
350
350
  }
351
+ export interface CirclePackChartOptions extends BaseChartOptions {
352
+ circlePack?: {
353
+ circles: {
354
+ fillOpacity: number;
355
+ };
356
+ hierachyLevel: number;
357
+ padding?: {
358
+ outer?: number;
359
+ inner?: number;
360
+ };
361
+ };
362
+ }
@@ -198,5 +198,6 @@ export declare enum LegendItemType {
198
198
  AREA = "area",
199
199
  SIZE = "size",
200
200
  LINE = "line",
201
- QUARTILE = "quartile"
201
+ QUARTILE = "quartile",
202
+ ZOOM = "zoom"
202
203
  }
@@ -35,6 +35,13 @@ export declare enum ZoomBar {
35
35
  export declare enum ZoomDomain {
36
36
  CHANGE = "zoom-domain-change"
37
37
  }
38
+ /** enum of all events related to canvas zoom *
39
+ *
40
+ */
41
+ export declare enum CanvasZoom {
42
+ CANVAS_ZOOM_IN = "canvas-zoom-in",
43
+ CANVAS_ZOOM_OUT = "canvas-zoom-out"
44
+ }
38
45
  /**
39
46
  * enum of all axis-related events
40
47
  */
@@ -162,3 +169,12 @@ export declare enum Legend {
162
169
  ITEM_MOUSEOUT = "legend-item-onmouseout",
163
170
  ITEMS_UPDATE = "legend-items-update"
164
171
  }
172
+ /**
173
+ * enum of all circlepack related events
174
+ */
175
+ export declare enum CirclePack {
176
+ CIRCLE_MOUSEOVER = "circle-leaf-mouseover",
177
+ CIRCLE_CLICK = "circle-leaf-click",
178
+ CIRCLE_MOUSEOUT = "circle-leaf-mouseout",
179
+ CIRCLE_MOUSEMOVE = "circle-leaf-mousemove"
180
+ }
@@ -0,0 +1,26 @@
1
+ import { ChartModel } from './model';
2
+ import { LegendItemType } from './interfaces/enums';
3
+ /** The charting model layer which includes mainly the chart data and options,
4
+ * as well as some misc. information to be shared among components */
5
+ export declare class CirclePackChartModel extends ChartModel {
6
+ parentNode: boolean;
7
+ constructor(services: any);
8
+ setData(newData: any): void;
9
+ setOptions(newOptions: any): void;
10
+ getZoomOptions(options?: any): {
11
+ legend?: undefined;
12
+ } | {
13
+ legend: {
14
+ additionalItems: {
15
+ type: LegendItemType;
16
+ name: string;
17
+ }[];
18
+ };
19
+ };
20
+ setZoom(options?: any): void;
21
+ updateHierarchyLevel(depth: number): void;
22
+ getHierarchyLevel(): any;
23
+ hasParentNode(): boolean;
24
+ setDataGroups(): void;
25
+ protected setChildrenDataGroup(node: any, name: any): any;
26
+ }
@@ -0,0 +1,11 @@
1
+ import { Service } from './service';
2
+ export declare class CanvasZoom extends Service {
3
+ protected model: any;
4
+ /**
5
+ * focal: object to zoom into
6
+ * canvasElements: all the elements to translate and zoom on the chart area
7
+ * zoomSettings: object containing duration, easing and zoomlevel for the zoom behaviours
8
+ * */
9
+ zoomIn(focal: any, canvasElements: any, zoomSettings?: any): void;
10
+ zoomOut(canvasElements: any, zoomSettings?: any): void;
11
+ }
@@ -5,3 +5,4 @@ export * from './essentials/gradient-utils';
5
5
  export * from './scales-cartesian';
6
6
  export * from './curves';
7
7
  export * from './zoom';
8
+ export * from './canvas-zoom';