@carbon/charts 0.40.12 → 0.41.1

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 (106) hide show
  1. package/CHANGELOG.md +39 -7
  2. package/build/demo/data/index.d.ts +6 -0
  3. package/build/demo/data/treemap.d.ts +15 -0
  4. package/build/src/charts/gauge.d.ts +2 -0
  5. package/build/src/charts/index.d.ts +1 -0
  6. package/build/src/charts/treemap.d.ts +6 -0
  7. package/build/src/components/graphs/treemap.d.ts +9 -0
  8. package/build/src/components/index.d.ts +1 -0
  9. package/build/src/configuration.d.ts +2 -1
  10. package/build/src/interfaces/charts.d.ts +7 -1
  11. package/build/src/interfaces/events.d.ts +9 -0
  12. package/build/src/model-cartesian-charts.d.ts +2 -0
  13. package/build/src/model-gauge.d.ts +6 -0
  14. package/build/src/model.d.ts +0 -1
  15. package/build/src/services/essentials/dom-utils.d.ts +1 -0
  16. package/build/src/tools.d.ts +1 -0
  17. package/bundle.js +1 -1
  18. package/charts/gauge.d.ts +2 -0
  19. package/charts/gauge.js +2 -0
  20. package/charts/gauge.js.map +1 -1
  21. package/charts/index.d.ts +1 -0
  22. package/charts/index.js +1 -0
  23. package/charts/index.js.map +1 -1
  24. package/charts/treemap.d.ts +6 -0
  25. package/charts/treemap.js +41 -0
  26. package/charts/treemap.js.map +1 -0
  27. package/components/axes/two-dimensional-axes.js +4 -0
  28. package/components/axes/two-dimensional-axes.js.map +1 -1
  29. package/components/axes/zoom-bar.js +1 -2
  30. package/components/axes/zoom-bar.js.map +1 -1
  31. package/components/essentials/legend.js +2 -0
  32. package/components/essentials/legend.js.map +1 -1
  33. package/components/essentials/tooltip.js +7 -4
  34. package/components/essentials/tooltip.js.map +1 -1
  35. package/components/graphs/bar-grouped.js +1 -0
  36. package/components/graphs/bar-grouped.js.map +1 -1
  37. package/components/graphs/bar-stacked.js +1 -0
  38. package/components/graphs/bar-stacked.js.map +1 -1
  39. package/components/graphs/gauge.js +23 -16
  40. package/components/graphs/gauge.js.map +1 -1
  41. package/components/graphs/treemap.d.ts +9 -0
  42. package/components/graphs/treemap.js +291 -0
  43. package/components/graphs/treemap.js.map +1 -0
  44. package/components/index.d.ts +1 -0
  45. package/components/index.js +1 -0
  46. package/components/index.js.map +1 -1
  47. package/configuration.d.ts +2 -1
  48. package/configuration.js +12 -2
  49. package/configuration.js.map +1 -1
  50. package/demo/data/bundle.js +1 -1
  51. package/demo/data/gauge.js +2 -2
  52. package/demo/data/gauge.js.map +1 -1
  53. package/demo/data/index.d.ts +6 -0
  54. package/demo/data/index.js +17 -0
  55. package/demo/data/index.js.map +1 -1
  56. package/demo/data/treemap.d.ts +15 -0
  57. package/demo/data/treemap.js +93 -0
  58. package/demo/data/treemap.js.map +1 -0
  59. package/demo/styles.css +303 -274
  60. package/demo/styles.css.map +1 -1
  61. package/demo/styles.min.css +1 -1
  62. package/demo/styles.min.css.map +1 -1
  63. package/demo/tsconfig.tsbuildinfo +26 -12
  64. package/interfaces/charts.d.ts +7 -1
  65. package/interfaces/charts.js.map +1 -1
  66. package/interfaces/events.d.ts +9 -0
  67. package/interfaces/events.js +10 -0
  68. package/interfaces/events.js.map +1 -1
  69. package/model-cartesian-charts.d.ts +2 -0
  70. package/model-cartesian-charts.js +35 -1
  71. package/model-cartesian-charts.js.map +1 -1
  72. package/model-gauge.d.ts +6 -0
  73. package/model-gauge.js +28 -0
  74. package/model-gauge.js.map +1 -0
  75. package/model.d.ts +0 -1
  76. package/model.js +1 -30
  77. package/model.js.map +1 -1
  78. package/package.json +2 -2
  79. package/services/essentials/dom-utils.d.ts +1 -0
  80. package/services/essentials/dom-utils.js +19 -0
  81. package/services/essentials/dom-utils.js.map +1 -1
  82. package/styles/_chart-holder.scss +5 -0
  83. package/styles/colors.scss +1 -1
  84. package/styles/components/_toolbar.scss +2 -2
  85. package/styles/graphs/_treemap.scss +7 -0
  86. package/styles/graphs/index.scss +1 -0
  87. package/styles-g10.css +75 -67
  88. package/styles-g10.css.map +1 -1
  89. package/styles-g10.min.css +1 -1
  90. package/styles-g10.min.css.map +1 -1
  91. package/styles-g100.css +75 -67
  92. package/styles-g100.css.map +1 -1
  93. package/styles-g100.min.css +1 -1
  94. package/styles-g100.min.css.map +1 -1
  95. package/styles-g90.css +75 -67
  96. package/styles-g90.css.map +1 -1
  97. package/styles-g90.min.css +1 -1
  98. package/styles-g90.min.css.map +1 -1
  99. package/styles.css +75 -67
  100. package/styles.css.map +1 -1
  101. package/styles.min.css +1 -1
  102. package/styles.min.css.map +1 -1
  103. package/tools.d.ts +1 -0
  104. package/tools.js +2 -1
  105. package/tools.js.map +1 -1
  106. package/tsconfig.tsbuildinfo +99 -613
