@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.
Files changed (152) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +14 -8
  3. package/build/demo/data/bar.d.ts +56 -94
  4. package/build/demo/data/bubble.d.ts +58 -13
  5. package/build/demo/data/donut.d.ts +3 -6
  6. package/build/demo/data/line.d.ts +35 -35
  7. package/build/demo/data/pie.d.ts +3 -6
  8. package/build/demo/data/scatter.d.ts +33 -20
  9. package/build/demo/data/step.d.ts +15 -16
  10. package/build/demo/data/time-series-axis.d.ts +12 -48
  11. package/build/src/charts/bar-grouped.d.ts +2 -2
  12. package/build/src/charts/bar-simple.d.ts +2 -4
  13. package/build/src/components/essentials/legend.d.ts +0 -4
  14. package/build/src/components/essentials/tooltip-bar.d.ts +1 -1
  15. package/build/src/components/essentials/tooltip-pie.d.ts +5 -0
  16. package/build/src/components/essentials/tooltip-scatter.d.ts +1 -1
  17. package/build/src/components/graphs/bar-grouped.d.ts +6 -4
  18. package/build/src/components/graphs/bar-simple.d.ts +0 -1
  19. package/build/src/components/graphs/bar-stacked.d.ts +0 -1
  20. package/build/src/components/graphs/bubble.d.ts +0 -1
  21. package/build/src/components/graphs/line.d.ts +3 -1
  22. package/build/src/components/graphs/pie.d.ts +0 -1
  23. package/build/src/components/graphs/scatter.d.ts +0 -1
  24. package/build/src/components/index.d.ts +1 -0
  25. package/build/src/interfaces/axis-scales.d.ts +4 -16
  26. package/build/src/interfaces/charts.d.ts +23 -1
  27. package/build/src/interfaces/enums.d.ts +0 -4
  28. package/build/src/interfaces/events.d.ts +20 -0
  29. package/build/src/model-pie.d.ts +1 -7
  30. package/build/src/model.d.ts +31 -13
  31. package/build/src/services/scales-cartesian.d.ts +11 -3
  32. package/build/src/tools.d.ts +2 -2
  33. package/build/stories/tutorials.stories.d.ts +1 -0
  34. package/bundle.js +1 -1
  35. package/chart.js +2 -2
  36. package/chart.js.map +1 -1
  37. package/charts/bar-grouped.d.ts +2 -2
  38. package/charts/bar-grouped.js.map +1 -1
  39. package/charts/bar-simple.d.ts +2 -4
  40. package/charts/bar-simple.js +0 -2
  41. package/charts/bar-simple.js.map +1 -1
  42. package/charts/donut.js +2 -2
  43. package/charts/donut.js.map +1 -1
  44. package/charts/pie.js +2 -2
  45. package/charts/pie.js.map +1 -1
  46. package/components/axes/grid.js +12 -19
  47. package/components/axes/grid.js.map +1 -1
  48. package/components/component.js +1 -1
  49. package/components/component.js.map +1 -1
  50. package/components/essentials/legend.d.ts +0 -4
  51. package/components/essentials/legend.js +8 -22
  52. package/components/essentials/legend.js.map +1 -1
  53. package/components/essentials/title.js +4 -4
  54. package/components/essentials/title.js.map +1 -1
  55. package/components/essentials/tooltip-bar.d.ts +1 -1
  56. package/components/essentials/tooltip-bar.js +13 -5
  57. package/components/essentials/tooltip-bar.js.map +1 -1
  58. package/components/essentials/tooltip-pie.d.ts +5 -0
  59. package/components/essentials/tooltip-pie.js +40 -0
  60. package/components/essentials/tooltip-pie.js.map +1 -0
  61. package/components/essentials/tooltip-scatter.d.ts +1 -1
  62. package/components/essentials/tooltip-scatter.js +8 -6
  63. package/components/essentials/tooltip-scatter.js.map +1 -1
  64. package/components/essentials/tooltip.js +14 -17
  65. package/components/essentials/tooltip.js.map +1 -1
  66. package/components/graphs/bar-grouped.d.ts +6 -4
  67. package/components/graphs/bar-grouped.js +60 -32
  68. package/components/graphs/bar-grouped.js.map +1 -1
  69. package/components/graphs/bar-simple.d.ts +0 -1
  70. package/components/graphs/bar-simple.js +12 -30
  71. package/components/graphs/bar-simple.js.map +1 -1
  72. package/components/graphs/bar-stacked.d.ts +0 -1
  73. package/components/graphs/bar-stacked.js +26 -108
  74. package/components/graphs/bar-stacked.js.map +1 -1
  75. package/components/graphs/bar.js.map +1 -1
  76. package/components/graphs/bubble.d.ts +0 -1
  77. package/components/graphs/bubble.js +16 -20
  78. package/components/graphs/bubble.js.map +1 -1
  79. package/components/graphs/donut.js +1 -1
  80. package/components/graphs/donut.js.map +1 -1
  81. package/components/graphs/line.d.ts +3 -1
  82. package/components/graphs/line.js +41 -30
  83. package/components/graphs/line.js.map +1 -1
  84. package/components/graphs/pie.d.ts +0 -1
  85. package/components/graphs/pie.js +13 -20
  86. package/components/graphs/pie.js.map +1 -1
  87. package/components/graphs/scatter.d.ts +0 -1
  88. package/components/graphs/scatter.js +26 -41
  89. package/components/graphs/scatter.js.map +1 -1
  90. package/components/index.d.ts +1 -0
  91. package/components/index.js +1 -0
  92. package/components/index.js.map +1 -1
  93. package/configuration.js +7 -0
  94. package/configuration.js.map +1 -1
  95. package/demo/data/bar.d.ts +56 -94
  96. package/demo/data/bar.js +106 -271
  97. package/demo/data/bar.js.map +1 -1
  98. package/demo/data/bubble.d.ts +58 -13
  99. package/demo/data/bubble.js +74 -174
  100. package/demo/data/bubble.js.map +1 -1
  101. package/demo/data/bundle.js +1 -1
  102. package/demo/data/donut.d.ts +3 -6
  103. package/demo/data/index.js +22 -4
  104. package/demo/data/index.js.map +1 -1
  105. package/demo/data/line.d.ts +35 -35
  106. package/demo/data/line.js +70 -196
  107. package/demo/data/line.js.map +1 -1
  108. package/demo/data/pie.d.ts +3 -6
  109. package/demo/data/pie.js +8 -10
  110. package/demo/data/pie.js.map +1 -1
  111. package/demo/data/scatter.d.ts +33 -20
  112. package/demo/data/scatter.js +50 -68
  113. package/demo/data/scatter.js.map +1 -1
  114. package/demo/data/step.d.ts +15 -16
  115. package/demo/data/time-series-axis.d.ts +12 -48
  116. package/demo/data/time-series-axis.js +34 -46
  117. package/demo/data/time-series-axis.js.map +1 -1
  118. package/demo/styles.css +28 -0
  119. package/demo/styles.css.map +1 -1
  120. package/demo/styles.min.css +1 -1
  121. package/demo/styles.min.css.map +1 -1
  122. package/demo/tsconfig.tsbuildinfo +38 -37
  123. package/interfaces/axis-scales.d.ts +4 -16
  124. package/interfaces/axis-scales.js.map +1 -1
  125. package/interfaces/charts.d.ts +23 -1
  126. package/interfaces/charts.js.map +1 -1
  127. package/interfaces/enums.d.ts +0 -4
  128. package/interfaces/enums.js +0 -5
  129. package/interfaces/enums.js.map +1 -1
  130. package/interfaces/events.d.ts +20 -0
  131. package/interfaces/events.js +23 -0
  132. package/interfaces/events.js.map +1 -1
  133. package/model-pie.d.ts +1 -7
  134. package/model-pie.js +2 -107
  135. package/model-pie.js.map +1 -1
  136. package/model.d.ts +31 -13
  137. package/model.js +200 -76
  138. package/model.js.map +1 -1
  139. package/package.json +3 -1
  140. package/services/essentials/dom-utils.js +3 -2
  141. package/services/essentials/dom-utils.js.map +1 -1
  142. package/services/scales-cartesian.d.ts +11 -3
  143. package/services/scales-cartesian.js +104 -122
  144. package/services/scales-cartesian.js.map +1 -1
  145. package/tools.d.ts +2 -2
  146. package/tools.js +23 -2
  147. package/tools.js.map +1 -1
  148. package/tsconfig.tsbuildinfo +87 -88
  149. package/build/src/model-simple-bar.d.ts +0 -11
  150. package/model-simple-bar.d.ts +0 -11
  151. package/model-simple-bar.js +0 -88
  152. 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 { ChartConfig, ScatterChartOptions } from "../interfaces/index";
