@carbon/charts 0.41.103 → 0.44.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.
Files changed (215) hide show
  1. package/CHANGELOG.md +63 -134
  2. package/axis-chart.d.ts +2 -2
  3. package/axis-chart.js +1 -1
  4. package/axis-chart.js.map +1 -1
  5. package/build/demo/data/CHART_TYPES.d.ts +5 -0
  6. package/build/demo/data/bar.d.ts +20 -0
  7. package/build/demo/data/circle-pack.d.ts +2 -2
  8. package/build/demo/data/histogram.d.ts +63 -0
  9. package/build/demo/data/index.d.ts +1 -0
  10. package/build/src/axis-chart.d.ts +2 -2
  11. package/build/src/chart.d.ts +1 -1
  12. package/build/src/charts/boxplot.d.ts +1 -1
  13. package/build/src/charts/circle-pack.d.ts +1 -1
  14. package/build/src/charts/gauge.d.ts +1 -1
  15. package/build/src/charts/histogram.d.ts +8 -0
  16. package/build/src/charts/index.d.ts +1 -0
  17. package/build/src/charts/meter.d.ts +1 -1
  18. package/build/src/charts/pie.d.ts +1 -1
  19. package/build/src/components/axes/axis.d.ts +1 -1
  20. package/build/src/components/axes/chart-clip.d.ts +1 -1
  21. package/build/src/components/axes/ruler-binned.d.ts +7 -0
  22. package/build/src/components/axes/ruler.d.ts +2 -3
  23. package/build/src/components/axes/zoom-bar.d.ts +1 -1
  24. package/build/src/components/component.d.ts +1 -1
  25. package/build/src/components/essentials/modal.d.ts +1 -7
  26. package/build/src/components/essentials/threshold.d.ts +1 -1
  27. package/build/src/components/essentials/tooltip-histogram.d.ts +26 -0
  28. package/build/src/components/essentials/tooltip.d.ts +1 -1
  29. package/build/src/components/graphs/histogram.d.ts +12 -0
  30. package/build/src/components/index.d.ts +3 -0
  31. package/build/src/components/layout/layout.d.ts +1 -1
  32. package/build/src/configuration-non-customizable.d.ts +3 -0
  33. package/build/src/configuration.d.ts +2 -1
  34. package/build/src/interfaces/axis-scales.d.ts +53 -17
  35. package/build/src/interfaces/charts.d.ts +25 -2
  36. package/build/src/model/binned-charts.d.ts +7 -0
  37. package/build/src/{model-boxplot.d.ts → model/boxplot.d.ts} +1 -1
  38. package/build/src/{model-cartesian-charts.d.ts → model/cartesian-charts.d.ts} +2 -0
  39. package/build/src/{model-circle-pack.d.ts → model/circle-pack.d.ts} +1 -1
  40. package/build/src/{model-gauge.d.ts → model/gauge.d.ts} +0 -0
  41. package/build/src/{model-meter.d.ts → model/meter.d.ts} +0 -0
  42. package/build/src/{model.d.ts → model/model.d.ts} +17 -3
  43. package/build/src/{model-pie.d.ts → model/pie.d.ts} +0 -0
  44. package/build/src/services/service.d.ts +1 -1
  45. package/build/src/services/zoom.d.ts +1 -1
  46. package/build/src/tools.d.ts +1 -0
  47. package/bundle.js +1 -1
  48. package/chart.d.ts +1 -1
  49. package/chart.js +1 -1
  50. package/chart.js.map +1 -1
  51. package/charts/bar-stacked.js +2 -1
  52. package/charts/bar-stacked.js.map +1 -1
  53. package/charts/boxplot.d.ts +1 -1
  54. package/charts/boxplot.js +1 -1
  55. package/charts/boxplot.js.map +1 -1
  56. package/charts/circle-pack.d.ts +1 -1
  57. package/charts/circle-pack.js +1 -1
  58. package/charts/circle-pack.js.map +1 -1
  59. package/charts/gauge.d.ts +1 -1
  60. package/charts/gauge.js +1 -1
  61. package/charts/gauge.js.map +1 -1
  62. package/charts/histogram.d.ts +8 -0
  63. package/charts/histogram.js +48 -0
  64. package/charts/histogram.js.map +1 -0
  65. package/charts/index.d.ts +1 -0
  66. package/charts/index.js +1 -0
  67. package/charts/index.js.map +1 -1
  68. package/charts/line.js +2 -1
  69. package/charts/line.js.map +1 -1
  70. package/charts/meter.d.ts +1 -1
  71. package/charts/meter.js +1 -1
  72. package/charts/meter.js.map +1 -1
  73. package/charts/pie.d.ts +1 -1
  74. package/charts/pie.js +1 -1
  75. package/charts/pie.js.map +1 -1
  76. package/charts/wordcloud.js.map +1 -1
  77. package/components/axes/axis.d.ts +1 -1
  78. package/components/axes/axis.js.map +1 -1
  79. package/components/axes/chart-clip.d.ts +1 -1
  80. package/components/axes/chart-clip.js.map +1 -1
  81. package/components/axes/ruler-binned.d.ts +7 -0
  82. package/components/axes/ruler-binned.js +136 -0
  83. package/components/axes/ruler-binned.js.map +1 -0
  84. package/components/axes/ruler.d.ts +2 -3
  85. package/components/axes/ruler.js +4 -4
  86. package/components/axes/ruler.js.map +1 -1
  87. package/components/axes/zoom-bar.d.ts +1 -1
  88. package/components/axes/zoom-bar.js.map +1 -1
  89. package/components/component.d.ts +1 -1
  90. package/components/component.js.map +1 -1
  91. package/components/essentials/modal.d.ts +1 -7
  92. package/components/essentials/modal.js +8 -69
  93. package/components/essentials/modal.js.map +1 -1
  94. package/components/essentials/threshold.d.ts +1 -1
  95. package/components/essentials/threshold.js.map +1 -1
  96. package/components/essentials/tooltip-axis.js +2 -2
  97. package/components/essentials/tooltip-axis.js.map +1 -1
  98. package/components/essentials/tooltip-histogram.d.ts +26 -0
  99. package/components/essentials/tooltip-histogram.js +154 -0
  100. package/components/essentials/tooltip-histogram.js.map +1 -0
  101. package/components/essentials/tooltip.d.ts +1 -1
  102. package/components/essentials/tooltip.js.map +1 -1
  103. package/components/graphs/bar-grouped.js +4 -4
  104. package/components/graphs/bar-grouped.js.map +1 -1
  105. package/components/graphs/bar-stacked.js +19 -5
  106. package/components/graphs/bar-stacked.js.map +1 -1
  107. package/components/graphs/circle-pack.js +6 -3
  108. package/components/graphs/circle-pack.js.map +1 -1
  109. package/components/graphs/histogram.d.ts +12 -0
  110. package/components/graphs/histogram.js +207 -0
  111. package/components/graphs/histogram.js.map +1 -0
  112. package/components/graphs/skeleton.js +3 -1
  113. package/components/graphs/skeleton.js.map +1 -1
  114. package/components/index.d.ts +3 -0
  115. package/components/index.js +3 -0
  116. package/components/index.js.map +1 -1
  117. package/components/layout/layout.d.ts +1 -1
  118. package/components/layout/layout.js.map +1 -1
  119. package/configuration-non-customizable.d.ts +3 -0
  120. package/configuration-non-customizable.js +3 -0
  121. package/configuration-non-customizable.js.map +1 -1
  122. package/configuration.d.ts +2 -1
  123. package/configuration.js +17 -4
  124. package/configuration.js.map +1 -1
  125. package/demo/data/CHART_TYPES.d.ts +5 -0
  126. package/demo/data/CHART_TYPES.js +5 -0
  127. package/demo/data/CHART_TYPES.js.map +1 -1
  128. package/demo/data/bar.d.ts +20 -0
  129. package/demo/data/bar.js +25 -0
  130. package/demo/data/bar.js.map +1 -1
  131. package/demo/data/bundle.js +1 -1
  132. package/demo/data/circle-pack.d.ts +2 -2
  133. package/demo/data/circle-pack.js +2 -2
  134. package/demo/data/circle-pack.js.map +1 -1
  135. package/demo/data/histogram.d.ts +63 -0
  136. package/demo/data/histogram.js +312 -0
  137. package/demo/data/histogram.js.map +1 -0
  138. package/demo/data/index.d.ts +1 -0
  139. package/demo/data/index.js +27 -0
  140. package/demo/data/index.js.map +1 -1
  141. package/demo/data/line.js +6 -6
  142. package/demo/data/line.js.map +1 -1
  143. package/demo/styles.css +540 -8
  144. package/demo/styles.css.map +1 -1
  145. package/demo/styles.min.css +1 -1
  146. package/demo/styles.min.css.map +1 -1
  147. package/demo/tsconfig.tsbuildinfo +23 -9
  148. package/interfaces/axis-scales.d.ts +53 -17
  149. package/interfaces/axis-scales.js.map +1 -1
  150. package/interfaces/charts.d.ts +25 -2
  151. package/interfaces/charts.js.map +1 -1
  152. package/model/binned-charts.d.ts +7 -0
  153. package/model/binned-charts.js +52 -0
  154. package/model/binned-charts.js.map +1 -0
  155. package/{model-boxplot.d.ts → model/boxplot.d.ts} +1 -1
  156. package/{model-boxplot.js → model/boxplot.js} +4 -4
  157. package/model/boxplot.js.map +1 -0
  158. package/{model-cartesian-charts.d.ts → model/cartesian-charts.d.ts} +2 -0
  159. package/{model-cartesian-charts.js → model/cartesian-charts.js} +80 -20
  160. package/model/cartesian-charts.js.map +1 -0
  161. package/{model-circle-pack.d.ts → model/circle-pack.d.ts} +1 -1
  162. package/{model-circle-pack.js → model/circle-pack.js} +3 -3
  163. package/model/circle-pack.js.map +1 -0
  164. package/{model-gauge.d.ts → model/gauge.d.ts} +0 -0
  165. package/{model-gauge.js → model/gauge.js} +1 -1
  166. package/model/gauge.js.map +1 -0
  167. package/{model-meter.d.ts → model/meter.d.ts} +0 -0
  168. package/{model-meter.js → model/meter.js} +3 -3
  169. package/model/meter.js.map +1 -0
  170. package/{model.d.ts → model/model.d.ts} +17 -3
  171. package/{model.js → model/model.js} +126 -14
  172. package/model/model.js.map +1 -0
  173. package/{model-pie.d.ts → model/pie.d.ts} +0 -0
  174. package/{model-pie.js → model/pie.js} +1 -1
  175. package/model/pie.js.map +1 -0
  176. package/package.json +1 -1
  177. package/services/essentials/dom-utils.js +18 -0
  178. package/services/essentials/dom-utils.js.map +1 -1
  179. package/services/scales-cartesian.js +31 -7
  180. package/services/scales-cartesian.js.map +1 -1
  181. package/services/service.d.ts +1 -1
  182. package/services/service.js.map +1 -1
  183. package/services/zoom.d.ts +1 -1
  184. package/services/zoom.js.map +1 -1
  185. package/styles/_chart-holder.scss +5 -2
  186. package/styles/colors.scss +2 -0
  187. package/styles/components/_ruler.scss +2 -1
  188. package/styles/styles.scss +4 -0
  189. package/styles-g10.css +135 -2
  190. package/styles-g10.css.map +1 -1
  191. package/styles-g10.min.css +1 -1
  192. package/styles-g10.min.css.map +1 -1
  193. package/styles-g100.css +135 -2
  194. package/styles-g100.css.map +1 -1
  195. package/styles-g100.min.css +1 -1
  196. package/styles-g100.min.css.map +1 -1
  197. package/styles-g90.css +135 -2
  198. package/styles-g90.css.map +1 -1
  199. package/styles-g90.min.css +1 -1
  200. package/styles-g90.min.css.map +1 -1
  201. package/styles.css +135 -2
  202. package/styles.css.map +1 -1
  203. package/styles.min.css +1 -1
  204. package/styles.min.css.map +1 -1
  205. package/tools.d.ts +1 -0
  206. package/tools.js +2 -1
  207. package/tools.js.map +1 -1
  208. package/tsconfig.tsbuildinfo +260 -149
  209. package/model-boxplot.js.map +0 -1
  210. package/model-cartesian-charts.js.map +0 -1
  211. package/model-circle-pack.js.map +0 -1
  212. package/model-gauge.js.map +0 -1
  213. package/model-meter.js.map +0 -1
  214. package/model-pie.js.map +0 -1
  215. package/model.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { PieChartModel } from '../model-pie';