package/CHANGELOG.md CHANGED
@@ -3,37 +3,69 @@
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.40.12](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.11...v0.40.12) (2020-11-06)
6
+ ## [0.41.1](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.0...v0.41.1) (2020-11-10)
7
7
 
8
- **Note:** Version bump only for package @carbon/charts
9
8
 
9
+ ### Bug Fixes
10
10
 
11
+ * **core:** correct axis title paddings in y-axes ([#873](https://github.com/carbon-design-system/carbon-charts/issues/873)) ([8a27a5f](https://github.com/carbon-design-system/carbon-charts/commit/8a27a5f65cbc55a878e603c9aa96c6f38d6ea10d)), closes [#859](https://github.com/carbon-design-system/carbon-charts/issues/859)
11
12
 
12
13
 
13
14
 
14
- ## [0.40.11](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.10...v0.40.11) (2020-11-03)
15
15
 
16
- **Note:** Version bump only for package @carbon/charts
17
16
 
17
+ # Change Log
18
18
 
19
+ All notable changes to this project will be documented in this file. See
20
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
19
21
 
22
+ # [0.41.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.14...v0.41.0) (2020-11-10)
20
23
 
21
24
 
22
- ## [0.40.10](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.9...v0.40.10) (2020-11-03)
25
+ ### Bug Fixes
23
26
 
24
- **Note:** Version bump only for package @carbon/charts
27
+ * use fill:none to allow transparent toolbar control background ([#858](https://github.com/carbon-design-system/carbon-charts/issues/858)) ([e4bf1bf](https://github.com/carbon-design-system/carbon-charts/commit/e4bf1bf45f59b5a4521aa2b6e5856715f148b1d5))
28
+ * **core:** only set zoombar data and sanitize date values if a cartesian time-series chart ([88c8fa1](https://github.com/carbon-design-system/carbon-charts/commit/88c8fa1feee0d8866608bc39426638afb1c81294))
25
29
 
26
30
 
31
+ ### Features
27
32
 
33
+ * **core:** add alignment options for gauge charts ([#877](https://github.com/carbon-design-system/carbon-charts/issues/877)) ([5d4a621](https://github.com/carbon-design-system/carbon-charts/commit/5d4a621e4b92e3e1fdaa9a3318467c84379e8881))
28
34
 
29
35
 
30
- ## [0.40.9](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.8...v0.40.9) (2020-11-03)
36
+
37
+
38
+
39
+ ## [0.40.14](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.13...v0.40.14) (2020-11-09)
40
+
41
+
42
+ ### Bug Fixes
43
+
44
+ * **core:** replace import to lodash with lodash-es ([700ba09](https://github.com/carbon-design-system/carbon-charts/commit/700ba0989ca130c2b750acc868b5bc36192f6f07))
45
+
46
+
47
+
48
+
49
+
50
+ ## [0.40.13](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.12...v0.40.13) (2020-11-06)
51
+
52
+ **Note:** Version bump only for package @carbon/charts
53
+
54
+ ## [0.40.12](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.11...v0.40.12) (2020-11-06)
31
55
 
32
56
  **Note:** Version bump only for package @carbon/charts
33
57
 
58
+ ## [0.40.11](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.10...v0.40.11) (2020-11-03)
34
59
 
60
+ **Note:** Version bump only for package @carbon/charts
35
61
 
62
+ ## [0.40.10](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.9...v0.40.10) (2020-11-03)
36
63
 
64
+ **Note:** Version bump only for package @carbon/charts
65
+
66
+ ## [0.40.9](https://github.com/carbon-design-system/carbon-charts/compare/v0.40.8...v0.40.9) (2020-11-03)
67
+
68
+ **Note:** Version bump only for package @carbon/charts
37
69
 
38
70
  # Change Log
39
71
 
@@ -9,6 +9,7 @@ export * from "./gauge";
9
9
  export * from "./scatter";
10
10
  export * from "./step";
11
11
  export * from "./radar";
12
+ export * from "./treemap";
12
13
  export declare const chartTypes: {
13
14
  AreaChart: {
14
15
  vanilla: string;
@@ -75,6 +76,11 @@ export declare const chartTypes: {
75
76
  angular: string;
76
77
  vue: string;
77
78
  };
79
+ TreemapChart: {
80
+ vanilla: string;
81
+ angular: string;
82
+ vue: string;
83
+ };
78
84
  };
79
85
  export declare const storybookDemoGroups: any;
80
86
  export declare const demoGroups: any;
@@ -0,0 +1,15 @@
1
+ export declare const treemapData: {
2
+ name: string;
3
+ children: ({
4
+ name: string;
5
+ value: number;
6
+ showLabel: boolean;
7
+ } | {
8
+ name: string;
9
+ value: number;
10
+ showLabel?: undefined;
11
+ })[];
12
+ }[];
13
+ export declare const treemapOptions: {
14
+ title: string;
15
+ };
@@ -1,6 +1,8 @@
1
1
  import { Chart } from "../chart";
2
2
  import { ChartConfig, GaugeChartOptions } from "../interfaces/index";
3
+ import { GaugeChartModel } from "./../model-gauge";
3
4
  export declare class GaugeChart extends Chart {
5
+ model: GaugeChartModel;
4
6
  constructor(holder: Element, chartConfigs: ChartConfig<GaugeChartOptions>);
5
7
  getComponents(): any[];
6
8
  }
@@ -11,3 +11,4 @@ export * from "./donut";
11
11
  export * from "./meter";
12
12
  export * from "./radar";
13
13
  export * from "./gauge";
14
+ export * from "./treemap";
@@ -0,0 +1,6 @@
1
+ import { Chart } from "../chart";
2
+ import { ChartConfig, TreemapChartOptions } from "../interfaces/index";
3
+ export declare class TreemapChart extends Chart {
4
+ constructor(holder: Element, chartConfigs: ChartConfig<TreemapChartOptions>);
5
+ getComponents(): any[];
6
+ }
@@ -0,0 +1,9 @@
1
+ import { Component } from "../component";
2
+ export declare class Treemap extends Component {
3
+ type: string;
4
+ init(): void;
5
+ render(animate?: boolean): void;
6
+ addEventListeners(): void;
7
+ handleLegendOnHover: (event: CustomEvent<any>) => void;
8
+ handleLegendMouseOut: (event: CustomEvent<any>) => void;
9
+ }
@@ -19,6 +19,7 @@ export * from "./graphs/gauge";
19
19
  export * from "./graphs/donut";
20
20
  export * from "./graphs/skeleton";
21
21
  export * from "./graphs/skeleton-lines";
22
+ export * from "./graphs/treemap";
22
23
  export * from "./layout/spacer";
23
24
  export * from "./layout/layout";
24
25
  export * from "./axes/two-dimensional-axes";
@@ -1,4 +1,4 @@
1
- import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, RadarChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions } from "./interfaces";
1
+ import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, RadarChartOptions, TreemapChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions } from "./interfaces";
2
2
  /**
3
3
  * Grid options
4
4
  */
@@ -28,5 +28,6 @@ export declare const options: {
28
28
  meterChart: MeterChartOptions;
29
29
  radarChart: RadarChartOptions;
30
30
  gaugeChart: GaugeChartOptions;
31
+ treemapChart: TreemapChartOptions;
31
32
  };
32
33
  export * from "./configuration-non-customizable";
@@ -213,7 +213,7 @@ export interface PieChartOptions extends BaseChartOptions {
213
213
  /**
214
214
  * options specific to gauge charts
215
215
  */
216
- export interface GaugeChartOptions extends PieChartOptions {
216
+ export interface GaugeChartOptions extends BaseChartOptions {
217
217
  gauge?: {
218
218
  arcWidth?: number;
219
219
  deltaArrow?: {
@@ -227,6 +227,7 @@ export interface GaugeChartOptions extends PieChartOptions {
227
227
  numberFormatter?: Function;
228
228
  valueFontSize?: Function;
229
229
  type?: GaugeTypes;
230
+ alignment?: Alignments;
230
231
  };
231
232
  }
232
233
  /**
@@ -269,3 +270,8 @@ export interface RadarChartOptions extends BaseChartOptions {
269
270
  alignment?: Alignments;
270
271
  };
271
272
  }
273
+ /**
274
+ * options specific to treemap charts
275
+ */
276
+ export interface TreemapChartOptions extends BaseChartOptions {
277
+ }
@@ -107,6 +107,15 @@ export declare enum Radar {
107
107
  X_AXIS_CLICK = "radar-x-axis-click",
108
108
  X_AXIS_MOUSEOUT = "radar-x-axis-mouseout"
109
109
  }
110
+ /**
111
+ * enum of all treemap graph events
112
+ */
113
+ export declare enum Treemap {
114
+ LEAF_MOUSEOVER = "leaf-mouseover",
115
+ LEAF_MOUSEMOVE = "leaf-mousemove",
116
+ LEAF_CLICK = "leaf-click",
117
+ LEAF_MOUSEOUT = "leaf-mouseout"
118
+ }
110
119
  /**
111
120
  * enum of all tooltip events
112
121
  */
@@ -10,4 +10,6 @@ export declare class ChartModelCartesian extends ChartModel {
10
10
  */
11
11
  setZoomBarData(newZoomBarData?: any): void;
12
12
  getZoomBarData(): any;
13
+ protected sanitizeDateValues(data: any): any;
14
+ protected sanitize(data: any): any;
13
15
  }
@@ -0,0 +1,6 @@
1
+ import { ChartModel } from "./model";
2
+ /** The gauge chart model layer */
3
+ export declare class GaugeChartModel extends ChartModel {
4
+ constructor(services: any);
5
+ getDataGroups(): any;
6
+ }
@@ -85,7 +85,6 @@ export declare class ChartModel {
85
85
  */
86
86
  protected transformToTabularData(data: any): any[];
87
87
  protected getTabularData(data: any): any[];
88
- protected sanitizeDateValues(data: any): any;
89
88
  protected sanitize(data: any): any;
90
89
  protected updateAllDataGroups(): void;
91
90
  protected generateDataGroups(data: any): {
@@ -12,6 +12,7 @@ export declare class DOMUtils extends Service {
12
12
  styleHolderElement(): void;
13
13
  getHolder(): any;
14
14
  addSVGElement(): void;
15
+ verifyCSSStylesBeingApplied(): void;
15
16
  setSVGMaxHeight(): void;
16
17
  getMainSVG(): Element;
17
18
  addHolderListeners(): void;
@@ -6,6 +6,7 @@ export declare namespace Tools {
6
6
  export const merge: any;
7
7
  export const removeArrayDuplicates: any;
8
8
  export const clamp: any;
9
+ export const isEmpty: any;
9
10
  export const isEqual: any;
10
11
  export const flatMapDeep: any;
11
12
  export const kebabCase: any;