@carbon/charts 1.16.4 → 1.16.6
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 +18 -0
- package/dist/{_baseEach-DHzZsRNB.mjs → _baseEach-Bp7pBkX8.mjs} +2 -2
- package/dist/{_baseEach-DHzZsRNB.mjs.map → _baseEach-Bp7pBkX8.mjs.map} +1 -1
- package/dist/{angle-utils-D8sXyiIj.mjs → angle-utils-BCx3SRS2.mjs} +2 -2
- package/dist/{angle-utils-D8sXyiIj.mjs.map → angle-utils-BCx3SRS2.mjs.map} +1 -1
- package/dist/chart.d.ts +5 -0
- package/dist/charts/alluvial.d.ts +5 -0
- package/dist/charts/area-stacked.d.ts +5 -0
- package/dist/charts/area.d.ts +5 -0
- package/dist/charts/bar-grouped.d.ts +5 -0
- package/dist/charts/bar-simple.d.ts +5 -0
- package/dist/charts/bar-stacked.d.ts +5 -0
- package/dist/charts/boxplot.d.ts +5 -0
- package/dist/charts/bubble.d.ts +5 -0
- package/dist/charts/bullet.d.ts +5 -0
- package/dist/charts/choropleth.d.ts +5 -0
- package/dist/charts/circle-pack.d.ts +5 -0
- package/dist/charts/combo.d.ts +5 -0
- package/dist/charts/donut.d.ts +5 -0
- package/dist/charts/gauge.d.ts +5 -0
- package/dist/charts/heatmap.d.ts +5 -0
- package/dist/charts/histogram.d.ts +5 -0
- package/dist/charts/line.d.ts +5 -0
- package/dist/charts/lollipop.d.ts +5 -0
- package/dist/charts/meter.d.ts +5 -0
- package/dist/charts/pie.d.ts +5 -0
- package/dist/charts/radar.d.ts +5 -0
- package/dist/charts/scatter.d.ts +5 -0
- package/dist/charts/tree.d.ts +5 -0
- package/dist/charts/treemap.d.ts +5 -0
- package/dist/charts/wordcloud.d.ts +5 -0
- package/dist/{choropleth-ChNZz853.mjs → choropleth-B7eXF9sA.mjs} +60 -112
- package/dist/choropleth-B7eXF9sA.mjs.map +1 -0
- package/dist/{color-scale-utils-C93P4hee.mjs → color-scale-utils-BaTmNvWt.mjs} +7 -12
- package/dist/{color-scale-utils-C93P4hee.mjs.map → color-scale-utils-BaTmNvWt.mjs.map} +1 -1
- package/dist/components/essentials/title-meter.d.ts +0 -1
- package/dist/components/index.mjs +1 -1
- package/dist/demo/index.mjs +19 -20
- package/dist/demo/index.mjs.map +1 -1
- package/dist/index.mjs +138 -8
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/layout.d.ts +28 -3
- package/dist/interfaces/services.d.ts +39 -0
- package/dist/model/cartesian-charts.d.ts +7 -1
- package/dist/model/circle-pack.d.ts +6 -5
- package/dist/model/heatmap.d.ts +7 -1
- package/dist/model/index.mjs +1 -1
- package/dist/model/model.d.ts +15 -3
- package/dist/model/tree.d.ts +9 -2
- package/dist/services/index.mjs +3 -3
- package/dist/umd/bundle.umd.js +1 -1
- package/dist/umd/bundle.umd.js.map +1 -1
- package/dist/{wordcloud-KxSjz0Gg.mjs → wordcloud-BsEQRUwL.mjs} +50 -18
- package/dist/wordcloud-BsEQRUwL.mjs.map +1 -0
- package/dist/{zoom-B7KfNcH9.mjs → zoom-E2POxw6n.mjs} +8 -13
- package/dist/{zoom-B7KfNcH9.mjs.map → zoom-E2POxw6n.mjs.map} +1 -1
- package/package.json +5 -5
- package/dist/choropleth-ChNZz853.mjs.map +0 -1
- package/dist/wordcloud-KxSjz0Gg.mjs.map +0 -1
|
@@ -1,21 +1,46 @@
|
|
|
1
1
|
import { LayoutAlignItems, LayoutDirection, RenderTypes } from './enums';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for layout settings.
|
|
4
|
+
*/
|
|
2
5
|
export interface LayoutConfigs {
|
|
3
6
|
/**
|
|
4
|
-
* Direction/orientation of the layout
|
|
7
|
+
* Direction/orientation of the layout.
|
|
8
|
+
* @type {LayoutDirection | string}
|
|
5
9
|
*/
|
|
6
10
|
direction?: LayoutDirection | string;
|
|
7
11
|
/**
|
|
8
|
-
* Whether to render through SVG or HTML
|
|
12
|
+
* Whether to render through SVG or HTML.
|
|
13
|
+
* @type {RenderTypes | string}
|
|
9
14
|
*/
|
|
10
15
|
renderType?: RenderTypes | string;
|
|
11
16
|
/**
|
|
12
|
-
*
|
|
17
|
+
* How the layout will align its children.
|
|
18
|
+
* @type {LayoutAlignItems | string}
|
|
13
19
|
*/
|
|
14
20
|
alignItems?: LayoutAlignItems | string;
|
|
15
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Interface representing coordinates in a 2D space.
|
|
24
|
+
*/
|
|
16
25
|
export interface Coordinates {
|
|
26
|
+
/**
|
|
27
|
+
* The x-coordinate.
|
|
28
|
+
* @type {number}
|
|
29
|
+
*/
|
|
17
30
|
x: number;
|
|
31
|
+
/**
|
|
32
|
+
* The y-coordinate.
|
|
33
|
+
* @type {number}
|
|
34
|
+
*/
|
|
18
35
|
y: number;
|
|
36
|
+
/**
|
|
37
|
+
* The optional initial x-coordinate.
|
|
38
|
+
* @type {number}
|
|
39
|
+
*/
|
|
19
40
|
x0?: number;
|
|
41
|
+
/**
|
|
42
|
+
* The optional initial y-coordinate.
|
|
43
|
+
* @type {number}
|
|
44
|
+
*/
|
|
20
45
|
y0?: number;
|
|
21
46
|
}
|
|
@@ -7,14 +7,53 @@ import { Events } from '../services/essentials/events';
|
|
|
7
7
|
import { Files } from '../services/essentials/files';
|
|
8
8
|
import { GradientUtils } from '../services/essentials/gradient-utils';
|
|
9
9
|
import { Zoom } from '../services/zoom';
|
|
10
|
+
/**
|
|
11
|
+
* Represents a collection of service instances used within the chart.
|
|
12
|
+
*/
|
|
10
13
|
export interface Services {
|
|
14
|
+
/**
|
|
15
|
+
* Optional canvas zoom service.
|
|
16
|
+
* @type {CanvasZoom}
|
|
17
|
+
*/
|
|
11
18
|
canvasZoom?: CanvasZoom;
|
|
19
|
+
/**
|
|
20
|
+
* Optional Cartesian scales service.
|
|
21
|
+
* @type {CartesianScales}
|
|
22
|
+
*/
|
|
12
23
|
cartesianScales?: CartesianScales;
|
|
24
|
+
/**
|
|
25
|
+
* Optional curves service.
|
|
26
|
+
* @type {Curves}
|
|
27
|
+
*/
|
|
13
28
|
curves?: Curves;
|
|
29
|
+
/**
|
|
30
|
+
* Optional DOM utilities service.
|
|
31
|
+
* @type {DOMUtils}
|
|
32
|
+
*/
|
|
14
33
|
domUtils?: DOMUtils;
|
|
34
|
+
/**
|
|
35
|
+
* Optional events service.
|
|
36
|
+
* @type {Events}
|
|
37
|
+
*/
|
|
15
38
|
events?: Events;
|
|
39
|
+
/**
|
|
40
|
+
* Optional files service.
|
|
41
|
+
* @type {Files}
|
|
42
|
+
*/
|
|
16
43
|
files?: Files;
|
|
44
|
+
/**
|
|
45
|
+
* Optional gradient utilities service.
|
|
46
|
+
* @type {GradientUtils}
|
|
47
|
+
*/
|
|
17
48
|
gradientUtils?: GradientUtils;
|
|
49
|
+
/**
|
|
50
|
+
* Optional transitions service.
|
|
51
|
+
* @type {Transitions}
|
|
52
|
+
*/
|
|
18
53
|
transitions?: Transitions;
|
|
54
|
+
/**
|
|
55
|
+
* Optional zoom service.
|
|
56
|
+
* @type {Zoom}
|
|
57
|
+
*/
|
|
19
58
|
zoom?: Zoom;
|
|
20
59
|
}
|
|
@@ -15,7 +15,13 @@ export declare class ChartModelCartesian extends ChartModel {
|
|
|
15
15
|
getTabularDataArray(): any[];
|
|
16
16
|
setData(newData: any): any;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Sets the zoom bar data for the current instance.
|
|
19
|
+
*
|
|
20
|
+
* This method sanitizes the provided zoom bar data or uses the display data if no explicit
|
|
21
|
+
* zoom data is provided. It normalizes the zoom bar data by aggregating values based on unique
|
|
22
|
+
* dates and updates the instance's state with the normalized data.
|
|
23
|
+
*
|
|
24
|
+
* @param {any} [newZoomBarData] - The new zoom bar data to be set. If not provided, the display data will be used.
|
|
19
25
|
*/
|
|
20
26
|
setZoomBarData(newZoomBarData?: any): void;
|
|
21
27
|
getZoomBarData(): any;
|
|
@@ -26,11 +26,12 @@ export declare class CirclePackChartModel extends ChartModel {
|
|
|
26
26
|
getTabularDataArray(): any[];
|
|
27
27
|
/**
|
|
28
28
|
* Recursively determine the relationship between all the nested elements in the child
|
|
29
|
-
* @
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @
|
|
29
|
+
* @private
|
|
30
|
+
* @param {any} children - The children nodes to process.
|
|
31
|
+
* @param {any} parent - The parent node associated with the children.
|
|
32
|
+
* @param {string[][]} [result=[]] - An array to accumulate the resulting data.
|
|
33
|
+
* @param {number} [totalSum=0] - The running total sum of values processed.
|
|
34
|
+
* @returns {number} Sum.
|
|
34
35
|
*/
|
|
35
36
|
private getChildrenDatums;
|
|
36
37
|
}
|
package/dist/model/heatmap.d.ts
CHANGED
|
@@ -35,8 +35,14 @@ export declare class HeatmapModel extends ChartModelCartesian {
|
|
|
35
35
|
*/
|
|
36
36
|
getMatrix(): any;
|
|
37
37
|
/**
|
|
38
|
+
* Sets the data for the current instance.
|
|
38
39
|
*
|
|
39
|
-
*
|
|
40
|
+
* This method sanitizes the provided data, generates data groups,
|
|
41
|
+
* and updates the instance's state with the sanitized data and data groups.
|
|
42
|
+
* It also resets the `_domains`, `_ranges`, and `_matrix` attributes to their empty states.
|
|
43
|
+
*
|
|
44
|
+
* @param {any} newData - The new data to be set. This data will be cloned and sanitized.
|
|
45
|
+
* @returns {any} - The sanitized version of the provided data.
|
|
40
46
|
*/
|
|
41
47
|
setData(newData: any): any;
|
|
42
48
|
/**
|
package/dist/model/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as l, B as o, a as r, C as d, b as t, c as C, d as M, e as s, G as h, H as i, M as p, P as u, R as B, T as c, f as m, W as n } from "../wordcloud-
|
|
1
|
+
import { A as l, B as o, a as r, C as d, b as t, c as C, d as M, e as s, G as h, H as i, M as p, P as u, R as B, T as c, f as m, W as n } from "../wordcloud-BsEQRUwL.mjs";
|
|
2
2
|
export {
|
|
3
3
|
l as AlluvialChartModel,
|
|
4
4
|
o as BoxplotChartModel,
|
package/dist/model/model.d.ts
CHANGED
|
@@ -32,8 +32,13 @@ export declare class ChartModel {
|
|
|
32
32
|
getData(): any;
|
|
33
33
|
isDataEmpty(): boolean;
|
|
34
34
|
/**
|
|
35
|
+
* Sets the data for the current instance.
|
|
35
36
|
*
|
|
36
|
-
*
|
|
37
|
+
* This method sanitizes the provided data, generates data groups,
|
|
38
|
+
* and updates the instance's state with the sanitized data and data groups.
|
|
39
|
+
*
|
|
40
|
+
* @param {any} newData - The new data to be set. This data will be cloned and sanitized.
|
|
41
|
+
* @returns {any} - The sanitized version of the provided data.
|
|
37
42
|
*/
|
|
38
43
|
setData(newData: any): any;
|
|
39
44
|
getDataGroups(groups?: any): any;
|
|
@@ -56,14 +61,21 @@ export declare class ChartModel {
|
|
|
56
61
|
getDataValuesGroupedByKeys({ bins, groups }: StackKeysParams): any;
|
|
57
62
|
getStackedData({ percentage, groups, divergent }: StackKeysParams): any[][];
|
|
58
63
|
/**
|
|
59
|
-
*
|
|
64
|
+
* Retrieves the current options from the instance's state.
|
|
65
|
+
*
|
|
66
|
+
* @returns {any} - The current options stored in the instance's state.
|
|
60
67
|
*/
|
|
61
68
|
getOptions(): any;
|
|
62
69
|
set(newState: any, configs?: any): void;
|
|
63
70
|
get(property?: string): any;
|
|
64
71
|
/**
|
|
72
|
+
* Updates the current options for the instance.
|
|
73
|
+
*
|
|
74
|
+
* This method retrieves the existing options, updates the legend additional items,
|
|
75
|
+
* and merges the new options with the existing ones. The instance's state is then updated
|
|
76
|
+
* with the merged options.
|
|
65
77
|
*
|
|
66
|
-
* @param newOptions
|
|
78
|
+
* @param {any} newOptions - The new options to be set. These options will be merged with the existing options.
|
|
67
79
|
*/
|
|
68
80
|
setOptions(newOptions: any): void;
|
|
69
81
|
/**
|
package/dist/model/tree.d.ts
CHANGED
|
@@ -4,11 +4,18 @@ import { ChartModel } from './model';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class TreeChartModel extends ChartModel {
|
|
6
6
|
constructor(services: any);
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves and formats tabular data from the display data.
|
|
9
|
+
*
|
|
10
|
+
* @returns {any[]} An object containing the headers and cells of the tabular data.
|
|
11
|
+
*/
|
|
7
12
|
getTabularDataArray(): any[];
|
|
8
13
|
/**
|
|
9
14
|
* Determine the child parent relationship in nested data
|
|
10
|
-
* @
|
|
11
|
-
* @param
|
|
15
|
+
* @private
|
|
16
|
+
* @param {any} datum - The datum node to process.
|
|
17
|
+
* @param {any[]} [result=[]] - An array to accumulate the resulting data.
|
|
18
|
+
* @returns {any[]} The accumulated result array.
|
|
12
19
|
*/
|
|
13
20
|
private getChildrenDatums;
|
|
14
21
|
}
|
package/dist/services/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as e, c as r, f as i, b as o, g as t, a as l, d as m, i as n } from "../color-scale-utils-
|
|
2
|
-
import { D as c, G as d, S as C, d as f, a as g, p, b as D, r as S } from "../angle-utils-
|
|
3
|
-
import { C as b, b as E, a as x, E as I, F as M, T as P, Z } from "../zoom-
|
|
1
|
+
import { T as e, c as r, f as i, b as o, g as t, a as l, d as m, i as n } from "../color-scale-utils-BaTmNvWt.mjs";
|
|
2
|
+
import { D as c, G as d, S as C, d as f, a as g, p, b as D, r as S } from "../angle-utils-BCx3SRS2.mjs";
|
|
3
|
+
import { C as b, b as E, a as x, E as I, F as M, T as P, Z } from "../zoom-E2POxw6n.mjs";
|
|
4
4
|
export {
|
|
5
5
|
b as CanvasZoom,
|
|
6
6
|
E as CartesianScales,
|