@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.
- package/CHANGELOG.md +63 -134
- package/axis-chart.d.ts +2 -2
- package/axis-chart.js +1 -1
- package/axis-chart.js.map +1 -1
- package/build/demo/data/CHART_TYPES.d.ts +5 -0
- package/build/demo/data/bar.d.ts +20 -0
- package/build/demo/data/circle-pack.d.ts +2 -2
- package/build/demo/data/histogram.d.ts +63 -0
- package/build/demo/data/index.d.ts +1 -0
- package/build/src/axis-chart.d.ts +2 -2
- package/build/src/chart.d.ts +1 -1
- package/build/src/charts/boxplot.d.ts +1 -1
- package/build/src/charts/circle-pack.d.ts +1 -1
- package/build/src/charts/gauge.d.ts +1 -1
- package/build/src/charts/histogram.d.ts +8 -0
- package/build/src/charts/index.d.ts +1 -0
- package/build/src/charts/meter.d.ts +1 -1
- package/build/src/charts/pie.d.ts +1 -1
- package/build/src/components/axes/axis.d.ts +1 -1
- package/build/src/components/axes/chart-clip.d.ts +1 -1
- package/build/src/components/axes/ruler-binned.d.ts +7 -0
- package/build/src/components/axes/ruler.d.ts +2 -3
- package/build/src/components/axes/zoom-bar.d.ts +1 -1
- package/build/src/components/component.d.ts +1 -1
- package/build/src/components/essentials/modal.d.ts +1 -7
- package/build/src/components/essentials/threshold.d.ts +1 -1
- package/build/src/components/essentials/tooltip-histogram.d.ts +26 -0
- package/build/src/components/essentials/tooltip.d.ts +1 -1
- package/build/src/components/graphs/histogram.d.ts +12 -0
- package/build/src/components/index.d.ts +3 -0
- package/build/src/components/layout/layout.d.ts +1 -1
- package/build/src/configuration-non-customizable.d.ts +3 -0
- package/build/src/configuration.d.ts +2 -1
- package/build/src/interfaces/axis-scales.d.ts +53 -17
- package/build/src/interfaces/charts.d.ts +25 -2
- package/build/src/model/binned-charts.d.ts +7 -0
- package/build/src/{model-boxplot.d.ts → model/boxplot.d.ts} +1 -1
- package/build/src/{model-cartesian-charts.d.ts → model/cartesian-charts.d.ts} +2 -0
- package/build/src/{model-circle-pack.d.ts → model/circle-pack.d.ts} +1 -1
- package/build/src/{model-gauge.d.ts → model/gauge.d.ts} +0 -0
- package/build/src/{model-meter.d.ts → model/meter.d.ts} +0 -0
- package/build/src/{model.d.ts → model/model.d.ts} +17 -3
- package/build/src/{model-pie.d.ts → model/pie.d.ts} +0 -0
- package/build/src/services/service.d.ts +1 -1
- package/build/src/services/zoom.d.ts +1 -1
- package/build/src/tools.d.ts +1 -0
- package/bundle.js +1 -1
- package/chart.d.ts +1 -1
- package/chart.js +1 -1
- package/chart.js.map +1 -1
- package/charts/bar-stacked.js +2 -1
- package/charts/bar-stacked.js.map +1 -1
- package/charts/boxplot.d.ts +1 -1
- package/charts/boxplot.js +1 -1
- package/charts/boxplot.js.map +1 -1
- package/charts/circle-pack.d.ts +1 -1
- package/charts/circle-pack.js +1 -1
- package/charts/circle-pack.js.map +1 -1
- package/charts/gauge.d.ts +1 -1
- package/charts/gauge.js +1 -1
- package/charts/gauge.js.map +1 -1
- package/charts/histogram.d.ts +8 -0
- package/charts/histogram.js +48 -0
- package/charts/histogram.js.map +1 -0
- package/charts/index.d.ts +1 -0
- package/charts/index.js +1 -0
- package/charts/index.js.map +1 -1
- package/charts/line.js +2 -1
- package/charts/line.js.map +1 -1
- package/charts/meter.d.ts +1 -1
- package/charts/meter.js +1 -1
- package/charts/meter.js.map +1 -1
- package/charts/pie.d.ts +1 -1
- package/charts/pie.js +1 -1
- package/charts/pie.js.map +1 -1
- package/charts/wordcloud.js.map +1 -1
- package/components/axes/axis.d.ts +1 -1
- package/components/axes/axis.js.map +1 -1
- package/components/axes/chart-clip.d.ts +1 -1
- package/components/axes/chart-clip.js.map +1 -1
- package/components/axes/ruler-binned.d.ts +7 -0
- package/components/axes/ruler-binned.js +136 -0
- package/components/axes/ruler-binned.js.map +1 -0
- package/components/axes/ruler.d.ts +2 -3
- package/components/axes/ruler.js +4 -4
- package/components/axes/ruler.js.map +1 -1
- package/components/axes/zoom-bar.d.ts +1 -1
- package/components/axes/zoom-bar.js.map +1 -1
- package/components/component.d.ts +1 -1
- package/components/component.js.map +1 -1
- package/components/essentials/modal.d.ts +1 -7
- package/components/essentials/modal.js +8 -69
- package/components/essentials/modal.js.map +1 -1
- package/components/essentials/threshold.d.ts +1 -1
- package/components/essentials/threshold.js.map +1 -1
- package/components/essentials/tooltip-axis.js +2 -2
- package/components/essentials/tooltip-axis.js.map +1 -1
- package/components/essentials/tooltip-histogram.d.ts +26 -0
- package/components/essentials/tooltip-histogram.js +154 -0
- package/components/essentials/tooltip-histogram.js.map +1 -0
- package/components/essentials/tooltip.d.ts +1 -1
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/bar-grouped.js +4 -4
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-stacked.js +19 -5
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/circle-pack.js +6 -3
- package/components/graphs/circle-pack.js.map +1 -1
- package/components/graphs/histogram.d.ts +12 -0
- package/components/graphs/histogram.js +207 -0
- package/components/graphs/histogram.js.map +1 -0
- package/components/graphs/skeleton.js +3 -1
- package/components/graphs/skeleton.js.map +1 -1
- package/components/index.d.ts +3 -0
- package/components/index.js +3 -0
- package/components/index.js.map +1 -1
- package/components/layout/layout.d.ts +1 -1
- package/components/layout/layout.js.map +1 -1
- package/configuration-non-customizable.d.ts +3 -0
- package/configuration-non-customizable.js +3 -0
- package/configuration-non-customizable.js.map +1 -1
- package/configuration.d.ts +2 -1
- package/configuration.js +17 -4
- package/configuration.js.map +1 -1
- package/demo/data/CHART_TYPES.d.ts +5 -0
- package/demo/data/CHART_TYPES.js +5 -0
- package/demo/data/CHART_TYPES.js.map +1 -1
- package/demo/data/bar.d.ts +20 -0
- package/demo/data/bar.js +25 -0
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/circle-pack.d.ts +2 -2
- package/demo/data/circle-pack.js +2 -2
- package/demo/data/circle-pack.js.map +1 -1
- package/demo/data/histogram.d.ts +63 -0
- package/demo/data/histogram.js +312 -0
- package/demo/data/histogram.js.map +1 -0
- package/demo/data/index.d.ts +1 -0
- package/demo/data/index.js +27 -0
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.js +6 -6
- package/demo/data/line.js.map +1 -1
- package/demo/styles.css +540 -8
- 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 +23 -9
- package/interfaces/axis-scales.d.ts +53 -17
- package/interfaces/axis-scales.js.map +1 -1
- package/interfaces/charts.d.ts +25 -2
- package/interfaces/charts.js.map +1 -1
- package/model/binned-charts.d.ts +7 -0
- package/model/binned-charts.js +52 -0
- package/model/binned-charts.js.map +1 -0
- package/{model-boxplot.d.ts → model/boxplot.d.ts} +1 -1
- package/{model-boxplot.js → model/boxplot.js} +4 -4
- package/model/boxplot.js.map +1 -0
- package/{model-cartesian-charts.d.ts → model/cartesian-charts.d.ts} +2 -0
- package/{model-cartesian-charts.js → model/cartesian-charts.js} +80 -20
- package/model/cartesian-charts.js.map +1 -0
- package/{model-circle-pack.d.ts → model/circle-pack.d.ts} +1 -1
- package/{model-circle-pack.js → model/circle-pack.js} +3 -3
- package/model/circle-pack.js.map +1 -0
- package/{model-gauge.d.ts → model/gauge.d.ts} +0 -0
- package/{model-gauge.js → model/gauge.js} +1 -1
- package/model/gauge.js.map +1 -0
- package/{model-meter.d.ts → model/meter.d.ts} +0 -0
- package/{model-meter.js → model/meter.js} +3 -3
- package/model/meter.js.map +1 -0
- package/{model.d.ts → model/model.d.ts} +17 -3
- package/{model.js → model/model.js} +126 -14
- package/model/model.js.map +1 -0
- package/{model-pie.d.ts → model/pie.d.ts} +0 -0
- package/{model-pie.js → model/pie.js} +1 -1
- package/model/pie.js.map +1 -0
- package/package.json +1 -1
- package/services/essentials/dom-utils.js +18 -0
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/scales-cartesian.js +31 -7
- package/services/scales-cartesian.js.map +1 -1
- package/services/service.d.ts +1 -1
- package/services/service.js.map +1 -1
- package/services/zoom.d.ts +1 -1
- package/services/zoom.js.map +1 -1
- package/styles/_chart-holder.scss +5 -2
- package/styles/colors.scss +2 -0
- package/styles/components/_ruler.scss +2 -1
- package/styles/styles.scss +4 -0
- package/styles-g10.css +135 -2
- package/styles-g10.css.map +1 -1
- package/styles-g10.min.css +1 -1
- package/styles-g10.min.css.map +1 -1
- package/styles-g100.css +135 -2
- package/styles-g100.css.map +1 -1
- package/styles-g100.min.css +1 -1
- package/styles-g100.min.css.map +1 -1
- package/styles-g90.css +135 -2
- package/styles-g90.css.map +1 -1
- package/styles-g90.min.css +1 -1
- package/styles-g90.min.css.map +1 -1
- package/styles.css +135 -2
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tools.d.ts +1 -0
- package/tools.js +2 -1
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +260 -149
- package/model-boxplot.js.map +0 -1
- package/model-cartesian-charts.js.map +0 -1
- package/model-circle-pack.js.map +0 -1
- package/model-gauge.js.map +0 -1
- package/model-meter.js.map +0 -1
- package/model-pie.js.map +0 -1
- package/model.js.map +0 -1
|
@@ -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,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
|
|
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,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;
|
|
@@ -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?:
|
|
151
|
-
bottom?:
|
|
152
|
-
right?:
|
|
153
|
-
top?:
|
|
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
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartModelCartesian } from './
|
|
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 {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartModel } from './model';
|
|
2
|
-
import { LegendItemType } from '
|
|
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 '
|
|
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
|
-
|
|
37
|
-
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { Service } from './service';
|
|
2
|
-
import { ChartModelCartesian } from '../model
|
|
2
|
+
import { ChartModelCartesian } from '../model/cartesian-charts';
|
|
3
3
|
export declare class Zoom extends Service {
|
|
4
4
|
protected model: ChartModelCartesian;
|
|
5
5
|
isZoomBarEnabled(): boolean;
|
package/build/src/tools.d.ts
CHANGED