@carbon/charts 0.50.9 → 0.51.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 (165) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/build/demo/data/circle-pack.d.ts +0 -6
  3. package/build/src/charts/alluvial.d.ts +2 -0
  4. package/build/src/charts/bullet.d.ts +2 -0
  5. package/build/src/charts/radar.d.ts +3 -1
  6. package/build/src/charts/tree.d.ts +2 -0
  7. package/build/src/charts/treemap.d.ts +2 -0
  8. package/build/src/charts/wordcloud.d.ts +2 -0
  9. package/build/src/components/axes/toolbar.d.ts +4 -0
  10. package/build/src/components/essentials/legend.d.ts +1 -1
  11. package/build/src/components/graphs/bullet.d.ts +0 -1
  12. package/build/src/model/alluvial.d.ts +8 -0
  13. package/build/src/model/boxplot.d.ts +1 -0
  14. package/build/src/model/bullet.d.ts +14 -0
  15. package/build/src/model/cartesian-charts.d.ts +0 -1
  16. package/build/src/model/circle-pack.d.ts +10 -0
  17. package/build/src/model/gauge.d.ts +4 -1
  18. package/build/src/model/meter.d.ts +1 -0
  19. package/build/src/model/model.d.ts +2 -0
  20. package/build/src/model/pie.d.ts +1 -0
  21. package/build/src/model/radar.d.ts +7 -0
  22. package/build/src/model/tree.d.ts +14 -0
  23. package/build/src/model/treemap.d.ts +8 -0
  24. package/build/src/model/wordcloud.d.ts +7 -0
  25. package/build/src/services/essentials/dom-utils.d.ts +3 -0
  26. package/bundle.js +1 -1
  27. package/chart.js +42 -20
  28. package/chart.js.map +1 -1
  29. package/charts/alluvial.d.ts +2 -0
  30. package/charts/alluvial.js +2 -0
  31. package/charts/alluvial.js.map +1 -1
  32. package/charts/bullet.d.ts +2 -0
  33. package/charts/bullet.js +2 -0
  34. package/charts/bullet.js.map +1 -1
  35. package/charts/radar.d.ts +3 -1
  36. package/charts/radar.js +3 -7
  37. package/charts/radar.js.map +1 -1
  38. package/charts/tree.d.ts +2 -0
  39. package/charts/tree.js +2 -0
  40. package/charts/tree.js.map +1 -1
  41. package/charts/treemap.d.ts +2 -0
  42. package/charts/treemap.js +2 -0
  43. package/charts/treemap.js.map +1 -1
  44. package/charts/wordcloud.d.ts +2 -0
  45. package/charts/wordcloud.js +3 -0
  46. package/charts/wordcloud.js.map +1 -1
  47. package/components/axes/toolbar.d.ts +4 -0
  48. package/components/axes/toolbar.js +147 -58
  49. package/components/axes/toolbar.js.map +1 -1
  50. package/components/axes/zoom-bar.js +12 -3
  51. package/components/axes/zoom-bar.js.map +1 -1
  52. package/components/component.js +2 -6
  53. package/components/component.js.map +1 -1
  54. package/components/essentials/legend.d.ts +1 -1
  55. package/components/essentials/legend.js +36 -10
  56. package/components/essentials/legend.js.map +1 -1
  57. package/components/essentials/modal.js +3 -3
  58. package/components/essentials/modal.js.map +1 -1
  59. package/components/essentials/title.js +2 -2
  60. package/components/essentials/title.js.map +1 -1
  61. package/components/essentials/tooltip.js +2 -2
  62. package/components/essentials/tooltip.js.map +1 -1
  63. package/components/graphs/alluvial.js +29 -12
  64. package/components/graphs/alluvial.js.map +1 -1
  65. package/components/graphs/area-stacked.js +1 -0
  66. package/components/graphs/area-stacked.js.map +1 -1
  67. package/components/graphs/area.js +2 -4
  68. package/components/graphs/area.js.map +1 -1
  69. package/components/graphs/boxplot.js +1 -0
  70. package/components/graphs/boxplot.js.map +1 -1
  71. package/components/graphs/bubble.js +4 -0
  72. package/components/graphs/bubble.js.map +1 -1
  73. package/components/graphs/bullet.d.ts +0 -1
  74. package/components/graphs/bullet.js +1 -12
  75. package/components/graphs/bullet.js.map +1 -1
  76. package/components/graphs/gauge.js +2 -4
  77. package/components/graphs/gauge.js.map +1 -1
  78. package/components/graphs/histogram.js +3 -1
  79. package/components/graphs/histogram.js.map +1 -1
  80. package/components/graphs/pie.js +1 -1
  81. package/components/graphs/pie.js.map +1 -1
  82. package/components/graphs/radar.js +8 -7
  83. package/components/graphs/radar.js.map +1 -1
  84. package/components/graphs/skeleton-lines.js +8 -3
  85. package/components/graphs/skeleton-lines.js.map +1 -1
  86. package/components/graphs/skeleton.js +18 -5
  87. package/components/graphs/skeleton.js.map +1 -1
  88. package/demo/data/bundle.js +1 -1
  89. package/demo/data/circle-pack.d.ts +0 -6
  90. package/demo/data/circle-pack.js +0 -6
  91. package/demo/data/circle-pack.js.map +1 -1
  92. package/demo/styles.css +45 -93
  93. package/demo/styles.css.map +1 -1
  94. package/demo/styles.min.css +1 -1
  95. package/demo/styles.min.css.map +1 -1
  96. package/demo/tsconfig.tsbuildinfo +3 -3
  97. package/demo/utils.js +2 -2
  98. package/demo/utils.js.map +1 -1
  99. package/model/alluvial.d.ts +8 -0
  100. package/model/alluvial.js +47 -0
  101. package/model/alluvial.js.map +1 -0
  102. package/model/boxplot.d.ts +1 -0
  103. package/model/boxplot.js +54 -0
  104. package/model/boxplot.js.map +1 -1
  105. package/model/bullet.d.ts +14 -0
  106. package/model/bullet.js +74 -0
  107. package/model/bullet.js.map +1 -0
  108. package/model/cartesian-charts.d.ts +0 -1
  109. package/model/cartesian-charts.js +0 -11
  110. package/model/cartesian-charts.js.map +1 -1
  111. package/model/circle-pack.d.ts +10 -0
  112. package/model/circle-pack.js +51 -0
  113. package/model/circle-pack.js.map +1 -1
  114. package/model/gauge.d.ts +4 -1
  115. package/model/gauge.js +24 -1
  116. package/model/gauge.js.map +1 -1
  117. package/model/meter.d.ts +1 -0
  118. package/model/meter.js +40 -0
  119. package/model/meter.js.map +1 -1
  120. package/model/model.d.ts +2 -0
  121. package/model/model.js +14 -0
  122. package/model/model.js.map +1 -1
  123. package/model/pie.d.ts +1 -0
  124. package/model/pie.js +21 -0
  125. package/model/pie.js.map +1 -1
  126. package/model/radar.d.ts +7 -0
  127. package/model/radar.js +52 -0
  128. package/model/radar.js.map +1 -0
  129. package/model/tree.d.ts +14 -0
  130. package/model/tree.js +56 -0
  131. package/model/tree.js.map +1 -0
  132. package/model/treemap.d.ts +8 -0
  133. package/model/treemap.js +37 -0
  134. package/model/treemap.js.map +1 -0
  135. package/model/wordcloud.d.ts +7 -0
  136. package/model/wordcloud.js +47 -0
  137. package/model/wordcloud.js.map +1 -0
  138. package/package.json +1 -1
  139. package/services/angle-utils.js +3 -1
  140. package/services/angle-utils.js.map +1 -1
  141. package/services/essentials/dom-utils.d.ts +3 -0
  142. package/services/essentials/dom-utils.js +9 -1
  143. package/services/essentials/dom-utils.js.map +1 -1
  144. package/styles/components/_skeleton-lines.scss +1 -2
  145. package/styles/components/_skeleton.scss +2 -7
  146. package/styles/components/_toolbar.scss +1 -1
  147. package/styles/components/_tooltip.scss +4 -2
  148. package/styles/components/_zoom-bar.scss +0 -12
  149. package/styles-g10.css +11 -23
  150. package/styles-g10.css.map +1 -1
  151. package/styles-g10.min.css +1 -1
  152. package/styles-g10.min.css.map +1 -1
  153. package/styles-g100.css +11 -23
  154. package/styles-g100.css.map +1 -1
  155. package/styles-g100.min.css +1 -1
  156. package/styles-g100.min.css.map +1 -1
  157. package/styles-g90.css +11 -23
  158. package/styles-g90.css.map +1 -1
  159. package/styles-g90.min.css +1 -1
  160. package/styles-g90.min.css.map +1 -1
  161. package/styles.css +11 -23
  162. package/styles.css.map +1 -1
  163. package/styles.min.css +1 -1
  164. package/styles.min.css.map +1 -1
  165. package/tsconfig.tsbuildinfo +162 -53