1
+ import { PieChartModel } from '../model/pie';
2
2
  import { Chart } from '../chart';
3
3
  import { ChartConfig, PieChartOptions } from '../interfaces/index';
4
4
  export declare class PieChart extends Chart {
@@ -1,6 +1,6 @@
1
1
  import { Component } from '../component';
2
2
  import { ScaleTypes } from '../../interfaces';
3
- import { ChartModel } from '../../model';
3
+ import { ChartModel } from '../../model/model';
4
4
  import { RenderTypes } from '../../interfaces/enums';
5
5
  export declare class Axis extends Component {
6
6
  type: string;
@@ -1,5 +1,5 @@
1
1
  import { Component } from '../component';
2
- import { ChartModel } from '../../model';
2
+ import { ChartModel } from '../../model/model';
3
3
  import { RenderTypes } from '../../interfaces';
4
4
  export declare class ChartClip extends Component {
5
5
  type: string;
@@ -0,0 +1,7 @@
1
+ import { Ruler } from './ruler';
2
+ import { RenderTypes } from '../../interfaces';
3
+ export declare class BinnedRuler extends Ruler {
4
+ type: string;
5
+ renderType: RenderTypes;
6
+ showRuler(event: any, [x, y]: [number, number]): void;
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { Component } from '../component';
2
2
  import { RenderTypes } from '../../interfaces';
3
3
  import { Selection } from 'd3-selection';
4
- declare type GenericSvgSelection = Selection<SVGElement, any, SVGElement, any>;
4
+ export declare type GenericSvgSelection = Selection<SVGElement, any, SVGElement, any>;
5
5
  export declare class Ruler extends Component {
6
6
  type: string;
7
7
  renderType: RenderTypes;
@@ -17,7 +17,7 @@ export declare class Ruler extends Component {
17
17
  render(): void;
18
18
  removeBackdropEventListeners(): void;
19
19
  formatTooltipData(tooltipData: any): any;
20
- showRuler([x, y]: [number, number]): any;
20
+ showRuler(event: any, [x, y]: [number, number]): any;
21
21
  hideRuler(): void;
22
22
  /**
23
23
  * Adds the listener on the X grid to trigger multiple point tooltips along the x axis.
@@ -25,4 +25,3 @@ export declare class Ruler extends Component {
25
25
  addBackdropEventListeners(): void;
26
26
  drawBackdrop(): void;
27
27
  }
28
- export {};
@@ -1,5 +1,5 @@
1
1
  import { Component } from '../component';
2
- import { ChartModelCartesian } from '../../model-cartesian-charts';
2
+ import { ChartModelCartesian } from '../../model/cartesian-charts';
3
3
  import { RenderTypes } from '../../interfaces';
4
4
  export declare class ZoomBar extends Component {
5
5
  type: string;
@@ -1,4 +1,4 @@
1
- import { ChartModel } from '../model';
1
+ import { ChartModel } from '../model/model';
2
2
  import { RenderTypes } from '../interfaces';
3
3
  export declare class Component {
4
4
  type: string;
@@ -1,5 +1,5 @@
1
1
  import { Component } from '../component';
2
- import { ChartModel } from '../../model';
2
+ import { ChartModel } from '../../model/model';
3
3
  export declare class Modal extends Component {
4
4
  type: string;
5
5
  isEventListenerAdded: boolean;
@@ -9,12 +9,6 @@ export declare class Modal extends Component {
9
9
  handleHideModal: () => void;
10
10
  addEventListeners(): void;
11
11
  removeEventListeners(): void;
12
- assignRangeAndDomains(): {
13
- primaryDomain: any;
14
- primaryRange: any;
15
- secondaryDomain: any;
16
- secondaryRange: any;
17
- };
18
12
  getModalHTML(): string;
19
13
  render(): void;
20
14
  destroy(): void;
@@ -1,5 +1,5 @@
1
1
  import { Component } from '../component';
2
- import { ChartModel } from '../../model';
2
+ import { ChartModel } from '../../model/model';
3
3
  import { RenderTypes } from '../../interfaces';
4
4
  import Position from '@carbon/utils-position';
5
5
  export declare class Threshold extends Component {
@@ -0,0 +1,26 @@
1
+ import { AxisChartsTooltip } from './tooltip-axis';
2
+ export declare class TooltipHistogram extends AxisChartsTooltip {
3
+ init(): void;
4
+ /**
5
+ * Get the position of the tooltip relative to the active hovered bar. Tooltip should appear above
6
+ * positive valued data and below negative value data.
7
+ * @param hoveredElement
8
+ */
9
+ getTooltipPosition(hoveredElement: any, data?: any): {
10
+ placement: string;
11
+ position: {
12
+ left: number;
13
+ top: number;
14
+ };
15
+ };
16
+ /**
17
+ * Returns the html for the bar single point tooltip
18
+ * @param data associated values for the hovered bar
19
+ */
20
+ getTooltipHTML(e: any): string;
21
+ /**
22
+ * Multip tooltips for bar charts include totals for each stack
23
+ * @param data
24
+ */
25
+ getMultilineTooltipHTML(data: any): string;
26
+ }
@@ -1,5 +1,5 @@
1
1
  import { Component } from '../component';
2
- import { ChartModel } from '../../model';
2
+ import { ChartModel } from '../../model/model';
3
3
  import { RenderTypes } from '../../interfaces';
4
4
  import Position from '@carbon/utils-position';
5
5
  export declare class Tooltip extends Component {
@@ -0,0 +1,12 @@
1
+ import { RenderTypes } from '../../interfaces';
2
+ import { Component } from '../component';
3
+ export declare class Histogram extends Component {
4
+ type: string;
5
+ renderType: RenderTypes;
6
+ init(): void;
7
+ render(animate: boolean): void;
8
+ handleLegendOnHover: (event: CustomEvent<any>) => void;
9
+ handleLegendMouseOut: (event: CustomEvent<any>) => void;
10
+ addEventListeners(): void;
11
+ destroy(): void;
12
+ }
@@ -6,6 +6,7 @@ export * from './essentials/title';
6
6
  export * from './essentials/title-meter';
7
7
  export * from './essentials/tooltip';
8
8
  export * from './essentials/tooltip-axis';
9
+ export * from "./essentials/tooltip-histogram";
9
10
  export * from './essentials/canvas-chart-clip';
10
11
  export * from './graphs/area';
11
12
  export * from './graphs/area-stacked';
@@ -15,6 +16,7 @@ export * from './graphs/bar-stacked';
15
16
  export * from './graphs/boxplot';
16
17
  export * from './graphs/bubble';
17
18
  export * from './graphs/bullet';
19
+ export * from './graphs/histogram';
18
20
  export * from './graphs/line';
19
21
  export * from './graphs/lollipop';
20
22
  export * from './graphs/scatter';
@@ -36,6 +38,7 @@ export * from './axes/grid-brush';
36
38
  export * from './axes/chart-clip';
37
39
  export * from './axes/grid';
38
40
  export * from './axes/ruler';
41
+ export * from './axes/ruler-binned';
39
42
  export * from './axes/ruler-stacked';
40
43
  export * from './axes/toolbar';
41
44
  export * from './axes/zero-line';
@@ -1,6 +1,6 @@
1
1
  import { Component } from '../component';
2
2
  import { LayoutComponentChild, LayoutConfigs } from '../../interfaces/index';
3
- import { ChartModel } from '../../model';
3
+ import { ChartModel } from '../../model/model';
4
4
  export declare class LayoutComponent extends Component {
5
5
  static instanceID: number;
6
6
  type: string;
@@ -66,6 +66,9 @@ export declare const boxplot: {
66
66
  thicker: number;
67
67
  };
68
68
  };
69
+ export declare const histogram: {
70
+ defaultBins: number;
71
+ };
69
72
  export declare const legend: {
70
73
  items: {
71
74
  status: {
@@ -1,4 +1,4 @@
1
- import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, BulletChartOptions, RadarChartOptions, ComboChartOptions, TreemapChartOptions, CirclePackChartOptions, WorldCloudChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions } from './interfaces';
1
+ import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, BulletChartOptions, HistogramChartOptions, RadarChartOptions, ComboChartOptions, TreemapChartOptions, CirclePackChartOptions, WorldCloudChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions } from './interfaces';
2
2
  /**
3
3
  * Grid options
4
4
  */
@@ -21,6 +21,7 @@ export declare const options: {
21
21
  boxplotChart: BoxplotChartOptions;
22
22
  bubbleChart: BubbleChartOptions;
23
23
  bulletChart: BulletChartOptions;
24
+ histogramChart: HistogramChartOptions;
24
25
  lineChart: LineChartOptions;
25
26
  areaChart: AreaChartOptions;
26
27
  stackedAreaChart: AreaChartOptions;
@@ -3,22 +3,11 @@ import { ThresholdOptions } from './components';
3
3
  import { TruncationOptions } from './truncation';
4
4
  import { AxisDomain } from 'd3-axis';
5
5
  import { Locale } from 'date-fns';
6
- /**
7
- * options to configure a scale. not all options are used by all scales
8
- */
9
- export interface AxisOptions {
6
+ export interface BasedAxisOptions {
10
7
  /**
11
8
  * type of the scale used on axis
12
9
  */
13
10
  scaleType?: ScaleTypes;
14
- /**
15
- * option for stacked axis
16
- */
17
- stacked?: boolean;
18
- /**
19
- * option for percentage axis scale
20
- */
21
- percentage?: boolean;
22
11
  /**
23
12
  * Whether the Axis should use the specified domain
24
13
  * instead of it being dynamically generated based on data extents.
@@ -103,6 +92,53 @@ export interface AxisOptions {
103
92
  * is axis visible or not
104
93
  */
105
94
  visible?: boolean;
95
+ /**
96
+ * Bins to display (Histogram)
97
+ * bins: 20
98
+ * bins: [0, 20, 40, 60]
99
+ * bins: [new Date(...), new Date(...), ...]
100
+ */
101
+ bins?: number | any[];
102
+ /**
103
+ * limit the visible axis domain to only the binned area
104
+ */
105
+ limitDomainToBins?: boolean;
106
+ /**
107
+ * should be set to `true` on the domain
108
+ * axis that's being broken into bins
109
+ */
110
+ binned?: boolean;
111
+ }
112
+ /**
113
+ * options to configure a scale. not all options are used by all scales
114
+ */
115
+ export interface AxisOptions extends BasedAxisOptions {
116
+ /**
117
+ * option for stacked axis
118
+ */
119
+ stacked?: boolean;
120
+ /**
121
+ * option for percentage axis scale
122
+ */
123
+ percentage?: boolean;
124
+ }
125
+ export interface BinnedAxisOptions {
126
+ /**
127
+ * should be set to `true` on the domain
128
+ * axis that's being broken into bins
129
+ */
130
+ binned?: boolean;
131
+ /**
132
+ * Bins to display (Histogram)
133
+ * bins: 20
134
+ * bins: [0, 20, 40, 60]
135
+ * bins: [new Date(...), new Date(...), ...]
136
+ */
137
+ bins?: number | any[];
138
+ /**
139
+ * limit the visible axis domain to only the binned area
140
+ */
141
+ limitDomainToBins?: boolean;
106
142
  }
107
143
  /**
108
144
  * customize time series scales
@@ -146,9 +182,9 @@ export interface TimeIntervalFormats {
146
182
  /**
147
183
  * customize the axes components
148
184
  */
149
- export interface AxesOptions {
150
- left?: AxisOptions;
151
- bottom?: AxisOptions;
152
- right?: AxisOptions;
153
- top?: AxisOptions;
185
+ export interface AxesOptions<AxesOptionType> {
186
+ left?: AxesOptionType;
187
+ bottom?: AxesOptionType;
188
+ right?: AxesOptionType;
189
+ top?: AxesOptionType;
154
190
  }
@@ -1,7 +1,7 @@
1
1
  import { GaugeTypes, Statuses, ArrowDirections, Alignments, ChartTypes } from './enums';
2
2
  import { LegendOptions, TooltipOptions, GridOptions, AxesOptions, ZoomBarsOptions } from './index';
3
3
  import { BarOptions, StackedBarOptions, ToolbarOptions } from './components';
4
- import { TimeScaleOptions } from './axis-scales';
4
+ import { AxisOptions, BinnedAxisOptions, TimeScaleOptions } from './axis-scales';
5
5
  /**
6
6
  * Base chart options common to any chart
7
7
  */
@@ -107,7 +107,19 @@ export interface BaseChartOptions {
107
107
  * Options common to any chart with an axis
108
108
  */
109
109
  export interface AxisChartOptions extends BaseChartOptions {
110
- axes?: AxesOptions;
110
+ axes?: AxesOptions<AxisOptions>;
111
+ grid?: GridOptions;
112
+ timeScale?: TimeScaleOptions;
113
+ /**
114
+ * zoombar configuration
115
+ */
116
+ zoomBar?: ZoomBarsOptions;
117
+ }
118
+ /**
119
+ * Options common to binned charts with an axis
120
+ */
121
+ export interface BinnedAxisChartOptions extends AxisChartOptions {
122
+ axes?: AxesOptions<BinnedAxisOptions>;
111
123
  grid?: GridOptions;
112
124
  timeScale?: TimeScaleOptions;
113
125
  /**
@@ -196,6 +208,17 @@ export interface BulletChartOptions extends AxisChartOptions {
196
208
  performanceAreaTitles?: string[];
197
209
  };
198
210
  }
211
+ /**
212
+ * options specific to histogram charts
213
+ */
214
+ export interface HistogramChartOptions extends AxisChartOptions {
215
+ /**
216
+ * options related to bins
217
+ */
218
+ bins?: {
219
+ rangeLabel?: string;
220
+ };
221
+ }
199
222
  /**
200
223
  * options specific to line charts
201
224
  */
@@ -0,0 +1,7 @@
1
+ import { ChartModelCartesian } from './cartesian-charts';
2
+ /**
3
+ * this is intended for binned type of charts
4
+ * */
5
+ export declare class ChartModelBinned extends ChartModelCartesian {
6
+ getTabularDataArray(): any[];
7
+ }
@@ -1,4 +1,4 @@
1
- import { ChartModelCartesian } from './model-cartesian-charts';
1
+ import { ChartModelCartesian } from './cartesian-charts';
2
2
  /** The charting model layer which includes mainly the chart data and options,
3
3
  * as well as some misc. information to be shared among components */
4
4
  export declare class BoxplotChartModel extends ChartModelCartesian {
@@ -4,6 +4,8 @@ import { ChartModel } from './model';
4
4
  * */
5
5
  export declare class ChartModelCartesian extends ChartModel {
6
6
  constructor(services: any);
7
+ private assignRangeAndDomains;
8
+ getTabularDataArray(): any[];
7
9
  exportToCSV(): void;
8
10
  setData(newData: any): any;
9
11
  /**
@@ -1,5 +1,5 @@
1
1
  import { ChartModel } from './model';
2
- import { LegendItemType } from './interfaces/enums';
2
+ import { LegendItemType } from '../interfaces/enums';
3
3
  /** The charting model layer which includes mainly the chart data and options,
4
4
  * as well as some misc. information to be shared among components */
5
5
  export declare class CirclePackChartModel extends ChartModel {
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- import { ColorClassNameTypes } from './interfaces';
1
+ import { ColorClassNameTypes } from '../interfaces';
2
2
  /** The charting model layer which includes mainly the chart data and options,
3
3
  * as well as some misc. information to be shared among components */
4
4
  export declare class ChartModel {
@@ -29,14 +29,28 @@ export declare class ChartModel {
29
29
  getActiveDataGroups(groups?: any): any;
30
30
  getDataGroupNames(groups?: any): any;
31
31
  getActiveDataGroupNames(groups?: any): any;
32
+ private aggregateBinDataByGroup;
33
+ getBinConfigurations(): {
34
+ bins: import("d3-array").Bin<number, number>[];
35
+ binsDomain: any[];
36
+ };
37
+ getBinnedStackedData(): any[][];
32
38
  getGroupedData(groups?: any): {
33
39
  name: string;
34
40
  data: any;
35
41
  }[];
36
- getDataValuesGroupedByKeys(groups?: any): any;
37
- getStackedData({ percentage, groups }: {
42
+ getStackKeys({ bins, groups }: {
43
+ bins?: any;
44
+ groups?: any;
45
+ }): any;
46
+ getDataValuesGroupedByKeys({ bins, groups }: {
47
+ bins?: any;
48
+ groups?: any;
49
+ }): any;
50
+ getStackedData({ percentage, groups, divergent }: {
38
51
  percentage?: boolean;
39
52
  groups?: any;
53
+ divergent?: boolean;
40
54
  }): any[][];
41
55
  /**
42
56
  * @return {Object} The chart's options
File without changes
@@ -1,4 +1,4 @@
1
- import { ChartModel } from '../model';
1
+ import { ChartModel } from '../model/model';
2
2
  export declare class Service {
3
3
  protected model: ChartModel;
4
4
  protected services: any;
@@ -1,5 +1,5 @@
1
1
  import { Service } from './service';
2
- import { ChartModelCartesian } from '../model-cartesian-charts';
2
+ import { ChartModelCartesian } from '../model/cartesian-charts';
3
3
  export declare class Zoom extends Service {
4
4
  protected model: ChartModelCartesian;
5
5
  isZoomBarEnabled(): boolean;
@@ -8,6 +8,7 @@ export declare namespace Tools {
8
8
  export const removeArrayDuplicates: any;
9
9
  export const clamp: any;
10
10
  export const flatten: any;
11
+ export const groupBy: any;
11
12
  export const camelCase: any;
12
13
  export const isEmpty: any;
13
14
  export const isEqual: any;