2
+ import { BarChartOptions, ChartConfig } from "../interfaces/index";
3
3
  export declare class GroupedBarChart extends AxisChart {
4
- constructor(holder: Element, chartConfigs: ChartConfig<ScatterChartOptions>);
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 { ChartConfig, ScatterChartOptions } from "../interfaces/index";
3
- import { SimpleBarChartModel } from "../model-simple-bar";
2
+ import { BarChartOptions, ChartConfig } from "../interfaces/index";
4
3
  export declare class SimpleBarChart extends AxisChart {
5
- model: SimpleBarChartModel;
6
- constructor(holder: Element, chartConfigs: ChartConfig<ScatterChartOptions>);
4
+ constructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>);
7
5
  getComponents(): any[];
8
6
  }
@@ -3,9 +3,5 @@ export declare class Legend extends Component {
3
3
  type: string;
4
4
  render(): void;
5
5
  breakItemsIntoLines(addedLegendItems: any): void;
6
- getLegendItemArray(): {
7
- key: string;
8
- value: any;
9
- }[];
10
6
  addEventListeners(): void;
11
7
  }
@@ -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;
@@ -0,0 +1,5 @@
1
+ import { Tooltip } from "./tooltip";
2
+ import { TooltipTypes } from "../../interfaces";
3
+ export declare class TooltipPie extends Tooltip {
4
+ getTooltipHTML(d: any, type: TooltipTypes): string;
5
+ }
@@ -1,5 +1,5 @@
1
1
  import { Tooltip } from "./tooltip";