package/CHANGELOG.md CHANGED
@@ -3,6 +3,50 @@
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.51.2](https://github.com/carbon-design-system/carbon-charts/compare/v0.51.1...v0.51.2) (2021-11-02)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **core:** improve keyboard accessibility ([#1208](https://github.com/carbon-design-system/carbon-charts/issues/1208)) ([4f64327](https://github.com/carbon-design-system/carbon-charts/commit/4f64327f29dd23d73e4450a7f1cdda4d1d69d4e6)), closes [#1204](https://github.com/carbon-design-system/carbon-charts/issues/1204)
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.51.1](https://github.com/carbon-design-system/carbon-charts/compare/v0.51.0...v0.51.1) (2021-11-02)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **core:** render chart axis labels correctly when data loads async ([#1207](https://github.com/carbon-design-system/carbon-charts/issues/1207)) ([f22e99b](https://github.com/carbon-design-system/carbon-charts/commit/f22e99b8145b476d7ba55ce8f9b00843cd98aa3c)), closes [#1135](https://github.com/carbon-design-system/carbon-charts/issues/1135)
23
+
24
+
25
+
26
+
27
+
28
+ # [0.51.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.50.10...v0.51.0) (2021-11-01)
29
+
30
+
31
+ ### Features
32
+
33
+ * **core:** add toolbar to non-cartesian charts ([#1191](https://github.com/carbon-design-system/carbon-charts/issues/1191)) ([3574f4f](https://github.com/carbon-design-system/carbon-charts/commit/3574f4f376cc064e0f58de14c61d6442c527aa17))
34
+
35
+
36
+
37
+
38
+
39
+ ## [0.50.10](https://github.com/carbon-design-system/carbon-charts/compare/v0.50.9...v0.50.10) (2021-10-27)
40
+
41
+
42
+ ### Bug Fixes
43
+
44
+ * **core:** address various accessibility violations ([#1199](https://github.com/carbon-design-system/carbon-charts/issues/1199)) ([a4ab2c0](https://github.com/carbon-design-system/carbon-charts/commit/a4ab2c0e3a91513a18e5724faa87dfd80c81c248))
45
+
46
+
47
+
48
+
49
+
6
50
  ## [0.50.9](https://github.com/carbon-design-system/carbon-charts/compare/v0.50.8...v0.50.9) (2021-10-20)
7
51
 
8
52
 
@@ -6,14 +6,12 @@ export declare const circlePackTwoLevelData: {
6
6
  }[];
7
7
  }[];
8
8
  export declare const circlePackTwoLevelOptions: {
9
- experimental: string;
10
9
  title: string;
11
10
  canvasZoom: {
12
11
  enabled: boolean;
13
12
  };
14
13
  };
15
14
  export declare const circlePackTwoLevelCustomColorsOptions: {
16
- experimental: string;
17
15
  title: string;
18
16
  canvasZoom: {
19
17
  enabled: boolean;
@@ -28,7 +26,6 @@ export declare const circlePackTwoLevelCustomColorsOptions: {
28
26
  };
29
27
  };
30
28
  export declare const circlePackSingleOptions: {
31
- experimental: string;
32
29
  title: string;
33
30
  canvasZoom: {
34
31
  enabled: boolean;
@@ -39,7 +36,6 @@ export declare const circlePackSingleLevelData: {
39
36
  value: number;
40
37
  }[];
41
38
  export declare const circlePackThreeLevelOptions: {
42
- experimental: string;
43
39
  title: string;
44
40
  canvasZoom: {
45
41
  enabled: boolean;
@@ -61,7 +57,6 @@ export declare const circlePackThreeLevelData: {
61
57
  })[];
62
58
  }[];
63
59
  export declare const circlePackThreeLevelsMonochromeOptions: {
64
- experimental: string;
65
60
  title: string;
66
61
  canvasZoom: {
67
62
  enabled: boolean;
@@ -86,7 +81,6 @@ export declare const circlePackThreeLevelsMonochromeData: {
86
81
  }[];
87
82
  }[];
88
83
  export declare const circlePackThreeLevelNoZoomOptions: {
89
- experimental: string;
90
84
  title: string;
91
85
  circlePack: {
92
86
  hierarchyLevel: number;
@@ -1,6 +1,8 @@
1
1
  import { Chart } from '../chart';
2
+ import { AlluvialChartModel } from '../model/alluvial';
2
3
  import { ChartConfig, AlluvialChartOptions } from '../interfaces/index';
3
4
  export declare class AlluvialChart extends Chart {
5
+ model: AlluvialChartModel;
4
6
  constructor(holder: Element, chartConfigs: ChartConfig<AlluvialChartOptions>);
5
7
  getComponents(): any[];
6
8
  }
@@ -1,6 +1,8 @@
1
1
  import { AxisChart } from '../axis-chart';
2
+ import { BulletChartModel } from '../model/bullet';
2
3
  import { ChartConfig, BulletChartOptions } from '../interfaces/index';
3
4
  export declare class BulletChart extends AxisChart {
5
+ model: BulletChartModel;
4
6
  constructor(holder: Element, chartConfigs: ChartConfig<BulletChartOptions>);
5
7
  getComponents(): any[];
6
8
  }
@@ -1,6 +1,8 @@
1
+ import { RadarChartModel } from '../model/radar';
1
2
  import { Chart } from '../chart';
2
3
  import { ChartConfig, RadarChartOptions } from '../interfaces/index';
3
4
  export declare class RadarChart extends Chart {
4
- constructor(holder: Element, chartConfigs: ChartConfig<RadarChartOptions>, extending?: boolean);
5
+ model: RadarChartModel;
6
+ constructor(holder: Element, chartConfigs: ChartConfig<RadarChartOptions>);
5
7
  getComponents(): any[];
6
8
  }
@@ -1,6 +1,8 @@
1
1
  import { Chart } from '../chart';
2
+ import { TreeChartModel } from '../model/tree';
2
3
  import { ChartConfig, TreeChartOptions } from '../interfaces/index';
3
4
  export declare class TreeChart extends Chart {
5
+ model: TreeChartModel;
4
6
  constructor(holder: Element, chartConfigs: ChartConfig<TreeChartOptions>);
5
7
  getComponents(): any[];
6
8
  }
@@ -1,6 +1,8 @@
1
1
  import { Chart } from '../chart';
2
+ import { TreemapChartModel } from '../model/treemap';
2
3
  import { ChartConfig, TreemapChartOptions } from '../interfaces/index';
3
4
  export declare class TreemapChart extends Chart {
5
+ model: TreemapChartModel;
4
6
  constructor(holder: Element, chartConfigs: ChartConfig<TreemapChartOptions>);
5
7
  getComponents(): any[];
6
8
  }
@@ -1,6 +1,8 @@
1
+ import { WordCloudModel } from '../model/wordcloud';
1
2
  import { Chart } from '../chart';
2
3
  import { ChartConfig, WorldCloudChartOptions } from '../interfaces/index';
3
4
  export declare class WordCloudChart extends Chart {
5
+ model: WordCloudModel;
4
6
  constructor(holder: Element, chartConfigs: ChartConfig<WorldCloudChartOptions>);
5
7
  getComponents(): any[];
6
8
  }
@@ -10,6 +10,8 @@ export declare class Toolbar extends Component {
10
10
  renderOverflowMenu(): void;
11
11
  isOverflowMenuOpen(): any;
12
12
  updateOverflowMenu(show: boolean): void;
13
+ focusOnPreviousEnabledToolbarItem(currentItemIndex: any): void;
14
+ focusOnNextEnabledToolbarItem(currentItemIndex: any): void;
13
15
  focusOnPreviousEnabledMenuItem(currentItemIndex: any): void;
14
16
  focusOnNextEnabledMenuItem(currentItemIndex: any): void;
15
17
  toggleOverflowMenu(event: any): void;
@@ -20,9 +22,11 @@ export declare class Toolbar extends Component {
20
22
  buttonList: any[];
21
23
  overflowMenuItemList: any[];
22
24
  };
25
+ getToolbarButtonItems(): any[];
23
26
  getOverflowMenuItems(): any[];
24
27
  getOverflowButtonConfig(): {
25
28
  id: string;
29
+ title: string;
26
30
  shouldBeDisabled: () => boolean;
27
31
  iconSVGContent: string;
28
32
  clickFunction: (event: any) => void;
@@ -6,6 +6,6 @@ export declare class Legend extends Component {
6
6
  render(): void;
7
7
  sortDataGroups(dataGroups: any, legendOrder: any): any;
8
8
  addAdditionalItem(additionalItem: any, itemConfig: any, indexOfItem: any): void;
9
- truncateLegendText(addedLegendItemsText: any): void;
9
+ truncateLegendText(): void;
10
10
  addEventListeners(): void;
11
11
  }
@@ -7,7 +7,6 @@ export declare class Bullet extends Component {
7
7
  render(animate: boolean): void;
8
8
  handleLegendOnHover: (event: CustomEvent<any>) => void;
9
9
  handleLegendMouseOut: (event: CustomEvent<any>) => void;
10
- getMatchingRangeIndexForDatapoint(datum: any): any;
11
10
  addEventListeners(): void;
12
11
  destroy(): void;
13
12
  }
@@ -0,0 +1,8 @@
1
+ import { ChartModelCartesian } from './cartesian-charts';
2
+ /**
3
+ * Alluvial chart model layer
4
+ */
5
+ export declare class AlluvialChartModel extends ChartModelCartesian {
6
+ constructor(services: any);
7
+ getTabularDataArray(): any[];
8
+ }
@@ -9,5 +9,6 @@ export declare class BoxplotChartModel extends ChartModelCartesian {
9
9
  q_75: number;
10
10
  };
11
11
  getBoxplotData(): any[];
12
+ getTabularDataArray(): any[][];
12
13
  protected setColorClassNames(): void;
13
14
  }
@@ -0,0 +1,14 @@
1
+ import { ChartModelCartesian } from './cartesian-charts';
2
+ /**
3
+ * Bullet chart model layer
4
+ */
5
+ export declare class BulletChartModel extends ChartModelCartesian {
6
+ constructor(services: any);
7
+ /**
8
+ * Determines the index of the performance area titles to use
9
+ * @param datum
10
+ * @returns number
11
+ */
12
+ getMatchingRangeIndexForDatapoint(datum: any): any;
13
+ getTabularDataArray(): any[];
14
+ }
@@ -6,7 +6,6 @@ export declare class ChartModelCartesian extends ChartModel {
6
6
  constructor(services: any);
7
7
  private assignRangeAndDomains;
8
8
  getTabularDataArray(): any[];
9
- exportToCSV(): void;
10
9
  setData(newData: any): any;
11
10
  /**
12
11
  * @param zoomBarData any special zoom bar data to use instead of the model data
@@ -23,4 +23,14 @@ export declare class CirclePackChartModel extends ChartModel {
23
23
  hasParentNode(): boolean;
24
24
  setDataGroups(): void;
25
25
  protected setChildrenDataGroup(node: any, name: any): any;
26
+ getTabularDataArray(): string[][];
27
+ /**
28
+ * Recursively determine the relationship between all the nested elements in the child
29
+ * @param children: Object
30
+ * @param parent: String
31
+ * @param result: Array<Object>
32
+ * @param totalSum: number
33
+ * @returns: number
34
+ */
35
+ private getChildrenDatums;
26
36
  }
@@ -1,6 +1,9 @@
1
1
  import { ChartModel } from './model';
2
- /** The gauge chart model layer */
2
+ /**
3
+ * The gauge chart model layer
4
+ */
3
5
  export declare class GaugeChartModel extends ChartModel {
4
6
  constructor(services: any);
5
7
  getDataGroups(): any;
8
+ getTabularDataArray(): any[];
6
9
  }
@@ -15,4 +15,5 @@ export declare class MeterChartModel extends ChartModel {
15
15
  * Get the associated status for the data by checking the ranges
16
16
  */
17
17
  getStatus(): any;
18
+ getTabularDataArray(): any[];
18
19
  }
@@ -96,6 +96,8 @@ export declare class ChartModel {
96
96
  *
97
97
  */
98
98
  protected transformToTabularData(data: any): any[];
99
+ getTabularDataArray(): any[];
100
+ exportToCSV(): void;
99
101
  protected getTabularData(data: any): any[];
100
102
  protected sanitize(data: any): any;
101
103
  protected updateAllDataGroups(): void;
@@ -4,5 +4,6 @@ import { ChartModel } from './model';
4
4
  export declare class PieChartModel extends ChartModel {
5
5
  constructor(services: any);
6
6
  getTabularData(data: any): any[];
7
+ getTabularDataArray(): any[];
7
8
  sanitize(data: any): any[];
8
9
  }
@@ -0,0 +1,7 @@
1
+ import { ChartModelCartesian } from './cartesian-charts';
2
+ /** The charting model layer which includes mainly the chart data and options,
3
+ * as well as some misc. information to be shared among components */
4
+ export declare class RadarChartModel extends ChartModelCartesian {
5
+ constructor(services: any);
6
+ getTabularDataArray(): any[][];
7
+ }
@@ -0,0 +1,14 @@
1
+ import { ChartModel } from './model';
2
+ /**
3
+ * The tree chart model layer
4
+ */
5
+ export declare class TreeChartModel extends ChartModel {
6
+ constructor(services: any);
7
+ getTabularDataArray(): string[][];
8
+ /**
9
+ * Determine the child parent relationship in nested data
10
+ * @param datum: Object
11
+ * @param result: Array<Object>
12
+ */
13
+ private getChildrenDatums;
14
+ }
@@ -0,0 +1,8 @@
1
+ import { ChartModel } from './model';
2
+ /**
3
+ * The treemap chart model layer
4
+ */
5
+ export declare class TreemapChartModel extends ChartModel {
6
+ constructor(services: any);
7
+ getTabularDataArray(): string[][];
8
+ }
@@ -0,0 +1,7 @@
1
+ import { ChartModel } from './model';
2
+ /** The charting model layer which includes mainly the chart data and options,
3
+ * as well as some misc. information to be shared among components */
4
+ export declare class WordCloudModel extends ChartModel {
5
+ constructor(services: any);
6
+ getTabularDataArray(): any[];
7
+ }
@@ -7,6 +7,7 @@ interface getSVGElementSizeOptions {
7
7
  useBoundingRect?: boolean;
8
8
  }
9
9
  export declare class DOMUtils extends Service {
10
+ private chartID;
10
11
  constructor(model: any, services: any);
11
12
  static getHTMLElementSize(element: HTMLElement): {
12
13
  width: number;
@@ -18,6 +19,8 @@ export declare class DOMUtils extends Service {
18
19
  protected width: string;
19
20
  protected height: string;
20
21
  init(): void;
22
+ getChartID(): string;
23
+ generateElementIDString(originalID: any): string;
21
24
  addMainContainer(): void;
22
25
  update(): void;
23
26
  styleHolderElement(): void;