@carbon/charts 0.44.1 → 0.45.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.45.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.44.1...v0.45.0) (2021-08-19)
7
+
8
+
9
+ ### Features
10
+
11
+ * **core:** Add options to map value to other keys ([#1122](https://github.com/carbon-design-system/carbon-charts/issues/1122)) ([1835192](https://github.com/carbon-design-system/carbon-charts/commit/18351924acc182c24a7467dfc989fdc1e5c759dc)), closes [#1110](https://github.com/carbon-design-system/carbon-charts/issues/1110) [#1110](https://github.com/carbon-design-system/carbon-charts/issues/1110) [#1110](https://github.com/carbon-design-system/carbon-charts/issues/1110) [#1110](https://github.com/carbon-design-system/carbon-charts/issues/1110) [#1110](https://github.com/carbon-design-system/carbon-charts/issues/1110)
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.44.1](https://github.com/carbon-design-system/carbon-charts/compare/v0.44.0...v0.44.1) (2021-08-19)
7
18
 
8
19
  **Note:** Version bump only for package @carbon/charts
package/README.md CHANGED
@@ -23,7 +23,7 @@ bundled version of the library.
23
23
  ## Step-by-step instructions
24
24
 
25
25
  Read
26
- [here](https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials-getting-started--vanilla)
26
+ [here](https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-getting-started--vanilla)
27
27
 
28
28
  ## Codesandbox examples
29
29
 
@@ -42,7 +42,7 @@ For instance in the case of a donut chart you're able to pass in an additional
42
42
  field called `center` in your options configuring the donut center.
43
43
 
44
44
  For instructions on using the **tabular data format**, see
45
- [here](https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format)
45
+ [here](https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format)
46
46
 
47
47
  There are also additional options available depending on the chart type being
48
48
  used,
@@ -28,6 +28,17 @@ export declare const donutCenteredOptions: {
28
28
  alignment: string;
29
29
  };
30
30
  };
31
+ export declare const donutDataMapsTo: {
32
+ group: string;
33
+ count: number;
34
+ }[];
35
+ export declare const donutMapsToOptions: {
36
+ title: string;
37
+ resizable: boolean;
38
+ pie: {
39
+ valueMapsTo: string;
40
+ };
41
+ };
31
42
  export declare const donutEmptyStateData: any[];
32
43
  export declare const donutEmptyStateOptions: {
33
44
  title: string;
@@ -20,6 +20,17 @@ export declare const pieCenteredOptions: {
20
20
  alignment: string;
21
21
  };
22
22
  };
23
+ export declare const pieDataMapsTo: {
24
+ group: string;
25
+ count: number;
26
+ }[];
27
+ export declare const pieMapToOptions: {
28
+ title: string;
29
+ resizable: boolean;
30
+ pie: {
31
+ valueMapsTo: string;
32
+ };
33
+ };
23
34
  export declare const pieEmptyStateData: any[];
24
35
  export declare const pieEmptyStateOptions: {
25
36
  title: string;
@@ -292,6 +292,11 @@ export interface PieChartOptions extends BaseChartOptions {
292
292
  enabled?: Boolean;
293
293
  };
294
294
  alignment?: Alignments;
295
+ /**
296
+ * identifier for value key in your charting data
297
+ * defaults to value
298
+ */
299
+ valueMapsTo?: string;
295
300
  sortFunction?: (a: any, b: any) => number;
296
301
  };
297
302
  }
@@ -85,9 +85,10 @@ export declare namespace Tools {
85
85
  * @export
86
86
  * @param {any} item
87
87
  * @param {any} fullData
88
+ * @param {string} key
88
89
  * @returns The percentage in the form of a number (1 significant digit if necessary)
89
90
  */
90
- export function convertValueToPercentage(item: any, fullData: any): number;
91
+ export function convertValueToPercentage(item: any, fullData: any, key?: string): number;
91
92
  /**
92
93
  * Truncate the labels
93
94
  * @export