2
2
  import { TooltipTypes } from "./../../interfaces";
3
3
  export declare class TooltipScatter extends Tooltip {
4
- getTooltipHTML(data: any, type: TooltipTypes): string;
4
+ getTooltipHTML(datum: any, type: TooltipTypes): string;
5
5
  }
@@ -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
- getGroupWidth(): number;
8
- setGroupScale(): void;
9
- getBarWidth(): number;
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
  }
@@ -4,7 +4,6 @@ export declare class Pie extends Component {
4
4
  arc: any;
5
5
  hoverArc: any;
6
6
  init(): void;
7
- getDataList(): any;
8
7
  getInnerRadius(): any;
9
8
  render(animate?: boolean): void;
10
9
  renderCallouts(calloutData: any[]): void;
@@ -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?: String;
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
@@ -28,10 +28,6 @@ export declare enum CartesianOrientations {
28
28
  VERTICAL = "vertical",
29
29
  HORIZONTAL = "horizontal"
30
30
  }
31
- export declare enum AxisTypes {
32
- PRIMARY = "primary",
33
- SECONDARY = "secondary"
34
- }
35
31
  /**
36
32
  * enum of all possible scale types
37
33
  */
@@ -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
  */
@@ -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
  }
@@ -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 labels that have existed within the lifetime of the chart
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 allDataLabels: string[];
16
- protected patternScale: {};
15
+ protected allDataGroups: string[];
17
16
  protected colorScale: any;
18
17
  constructor(services: any);
19
- sanitize(data: any): any;
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
- generateDataLabels(newData: any): {};
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 datasetLabel
51
- * @param label
69
+ * @param group
70
+ * @param key
52
71
  * @param value
53
72
  * @param defaultFilled the default for this chart
54
73
  */
55
- getIsFilled(datasetLabel: any, label?: any, data?: any, defaultFilled?: boolean): any;
56
- getFillColor(datasetLabel: any, label?: any, data?: any): any;
57
- getStrokeColor(datasetLabel: any, label?: any, data?: any): any;
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
- /** Uses the primary Y Axis to get data items associated with that value. */
37
- getDataFromDomain(domainValue: any): any[];
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
  }
@@ -1,4 +1,4 @@
1
- import { CartesianOrientations, AxisChartOptions } from "./interfaces";
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: AxisChartOptions, providedOptions: AxisChartOptions): any;
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";