@carbon/charts 0.30.5 → 0.30.9
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 +38 -0
- package/README.md +14 -8
- package/build/demo/data/bar.d.ts +56 -94
- package/build/demo/data/bubble.d.ts +58 -13
- package/build/demo/data/donut.d.ts +3 -6
- package/build/demo/data/line.d.ts +35 -35
- package/build/demo/data/pie.d.ts +3 -6
- package/build/demo/data/scatter.d.ts +33 -20
- package/build/demo/data/step.d.ts +15 -16
- package/build/demo/data/time-series-axis.d.ts +12 -48
- package/build/src/charts/bar-grouped.d.ts +2 -2
- package/build/src/charts/bar-simple.d.ts +2 -4
- package/build/src/components/essentials/legend.d.ts +0 -4
- package/build/src/components/essentials/tooltip-bar.d.ts +1 -1
- package/build/src/components/essentials/tooltip-pie.d.ts +5 -0
- package/build/src/components/essentials/tooltip-scatter.d.ts +1 -1
- package/build/src/components/graphs/bar-grouped.d.ts +6 -4
- package/build/src/components/graphs/bar-simple.d.ts +0 -1
- package/build/src/components/graphs/bar-stacked.d.ts +0 -1
- package/build/src/components/graphs/bubble.d.ts +0 -1
- package/build/src/components/graphs/line.d.ts +3 -1
- package/build/src/components/graphs/pie.d.ts +0 -1
- package/build/src/components/graphs/scatter.d.ts +0 -1
- package/build/src/components/index.d.ts +1 -0
- package/build/src/interfaces/axis-scales.d.ts +4 -16
- package/build/src/interfaces/charts.d.ts +23 -1
- package/build/src/interfaces/enums.d.ts +0 -4
- package/build/src/interfaces/events.d.ts +20 -0
- package/build/src/model-pie.d.ts +1 -7
- package/build/src/model.d.ts +31 -13
- package/build/src/services/scales-cartesian.d.ts +11 -3
- package/build/src/tools.d.ts +2 -2
- package/build/stories/tutorials.stories.d.ts +1 -0
- package/bundle.js +1 -1
- package/chart.js +2 -2
- package/chart.js.map +1 -1
- package/charts/bar-grouped.d.ts +2 -2
- package/charts/bar-grouped.js.map +1 -1
- package/charts/bar-simple.d.ts +2 -4
- package/charts/bar-simple.js +0 -2
- package/charts/bar-simple.js.map +1 -1
- package/charts/donut.js +2 -2
- package/charts/donut.js.map +1 -1
- package/charts/pie.js +2 -2
- package/charts/pie.js.map +1 -1
- package/components/axes/grid.js +12 -19
- package/components/axes/grid.js.map +1 -1
- package/components/component.js +1 -1
- package/components/component.js.map +1 -1
- package/components/essentials/legend.d.ts +0 -4
- package/components/essentials/legend.js +8 -22
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/title.js +4 -4
- package/components/essentials/title.js.map +1 -1
- package/components/essentials/tooltip-bar.d.ts +1 -1
- package/components/essentials/tooltip-bar.js +13 -5
- package/components/essentials/tooltip-bar.js.map +1 -1
- package/components/essentials/tooltip-pie.d.ts +5 -0
- package/components/essentials/tooltip-pie.js +40 -0
- package/components/essentials/tooltip-pie.js.map +1 -0
- package/components/essentials/tooltip-scatter.d.ts +1 -1
- package/components/essentials/tooltip-scatter.js +8 -6
- package/components/essentials/tooltip-scatter.js.map +1 -1
- package/components/essentials/tooltip.js +14 -17
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/bar-grouped.d.ts +6 -4
- package/components/graphs/bar-grouped.js +60 -32
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.d.ts +0 -1
- package/components/graphs/bar-simple.js +12 -30
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.d.ts +0 -1
- package/components/graphs/bar-stacked.js +26 -108
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/bubble.d.ts +0 -1
- package/components/graphs/bubble.js +16 -20
- package/components/graphs/bubble.js.map +1 -1
- package/components/graphs/donut.js +1 -1
- package/components/graphs/donut.js.map +1 -1
- package/components/graphs/line.d.ts +3 -1
- package/components/graphs/line.js +41 -30
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/pie.d.ts +0 -1
- package/components/graphs/pie.js +13 -20
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/scatter.d.ts +0 -1
- package/components/graphs/scatter.js +26 -41
- package/components/graphs/scatter.js.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/configuration.js +7 -0
- package/configuration.js.map +1 -1
- package/demo/data/bar.d.ts +56 -94
- package/demo/data/bar.js +106 -271
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bubble.d.ts +58 -13
- package/demo/data/bubble.js +74 -174
- package/demo/data/bubble.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/donut.d.ts +3 -6
- package/demo/data/index.js +22 -4
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +35 -35
- package/demo/data/line.js +70 -196
- package/demo/data/line.js.map +1 -1
- package/demo/data/pie.d.ts +3 -6
- package/demo/data/pie.js +8 -10
- package/demo/data/pie.js.map +1 -1
- package/demo/data/scatter.d.ts +33 -20
- package/demo/data/scatter.js +50 -68
- package/demo/data/scatter.js.map +1 -1
- package/demo/data/step.d.ts +15 -16
- package/demo/data/time-series-axis.d.ts +12 -48
- package/demo/data/time-series-axis.js +34 -46
- package/demo/data/time-series-axis.js.map +1 -1
- package/demo/styles.css +28 -0
- package/demo/styles.css.map +1 -1
- package/demo/styles.min.css +1 -1
- package/demo/styles.min.css.map +1 -1
- package/demo/tsconfig.tsbuildinfo +38 -37
- package/interfaces/axis-scales.d.ts +4 -16
- package/interfaces/axis-scales.js.map +1 -1
- package/interfaces/charts.d.ts +23 -1
- package/interfaces/charts.js.map +1 -1
- package/interfaces/enums.d.ts +0 -4
- package/interfaces/enums.js +0 -5
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.d.ts +20 -0
- package/interfaces/events.js +23 -0
- package/interfaces/events.js.map +1 -1
- package/model-pie.d.ts +1 -7
- package/model-pie.js +2 -107
- package/model-pie.js.map +1 -1
- package/model.d.ts +31 -13
- package/model.js +200 -76
- package/model.js.map +1 -1
- package/package.json +3 -1
- package/services/essentials/dom-utils.js +3 -2
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/scales-cartesian.d.ts +11 -3
- package/services/scales-cartesian.js +104 -122
- package/services/scales-cartesian.js.map +1 -1
- package/tools.d.ts +2 -2
- package/tools.js +23 -2
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +87 -88
- package/build/src/model-simple-bar.d.ts +0 -11
- package/model-simple-bar.d.ts +0 -11
- package/model-simple-bar.js +0 -88
- package/model-simple-bar.js.map +0 -1
|
@@ -11,12 +11,9 @@ export declare const lineTimeSeriesData15seconds: {
|
|
|
11
11
|
export declare const lineTimeSeries15secondsOptions: {
|
|
12
12
|
title: string;
|
|
13
13
|
axes: {
|
|
14
|
-
left: {
|
|
15
|
-
secondary: boolean;
|
|
16
|
-
};
|
|
14
|
+
left: {};
|
|
17
15
|
bottom: {
|
|
18
16
|
scaleType: string;
|
|
19
|
-
primary: boolean;
|
|
20
17
|
};
|
|
21
18
|
};
|
|
22
19
|
};
|
|
@@ -33,12 +30,9 @@ export declare const lineTimeSeriesDataMinute: {
|
|
|
33
30
|
export declare const lineTimeSeriesMinuteOptions: {
|
|
34
31
|
title: string;
|
|
35
32
|
axes: {
|
|
36
|
-
left: {
|
|
37
|
-
secondary: boolean;
|
|
38
|
-
};
|
|
33
|
+
left: {};
|
|
39
34
|
bottom: {
|
|
40
35
|
scaleType: string;
|
|
41
|
-
primary: boolean;
|
|
42
36
|
};
|
|
43
37
|
};
|
|
44
38
|
};
|
|
@@ -55,12 +49,9 @@ export declare const lineTimeSeriesData30minutes: {
|
|
|
55
49
|
export declare const lineTimeSeries30minutesOptions: {
|
|
56
50
|
title: string;
|
|
57
51
|
axes: {
|
|
58
|
-
left: {
|
|
59
|
-
secondary: boolean;
|
|
60
|
-
};
|
|
52
|
+
left: {};
|
|
61
53
|
bottom: {
|
|
62
54
|
scaleType: string;
|
|
63
|
-
primary: boolean;
|
|
64
55
|
};
|
|
65
56
|
};
|
|
66
57
|
};
|
|
@@ -77,12 +68,9 @@ export declare const lineTimeSeriesDataHourlyDefaultTicksFormats: {
|
|
|
77
68
|
export declare const lineTimeSeriesHourlyDefaultLocaleOptions: {
|
|
78
69
|
title: string;
|
|
79
70
|
axes: {
|
|
80
|
-
left: {
|
|
81
|
-
secondary: boolean;
|
|
82
|
-
};
|
|
71
|
+
left: {};
|
|
83
72
|
bottom: {
|
|
84
73
|
scaleType: string;
|
|
85
|
-
primary: boolean;
|
|
86
74
|
};
|
|
87
75
|
};
|
|
88
76
|
};
|
|
@@ -99,12 +87,9 @@ export declare const lineTimeSeriesDataHourlyCustomTicksFormats: {
|
|
|
99
87
|
export declare const lineTimeSeriesHourlyCustomTicksFormatsOptions: {
|
|
100
88
|
title: string;
|
|
101
89
|
axes: {
|
|
102
|
-
left: {
|
|
103
|
-
secondary: boolean;
|
|
104
|
-
};
|
|
90
|
+
left: {};
|
|
105
91
|
bottom: {
|
|
106
92
|
scaleType: string;
|
|
107
|
-
primary: boolean;
|
|
108
93
|
};
|
|
109
94
|
};
|
|
110
95
|
timeScale: {
|
|
@@ -129,12 +114,9 @@ export declare const lineTimeSeriesDataDaily: {
|
|
|
129
114
|
export declare const lineTimeSeriesDailyOptions: {
|
|
130
115
|
title: string;
|
|
131
116
|
axes: {
|
|
132
|
-
left: {
|
|
133
|
-
secondary: boolean;
|
|
134
|
-
};
|
|
117
|
+
left: {};
|
|
135
118
|
bottom: {
|
|
136
119
|
scaleType: string;
|
|
137
|
-
primary: boolean;
|
|
138
120
|
};
|
|
139
121
|
};
|
|
140
122
|
};
|
|
@@ -151,12 +133,9 @@ export declare const lineTimeSeriesDataWeekly: {
|
|
|
151
133
|
export declare const lineTimeSeriesWeeklyOptions: {
|
|
152
134
|
title: string;
|
|
153
135
|
axes: {
|
|
154
|
-
left: {
|
|
155
|
-
secondary: boolean;
|
|
156
|
-
};
|
|
136
|
+
left: {};
|
|
157
137
|
bottom: {
|
|
158
138
|
scaleType: string;
|
|
159
|
-
primary: boolean;
|
|
160
139
|
};
|
|
161
140
|
};
|
|
162
141
|
timeScale: {
|
|
@@ -176,12 +155,9 @@ export declare const lineTimeSeriesDataMonthlyDefaultLocale: {
|
|
|
176
155
|
export declare const lineTimeSeriesMonthlyDefaultLocaleOptions: {
|
|
177
156
|
title: string;
|
|
178
157
|
axes: {
|
|
179
|
-
left: {
|
|
180
|
-
secondary: boolean;
|
|
181
|
-
};
|
|
158
|
+
left: {};
|
|
182
159
|
bottom: {
|
|
183
160
|
scaleType: string;
|
|
184
|
-
primary: boolean;
|
|
185
161
|
};
|
|
186
162
|
};
|
|
187
163
|
};
|
|
@@ -198,12 +174,9 @@ export declare const lineTimeSeriesDataMonthlyCustomLocale: {
|
|
|
198
174
|
export declare const lineTimeSeriesMonthlyCustomLocaleOptions: {
|
|
199
175
|
title: string;
|
|
200
176
|
axes: {
|
|
201
|
-
left: {
|
|
202
|
-
secondary: boolean;
|
|
203
|
-
};
|
|
177
|
+
left: {};
|
|
204
178
|
bottom: {
|
|
205
179
|
scaleType: string;
|
|
206
|
-
primary: boolean;
|
|
207
180
|
};
|
|
208
181
|
};
|
|
209
182
|
timeScale: {
|
|
@@ -223,12 +196,9 @@ export declare const lineTimeSeriesDataQuarterly: {
|
|
|
223
196
|
export declare const lineTimeSeriesQuarterlyOptions: {
|
|
224
197
|
title: string;
|
|
225
198
|
axes: {
|
|
226
|
-
left: {
|
|
227
|
-
secondary: boolean;
|
|
228
|
-
};
|
|
199
|
+
left: {};
|
|
229
200
|
bottom: {
|
|
230
201
|
scaleType: string;
|
|
231
|
-
primary: boolean;
|
|
232
202
|
};
|
|
233
203
|
};
|
|
234
204
|
};
|
|
@@ -245,12 +215,9 @@ export declare const lineTimeSeriesDataYearly: {
|
|
|
245
215
|
export declare const lineTimeSeriesYearlyOptions: {
|
|
246
216
|
title: string;
|
|
247
217
|
axes: {
|
|
248
|
-
left: {
|
|
249
|
-
secondary: boolean;
|
|
250
|
-
};
|
|
218
|
+
left: {};
|
|
251
219
|
bottom: {
|
|
252
220
|
scaleType: string;
|
|
253
|
-
primary: boolean;
|
|
254
221
|
};
|
|
255
222
|
};
|
|
256
223
|
};
|
|
@@ -267,12 +234,9 @@ export declare const lineTimeSeriesDataSingleDatum: {
|
|
|
267
234
|
export declare const lineTimeSeriesSingleDatumOptions: {
|
|
268
235
|
title: string;
|
|
269
236
|
axes: {
|
|
270
|
-
left: {
|
|
271
|
-
secondary: boolean;
|
|
272
|
-
};
|
|
237
|
+
left: {};
|
|
273
238
|
bottom: {
|
|
274
239
|
scaleType: string;
|
|
275
|
-
primary: boolean;
|
|
276
240
|
};
|
|
277
241
|
};
|
|
278
242
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxisChart } from "../axis-chart";
|
|
2
|
-
import {
|
|
2
|
+
import { BarChartOptions, ChartConfig } from "../interfaces/index";
|
|
3
3
|
export declare class GroupedBarChart extends AxisChart {
|
|
4
|
-
constructor(holder: Element, chartConfigs: ChartConfig<
|
|
4
|
+
constructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>);
|
|
5
5
|
getComponents(): any[];
|
|
6
6
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { AxisChart } from "../axis-chart";
|
|
2
|
-
import {
|
|
3
|
-
import { SimpleBarChartModel } from "../model-simple-bar";
|
|
2
|
+
import { BarChartOptions, ChartConfig } from "../interfaces/index";
|
|
4
3
|
export declare class SimpleBarChart extends AxisChart {
|
|
5
|
-
|
|
6
|
-
constructor(holder: Element, chartConfigs: ChartConfig<ScatterChartOptions>);
|
|
4
|
+
constructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>);
|
|
7
5
|
getComponents(): any[];
|
|
8
6
|
}
|
|
@@ -7,7 +7,7 @@ export declare class TooltipBar extends Tooltip {
|
|
|
7
7
|
* positive valued data and below negative value data.
|
|
8
8
|
* @param hoveredElement
|
|
9
9
|
*/
|
|
10
|
-
getTooltipPosition(hoveredElement: any): {
|
|
10
|
+
getTooltipPosition(hoveredElement: any, data?: any): {
|
|
11
11
|
placement: TooltipPosition;
|
|
12
12
|
position: {
|
|
13
13
|
left: number;
|
|
@@ -3,12 +3,14 @@ import { ScaleBand } from "d3-scale";
|
|
|
3
3
|
export declare class GroupedBar extends Bar {
|
|
4
4
|
type: string;
|
|
5
5
|
groupScale: ScaleBand<any>;
|
|
6
|
+
padding: number;
|
|
6
7
|
init(): void;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
protected getDataCorrespondingToLabel(label: string): any;
|
|
9
|
+
protected getGroupWidth(): number;
|
|
10
|
+
protected getTotalGroupPadding(): number;
|
|
11
|
+
protected getBarWidth(): any;
|
|
12
|
+
protected setGroupScale(): void;
|
|
10
13
|
render(animate: boolean): void;
|
|
11
|
-
addLabelsToDataPoints(d: any, index: any): any;
|
|
12
14
|
handleLegendOnHover: (event: CustomEvent<any>) => void;
|
|
13
15
|
handleLegendMouseOut: (event: CustomEvent<any>) => void;
|
|
14
16
|
addEventListeners(): void;
|
|
@@ -5,7 +5,6 @@ export declare class SimpleBar extends Bar {
|
|
|
5
5
|
render(animate: boolean): void;
|
|
6
6
|
handleLegendOnHover: (event: CustomEvent<any>) => void;
|
|
7
7
|
handleLegendMouseOut: (event: CustomEvent<any>) => void;
|
|
8
|
-
addLabelsToDataPoints(d: any, index: any): any;
|
|
9
8
|
addEventListeners(): void;
|
|
10
9
|
destroy(): void;
|
|
11
10
|
}
|
|
@@ -2,7 +2,6 @@ import { Bar } from "./bar";
|
|
|
2
2
|
export declare class StackedBar extends Bar {
|
|
3
3
|
type: string;
|
|
4
4
|
init(): void;
|
|
5
|
-
getStackData(): any;
|
|
6
5
|
render(animate: boolean): void;
|
|
7
6
|
handleLegendOnHover: (event: CustomEvent<any>) => void;
|
|
8
7
|
handleLegendMouseOut: (event: CustomEvent<any>) => void;
|
|
@@ -4,5 +4,4 @@ export declare class Bubble extends Scatter {
|
|
|
4
4
|
type: string;
|
|
5
5
|
getRadiusScale(selection: Selection<any, any, any, any>): import("d3-scale").ScaleLinear<number, number>;
|
|
6
6
|
styleCircles(selection: Selection<any, any, any, any>, animate: boolean): void;
|
|
7
|
-
addLabelsToDataPoints(d: any, index: any): any;
|
|
8
7
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Component } from "../component";
|
|
2
2
|
export declare class Line extends Component {
|
|
3
3
|
type: string;
|
|
4
|
-
lineGenerator: any;
|
|
5
4
|
init(): void;
|
|
6
5
|
render(animate?: boolean): void;
|
|
6
|
+
handleLegendOnHover: (event: CustomEvent<any>) => void;
|
|
7
|
+
handleLegendMouseOut: (event: CustomEvent<any>) => void;
|
|
8
|
+
destroy(): void;
|
|
7
9
|
}
|
|
@@ -7,7 +7,6 @@ export declare class Scatter extends Component {
|
|
|
7
7
|
styleCircles(selection: Selection<any, any, any, any>, animate: boolean): void;
|
|
8
8
|
handleLegendOnHover: (event: CustomEvent<any>) => void;
|
|
9
9
|
handleLegendMouseOut: (event: CustomEvent<any>) => void;
|
|
10
|
-
addLabelsToDataPoints(d: any, index: any): any;
|
|
11
10
|
addEventListeners(): void;
|
|
12
11
|
destroy(): void;
|
|
13
12
|
}
|
|
@@ -3,6 +3,7 @@ export * from "./essentials/legend";
|
|
|
3
3
|
export * from "./essentials/title";
|
|
4
4
|
export * from "./essentials/tooltip";
|
|
5
5
|
export * from "./essentials/tooltip-bar";
|
|
6
|
+
export * from "./essentials/tooltip-pie";
|
|
6
7
|
export * from "./essentials/tooltip-scatter";
|
|
7
8
|
export * from "./graphs/bar-simple";
|
|
8
9
|
export * from "./graphs/bar-grouped";
|
|
@@ -9,20 +9,6 @@ export interface AxisOptions {
|
|
|
9
9
|
* type of the scale used on axis
|
|
10
10
|
*/
|
|
11
11
|
scaleType?: ScaleTypes;
|
|
12
|
-
/**
|
|
13
|
-
* Whether the Axis should be used as the domain
|
|
14
|
-
* axis of the chart. In the case of Cartesian Scales
|
|
15
|
-
* you would expect to only have 1 axis (dimension) being used as domain
|
|
16
|
-
* Domain usually represents labels, ordinal values, time intervals etc.
|
|
17
|
-
*/
|
|
18
|
-
useAsGraphDomain?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the Axis should be used as the range
|
|
21
|
-
* axis of the chart. In the case of Cartesian Scales
|
|
22
|
-
* you would expect to only have 1 axis (dimension) being used as range
|
|
23
|
-
* Range usually follows a linear scale
|
|
24
|
-
*/
|
|
25
|
-
useAsGraphRange?: boolean;
|
|
26
12
|
/**
|
|
27
13
|
* Whether the Axis should use the specified domain
|
|
28
14
|
* instead of it being dynamically generated based on data extents.
|
|
@@ -31,14 +17,16 @@ export interface AxisOptions {
|
|
|
31
17
|
* Example for discrete axis scale: ['Qty', 'More', 'Sold']
|
|
32
18
|
*/
|
|
33
19
|
domain?: AxisDomain[];
|
|
34
|
-
primary?: boolean;
|
|
35
|
-
secondary?: boolean;
|
|
36
20
|
/**
|
|
37
21
|
* Whether the Axis should be forced to include 0 as a starting point
|
|
38
22
|
* (or ending point, in case of all negative axis).
|
|
39
23
|
* Default: true
|
|
40
24
|
*/
|
|
41
25
|
includeZero?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* identifies what key within the data the axis values would map to
|
|
28
|
+
*/
|
|
29
|
+
mapsTo?: string;
|
|
42
30
|
/**
|
|
43
31
|
* optional title for the scales
|
|
44
32
|
*/
|
|
@@ -47,7 +47,25 @@ export interface BaseChartOptions {
|
|
|
47
47
|
/**
|
|
48
48
|
* optional prefixing string for css classes (defaults to 'cc')
|
|
49
49
|
*/
|
|
50
|
-
prefix?:
|
|
50
|
+
prefix?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* options related to charting data
|
|
54
|
+
*/
|
|
55
|
+
data?: {
|
|
56
|
+
/**
|
|
57
|
+
* identifier for data groups
|
|
58
|
+
*/
|
|
59
|
+
groupMapsTo?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* options related to color scales
|
|
63
|
+
*/
|
|
64
|
+
color?: {
|
|
65
|
+
/**
|
|
66
|
+
* e.g. { "Dataset 1": "blue" }
|
|
67
|
+
*/
|
|
68
|
+
scale?: object;
|
|
51
69
|
};
|
|
52
70
|
}
|
|
53
71
|
/**
|
|
@@ -94,6 +112,10 @@ export interface BubbleChartOptions extends AxisChartOptions {
|
|
|
94
112
|
* options for the individual bubbles
|
|
95
113
|
*/
|
|
96
114
|
bubble?: {
|
|
115
|
+
/**
|
|
116
|
+
* the key to lookup in charting data for the bubble radius value
|
|
117
|
+
*/
|
|
118
|
+
radiusMapsTo?: string;
|
|
97
119
|
/**
|
|
98
120
|
* A function that would determine the range of the bubble radius to use
|
|
99
121
|
* Returns an array with the 1st value being the min and the 2nd value being the max radius
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* enum of all events related to the chart on the DOM
|
|
3
|
+
*/
|
|
4
|
+
export declare enum Chart {
|
|
5
|
+
RENDER_FINISHED = "render-finished",
|
|
6
|
+
RESIZE = "chart-resize"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* enum of all events related to the chart model
|
|
10
|
+
*/
|
|
11
|
+
export declare enum Model {
|
|
12
|
+
UPDATE = "model-update"
|
|
13
|
+
}
|
|
1
14
|
/**
|
|
2
15
|
* enum of all axis-related events
|
|
3
16
|
*/
|
|
@@ -43,6 +56,13 @@ export declare enum Line {
|
|
|
43
56
|
POINT_CLICK = "scatter-click",
|
|
44
57
|
POINT_MOUSEOUT = "scatter-mouseout"
|
|
45
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* enum of all tooltip events
|
|
61
|
+
*/
|
|
62
|
+
export declare enum Tooltip {
|
|
63
|
+
SHOW = "show-tooltip",
|
|
64
|
+
HIDE = "hide-tooltip"
|
|
65
|
+
}
|
|
46
66
|
/**
|
|
47
67
|
* enum of all legend related events
|
|
48
68
|
*/
|
package/build/src/model-pie.d.ts
CHANGED
|
@@ -3,11 +3,5 @@ import { ChartModel } from "./model";
|
|
|
3
3
|
* as well as some misc. information to be shared among components */
|
|
4
4
|
export declare class PieChartModel extends ChartModel {
|
|
5
5
|
constructor(services: any);
|
|
6
|
-
sanitize(data: any): any;
|
|
7
|
-
generateDataLabels(newData: any): {};
|
|
8
|
-
getDisplayData(): any;
|
|
9
|
-
toggleDataLabel(changedLabel: string): void;
|
|
10
|
-
setColorScale(): void;
|
|
11
|
-
getFillColor(label: string): any;
|
|
12
|
-
getStrokeColor(label: string): any;
|
|
6
|
+
sanitize(data: any): any[];
|
|
13
7
|
}
|
package/build/src/model.d.ts
CHANGED
|
@@ -9,22 +9,41 @@ export declare class ChartModel {
|
|
|
9
9
|
protected services: any;
|
|
10
10
|
protected state: any;
|
|
11
11
|
/**
|
|
12
|
-
* A list of all the
|
|
12
|
+
* A list of all the data groups that have existed within the lifetime of the chart
|
|
13
13
|
* @type string[]
|
|
14
14
|
*/
|
|
15
|
-
protected
|
|
16
|
-
protected patternScale: {};
|
|
15
|
+
protected allDataGroups: string[];
|
|
17
16
|
protected colorScale: any;
|
|
18
17
|
constructor(services: any);
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Converts data provided in the older format to tabular
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
protected transformToTabularData(data: any): any[];
|
|
23
|
+
protected getTabularData(data: any): any[];
|
|
24
|
+
protected sanitize(data: any): any[];
|
|
20
25
|
getDisplayData(): any;
|
|
21
26
|
getData(): any;
|
|
22
27
|
/**
|
|
23
28
|
*
|
|
24
29
|
* @param newData The new raw data to be set
|
|
25
30
|
*/
|
|
26
|
-
setData(newData: any): any;
|
|
27
|
-
|
|
31
|
+
setData(newData: any): any[];
|
|
32
|
+
protected updateAllDataGroups(): void;
|
|
33
|
+
protected generateDataGroups(data: any): {
|
|
34
|
+
name: string;
|
|
35
|
+
status: Number;
|
|
36
|
+
}[];
|
|
37
|
+
getDataGroups(): any;
|
|
38
|
+
getActiveDataGroups(): any;
|
|
39
|
+
getDataGroupNames(): any;
|
|
40
|
+
getActiveDataGroupNames(): any;
|
|
41
|
+
getGroupedData(): {
|
|
42
|
+
name: string;
|
|
43
|
+
data: any;
|
|
44
|
+
}[];
|
|
45
|
+
getDataValuesGroupedByKeys(): any;
|
|
46
|
+
getStackedData(): any[][];
|
|
28
47
|
/**
|
|
29
48
|
* @return {Object} The chart's options
|
|
30
49
|
*/
|
|
@@ -44,17 +63,16 @@ export declare class ChartModel {
|
|
|
44
63
|
update(): void;
|
|
45
64
|
setUpdateCallback(cb: Function): void;
|
|
46
65
|
toggleDataLabel(changedLabel: string): void;
|
|
47
|
-
setColorScale(): void;
|
|
66
|
+
protected setColorScale(): void;
|
|
48
67
|
/**
|
|
49
68
|
* Should the data point be filled?
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
69
|
+
* @param group
|
|
70
|
+
* @param key
|
|
52
71
|
* @param value
|
|
53
72
|
* @param defaultFilled the default for this chart
|
|
54
73
|
*/
|
|
55
|
-
getIsFilled(
|
|
56
|
-
getFillColor(
|
|
57
|
-
getStrokeColor(
|
|
74
|
+
getIsFilled(group: any, key?: any, data?: any, defaultFilled?: boolean): any;
|
|
75
|
+
getFillColor(group: any, key?: any, data?: any): any;
|
|
76
|
+
getStrokeColor(group: any, key?: any, data?: any): any;
|
|
58
77
|
getFillScale(): any;
|
|
59
|
-
protected updateAllDataLabels(): void;
|
|
60
78
|
}
|
|
@@ -18,8 +18,14 @@ export declare class CartesianScales extends Service {
|
|
|
18
18
|
protected orientation: CartesianOrientations;
|
|
19
19
|
getDomainAxisPosition(): AxisPositions;
|
|
20
20
|
getRangeAxisPosition(): AxisPositions;
|
|
21
|
-
setDefaultAxes(): void;
|
|
22
21
|
update(animate?: boolean): void;
|
|
22
|
+
protected findMainVerticalAxisPosition(): AxisPositions.LEFT | AxisPositions.RIGHT;
|
|
23
|
+
protected findMainHorizontalAxisPosition(): AxisPositions.TOP | AxisPositions.BOTTOM;
|
|
24
|
+
protected findDomainAndRangeAxesPositions(mainVerticalAxisPosition: AxisPositions, mainHorizontalAxisPosition: AxisPositions): {
|
|
25
|
+
domainAxisPosition: any;
|
|
26
|
+
rangeAxisPosition: any;
|
|
27
|
+
};
|
|
28
|
+
findDomainAndRangeAxes(): void;
|
|
23
29
|
determineOrientation(): void;
|
|
24
30
|
getOrientation(): CartesianOrientations;
|
|
25
31
|
getScaleByPosition(axisPosition: AxisPositions): any;
|
|
@@ -33,8 +39,10 @@ export declare class CartesianScales extends Service {
|
|
|
33
39
|
getValueFromScale(axisPosition: AxisPositions, datum: any, index?: number): any;
|
|
34
40
|
getDomainValue(d: any, i: any): any;
|
|
35
41
|
getRangeValue(d: any, i: any): any;
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
getDomainIdentifier(): any;
|
|
43
|
+
getRangeIdentifier(): any;
|
|
44
|
+
/** Uses the primary Y Axis to get data items associated with that value. */
|
|
45
|
+
getDataFromDomain(domainValue: any): any;
|
|
38
46
|
protected getScaleDomain(axisPosition: AxisPositions): any;
|
|
39
47
|
protected createScale(axisPosition: AxisPositions): any;
|
|
40
48
|
}
|
package/build/src/tools.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CartesianOrientations
|
|
1
|
+
import { CartesianOrientations } from "./interfaces";
|
|
2
2
|
export declare namespace Tools {
|
|
3
3
|
export const debounce: any;
|
|
4
4
|
export const clone: any;
|
|
@@ -15,7 +15,7 @@ export declare namespace Tools {
|
|
|
15
15
|
* @param {AxisChartOptions} providedOptions user provided options
|
|
16
16
|
* @returns merged options
|
|
17
17
|
*/
|
|
18
|
-
export function mergeDefaultChartOptions(defaultOptions:
|
|
18
|
+
export function mergeDefaultChartOptions(defaultOptions: any, providedOptions: any): any;
|
|
19
19
|
/**************************************
|
|
20
20
|
* DOM-related operations *
|
|
21
21
|
*************************************/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../demo/styles.scss";
|