@swimlane/ngx-charts 18.0.1 → 19.2.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/bundles/swimlane-ngx-charts.umd.js +1259 -497
- package/bundles/swimlane-ngx-charts.umd.js.map +1 -1
- package/esm2015/lib/area-chart/area-chart-normalized.component.js +12 -9
- package/esm2015/lib/area-chart/area-chart-stacked.component.js +10 -7
- package/esm2015/lib/area-chart/area-chart.component.js +7 -6
- package/esm2015/lib/area-chart/area-chart.module.js +1 -1
- package/esm2015/lib/area-chart/area-series.component.js +2 -2
- package/esm2015/lib/bar-chart/bar-chart.module.js +1 -1
- package/esm2015/lib/bar-chart/bar-horizontal-2d.component.js +10 -7
- package/esm2015/lib/bar-chart/bar-horizontal-normalized.component.js +10 -7
- package/esm2015/lib/bar-chart/bar-horizontal-stacked.component.js +10 -7
- package/esm2015/lib/bar-chart/bar-horizontal.component.js +4 -3
- package/esm2015/lib/bar-chart/bar-label.component.js +2 -2
- package/esm2015/lib/bar-chart/bar-vertical-2d.component.js +10 -7
- package/esm2015/lib/bar-chart/bar-vertical-normalized.component.js +10 -7
- package/esm2015/lib/bar-chart/bar-vertical-stacked.component.js +10 -7
- package/esm2015/lib/bar-chart/bar-vertical.component.js +5 -3
- package/esm2015/lib/bar-chart/bar.component.js +5 -9
- package/esm2015/lib/bar-chart/series-horizontal.component.js +11 -8
- package/esm2015/lib/bar-chart/series-vertical.component.js +11 -8
- package/esm2015/lib/bar-chart/types/bar-chart-type.enum.js +1 -1
- package/esm2015/lib/bar-chart/types/bar.model.js +1 -1
- package/esm2015/lib/bar-chart/types/d0-type.enum.js +1 -1
- package/esm2015/lib/box-chart/box-chart.component.js +254 -0
- package/esm2015/lib/box-chart/box-chart.module.js +15 -0
- package/esm2015/lib/box-chart/box-series.component.js +183 -0
- package/esm2015/lib/box-chart/box.component.js +294 -0
- package/esm2015/lib/bubble-chart/bubble-chart.component.js +5 -4
- package/esm2015/lib/bubble-chart/bubble-chart.module.js +1 -1
- package/esm2015/lib/bubble-chart/bubble-chart.utils.js +17 -14
- package/esm2015/lib/bubble-chart/bubble-series.component.js +8 -4
- package/esm2015/lib/common/area.component.js +14 -9
- package/esm2015/lib/common/axes/axes.module.js +1 -1
- package/esm2015/lib/common/axes/axis-label.component.js +1 -1
- package/esm2015/lib/common/axes/ticks.helper.js +1 -1
- package/esm2015/lib/common/axes/x-axis-ticks.component.js +1 -1
- package/esm2015/lib/common/axes/x-axis.component.js +3 -3
- package/esm2015/lib/common/axes/y-axis-ticks.component.js +1 -1
- package/esm2015/lib/common/axes/y-axis.component.js +1 -1
- package/esm2015/lib/common/base-chart.component.js +3 -3
- package/esm2015/lib/common/chart-common.module.js +1 -1
- package/esm2015/lib/common/charts/chart.component.js +4 -10
- package/esm2015/lib/common/circle-series.component.js +13 -7
- package/esm2015/lib/common/circle.component.js +1 -1
- package/esm2015/lib/common/color.helper.js +34 -19
- package/esm2015/lib/common/constants/font-widths.js +1 -1
- package/esm2015/lib/common/count/count.directive.js +1 -1
- package/esm2015/lib/common/count/count.helper.js +1 -1
- package/esm2015/lib/common/domain.helper.js +39 -2
- package/esm2015/lib/common/grid-layout.helper.js +1 -1
- package/esm2015/lib/common/grid-panel-series.component.js +4 -8
- package/esm2015/lib/common/grid-panel.component.js +1 -1
- package/esm2015/lib/common/label.helper.js +1 -1
- package/esm2015/lib/common/legend/advanced-legend.component.js +3 -3
- package/esm2015/lib/common/legend/legend-entry.component.js +1 -1
- package/esm2015/lib/common/legend/legend.component.js +2 -2
- package/esm2015/lib/common/legend/scale-legend.component.js +2 -2
- package/esm2015/lib/common/shape.helper.js +1 -1
- package/esm2015/lib/common/svg-linear-gradient.component.js +5 -9
- package/esm2015/lib/common/svg-radial-gradient.component.js +1 -1
- package/esm2015/lib/common/tick-format.helper.js +1 -1
- package/esm2015/lib/common/timeline/timeline.component.js +9 -14
- package/esm2015/lib/common/tooltip/injection-registery.service.js +1 -1
- package/esm2015/lib/common/tooltip/injection.service.js +3 -3
- package/esm2015/lib/common/tooltip/position/index.js +2 -2
- package/esm2015/lib/common/tooltip/position/placement-type.enum.js +9 -0
- package/esm2015/lib/common/tooltip/position/position.js +2 -2
- package/esm2015/lib/common/tooltip/show.type.js +1 -1
- package/esm2015/lib/common/tooltip/style.type.js +3 -3
- package/esm2015/lib/common/tooltip/tooltip.component.js +2 -2
- package/esm2015/lib/common/tooltip/tooltip.directive.js +1 -2
- package/esm2015/lib/common/tooltip/tooltip.module.js +1 -1
- package/esm2015/lib/common/tooltip/tooltip.service.js +1 -1
- package/esm2015/lib/common/tooltip-area.component.js +8 -4
- package/esm2015/lib/common/trim-label.helper.js +1 -1
- package/esm2015/lib/common/types/bar-orientation.enum.js +6 -0
- package/esm2015/lib/common/types/gradient.interface.js +1 -1
- package/esm2015/lib/common/types/legend.model.js +1 -1
- package/esm2015/lib/common/types/orientation.enum.js +1 -1
- package/esm2015/lib/common/types/scale-type.enum.js +1 -1
- package/esm2015/lib/common/types/text-anchor.enum.js +1 -1
- package/esm2015/lib/common/types/view-dimension.interface.js +1 -1
- package/esm2015/lib/common/view-dimensions.helper.js +3 -2
- package/esm2015/lib/events.js +1 -1
- package/esm2015/lib/gauge/gauge-arc.component.js +7 -3
- package/esm2015/lib/gauge/gauge-axis.component.js +2 -2
- package/esm2015/lib/gauge/gauge.component.js +4 -3
- package/esm2015/lib/gauge/gauge.module.js +1 -1
- package/esm2015/lib/gauge/linear-gauge.component.js +7 -5
- package/esm2015/lib/heat-map/heat-map-cell-series.component.js +7 -3
- package/esm2015/lib/heat-map/heat-map-cell.component.js +9 -3
- package/esm2015/lib/heat-map/heat-map.component.js +4 -3
- package/esm2015/lib/heat-map/heat-map.module.js +1 -1
- package/esm2015/lib/line-chart/line-chart.component.js +5 -4
- package/esm2015/lib/line-chart/line-chart.module.js +1 -1
- package/esm2015/lib/line-chart/line-series.component.js +5 -3
- package/esm2015/lib/line-chart/line.component.js +1 -1
- package/esm2015/lib/models/chart-data.model.js +1 -1
- package/esm2015/lib/models/coordinates.model.js +2 -0
- package/esm2015/lib/ngx-charts.module.js +3 -1
- package/esm2015/lib/number-card/card-series.component.js +1 -1
- package/esm2015/lib/number-card/card.component.js +1 -1
- package/esm2015/lib/number-card/number-card.component.js +3 -3
- package/esm2015/lib/number-card/number-card.module.js +1 -1
- package/esm2015/lib/pie-chart/advanced-pie-chart.component.js +3 -3
- package/esm2015/lib/pie-chart/pie-arc.component.js +4 -8
- package/esm2015/lib/pie-chart/pie-chart.component.js +4 -3
- package/esm2015/lib/pie-chart/pie-chart.module.js +1 -1
- package/esm2015/lib/pie-chart/pie-grid-series.component.js +1 -1
- package/esm2015/lib/pie-chart/pie-grid.component.js +9 -5
- package/esm2015/lib/pie-chart/pie-label.component.js +2 -2
- package/esm2015/lib/pie-chart/pie-series.component.js +7 -3
- package/esm2015/lib/polar-chart/polar-chart.component.js +8 -5
- package/esm2015/lib/polar-chart/polar-chart.module.js +1 -1
- package/esm2015/lib/polar-chart/polar-series.component.js +10 -5
- package/esm2015/lib/polyfills.js +1 -1
- package/esm2015/lib/tree-map/tree-map-cell-series.component.js +7 -3
- package/esm2015/lib/tree-map/tree-map-cell.component.js +9 -3
- package/esm2015/lib/tree-map/tree-map.component.js +3 -3
- package/esm2015/lib/tree-map/tree-map.module.js +1 -1
- package/esm2015/lib/utils/calculate-width.js +1 -1
- package/esm2015/lib/utils/color-sets.js +2 -2
- package/esm2015/lib/utils/color-utils.js +1 -1
- package/esm2015/lib/utils/id.js +1 -1
- package/esm2015/lib/utils/sort.js +1 -1
- package/esm2015/lib/utils/throttle.js +1 -1
- package/esm2015/lib/utils/types.js +1 -1
- package/esm2015/lib/utils/visibility-observer.js +1 -1
- package/esm2015/public-api.js +13 -3
- package/esm2015/swimlane-ngx-charts.js +1 -2
- package/fesm2015/swimlane-ngx-charts.js +1109 -309
- package/fesm2015/swimlane-ngx-charts.js.map +1 -1
- package/lib/area-chart/area-chart-normalized.component.d.ts +7 -3
- package/lib/area-chart/area-chart-stacked.component.d.ts +5 -1
- package/lib/area-chart/area-chart.component.d.ts +7 -5
- package/lib/area-chart/area-series.component.d.ts +2 -1
- package/lib/bar-chart/bar-horizontal-2d.component.d.ts +7 -3
- package/lib/bar-chart/bar-horizontal-normalized.component.d.ts +7 -3
- package/lib/bar-chart/bar-horizontal-stacked.component.d.ts +7 -3
- package/lib/bar-chart/bar-horizontal.component.d.ts +3 -1
- package/lib/bar-chart/bar-label.component.d.ts +2 -1
- package/lib/bar-chart/bar-vertical-2d.component.d.ts +7 -3
- package/lib/bar-chart/bar-vertical-normalized.component.d.ts +7 -3
- package/lib/bar-chart/bar-vertical-stacked.component.d.ts +7 -3
- package/lib/bar-chart/bar-vertical.component.d.ts +4 -2
- package/lib/bar-chart/bar.component.d.ts +3 -8
- package/lib/bar-chart/series-horizontal.component.d.ts +8 -6
- package/lib/bar-chart/series-vertical.component.d.ts +6 -4
- package/lib/bar-chart/types/bar.model.d.ts +3 -1
- package/lib/box-chart/box-chart.component.d.ts +73 -0
- package/lib/box-chart/box-chart.module.d.ts +2 -0
- package/lib/box-chart/box-series.component.d.ts +39 -0
- package/lib/box-chart/box.component.d.ts +72 -0
- package/lib/bubble-chart/bubble-chart.component.d.ts +3 -1
- package/lib/bubble-chart/bubble-chart.utils.d.ts +3 -2
- package/lib/bubble-chart/bubble-series.component.d.ts +5 -1
- package/lib/common/area.component.d.ts +4 -2
- package/lib/common/axes/x-axis.component.d.ts +1 -1
- package/lib/common/base-chart.component.d.ts +5 -3
- package/lib/common/circle-series.component.d.ts +10 -4
- package/lib/common/circle.component.d.ts +4 -4
- package/lib/common/color.helper.d.ts +5 -3
- package/lib/common/domain.helper.d.ts +6 -1
- package/lib/common/grid-panel-series.component.d.ts +2 -5
- package/lib/common/legend/advanced-legend.component.d.ts +5 -5
- package/lib/common/legend/legend.component.d.ts +1 -1
- package/lib/common/svg-linear-gradient.component.d.ts +2 -6
- package/lib/common/timeline/timeline.component.d.ts +3 -7
- package/lib/common/tooltip/position/index.d.ts +1 -1
- package/lib/common/tooltip/position/{placement.type.d.ts → placement-type.enum.d.ts} +0 -0
- package/lib/common/tooltip/position/position.d.ts +1 -1
- package/lib/common/tooltip/style.type.d.ts +2 -2
- package/lib/common/tooltip/tooltip.directive.d.ts +1 -1
- package/lib/common/tooltip-area.component.d.ts +5 -1
- package/lib/common/types/bar-orientation.enum.d.ts +4 -0
- package/lib/common/view-dimensions.helper.d.ts +2 -1
- package/lib/events.d.ts +1 -4
- package/lib/gauge/gauge-arc.component.d.ts +4 -0
- package/lib/gauge/gauge-axis.component.d.ts +1 -1
- package/lib/gauge/gauge.component.d.ts +2 -1
- package/lib/gauge/linear-gauge.component.d.ts +3 -1
- package/lib/heat-map/heat-map-cell-series.component.d.ts +4 -0
- package/lib/heat-map/heat-map-cell.component.d.ts +3 -1
- package/lib/heat-map/heat-map.component.d.ts +4 -2
- package/lib/line-chart/line-chart.component.d.ts +3 -1
- package/lib/line-chart/line-series.component.d.ts +4 -1
- package/lib/models/chart-data.model.d.ts +28 -0
- package/lib/models/coordinates.model.d.ts +8 -0
- package/lib/number-card/card-series.component.d.ts +4 -1
- package/lib/number-card/number-card.component.d.ts +1 -1
- package/lib/pie-chart/advanced-pie-chart.component.d.ts +1 -1
- package/lib/pie-chart/pie-arc.component.d.ts +2 -1
- package/lib/pie-chart/pie-chart.component.d.ts +3 -2
- package/lib/pie-chart/pie-grid.component.d.ts +5 -1
- package/lib/pie-chart/pie-label.component.d.ts +1 -4
- package/lib/pie-chart/pie-series.component.d.ts +5 -1
- package/lib/polar-chart/polar-chart.component.d.ts +5 -1
- package/lib/polar-chart/polar-series.component.d.ts +6 -1
- package/lib/tree-map/tree-map-cell-series.component.d.ts +5 -1
- package/lib/tree-map/tree-map-cell.component.d.ts +3 -1
- package/lib/tree-map/tree-map.component.d.ts +1 -1
- package/lib/utils/color-sets.d.ts +1 -1
- package/package.json +10 -10
- package/public-api.d.ts +12 -2
- package/swimlane-ngx-charts.d.ts +0 -1
- package/swimlane-ngx-charts.metadata.json +1 -1
- package/bundles/swimlane-ngx-charts.umd.min.js +0 -16
- package/bundles/swimlane-ngx-charts.umd.min.js.map +0 -1
- package/esm2015/lib/common/tooltip/position/placement.type.js +0 -9
- package/esm2015/lib/common/types/index.js +0 -7
- package/lib/common/types/index.d.ts +0 -6
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef, TrackByFunction } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
4
|
-
import { ViewDimensions, LegendPosition, LegendOptions, ScaleType } from '../common/types';
|
|
5
4
|
import { Series } from '../models/chart-data.model';
|
|
5
|
+
import { SeriesType } from '../common/circle-series.component';
|
|
6
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
7
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
8
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
6
9
|
export declare class AreaChartNormalizedComponent extends BaseChartComponent {
|
|
7
10
|
legend: boolean;
|
|
8
11
|
legendTitle: string;
|
|
@@ -53,6 +56,7 @@ export declare class AreaChartNormalizedComponent extends BaseChartComponent {
|
|
|
53
56
|
yAxisWidth: number;
|
|
54
57
|
filteredDomain: any;
|
|
55
58
|
legendOptions: LegendOptions;
|
|
59
|
+
seriesType: typeof SeriesType;
|
|
56
60
|
timelineWidth: any;
|
|
57
61
|
timelineHeight: number;
|
|
58
62
|
timelineXScale: any;
|
|
@@ -70,7 +74,7 @@ export declare class AreaChartNormalizedComponent extends BaseChartComponent {
|
|
|
70
74
|
updateHoveredVertical(item: any): void;
|
|
71
75
|
hideCircles(): void;
|
|
72
76
|
onClick(data: any, series?: any): void;
|
|
73
|
-
trackBy
|
|
77
|
+
trackBy: TrackByFunction<Series>;
|
|
74
78
|
setColors(): void;
|
|
75
79
|
getLegendOptions(): LegendOptions;
|
|
76
80
|
updateYAxisWidth({ width }: {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
4
|
-
import {
|
|
4
|
+
import { SeriesType } from '../common/circle-series.component';
|
|
5
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
6
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
7
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
5
8
|
export declare class AreaChartStackedComponent extends BaseChartComponent {
|
|
6
9
|
legend: boolean;
|
|
7
10
|
legendTitle: string;
|
|
@@ -62,6 +65,7 @@ export declare class AreaChartStackedComponent extends BaseChartComponent {
|
|
|
62
65
|
timelineXDomain: any;
|
|
63
66
|
timelineTransform: any;
|
|
64
67
|
timelinePadding: number;
|
|
68
|
+
seriesType: typeof SeriesType;
|
|
65
69
|
update(): void;
|
|
66
70
|
updateTimeline(): void;
|
|
67
71
|
getXDomain(): any[];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef, TrackByFunction } from '@angular/core';
|
|
2
2
|
import { CurveFactory } from 'd3-shape';
|
|
3
3
|
import { ColorHelper } from '../common/color.helper';
|
|
4
4
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Series } from '../models/chart-data.model';
|
|
6
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
7
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
8
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
7
9
|
export declare class AreaChartComponent extends BaseChartComponent {
|
|
8
10
|
legend: boolean;
|
|
9
11
|
legendTitle: string;
|
|
@@ -73,13 +75,13 @@ export declare class AreaChartComponent extends BaseChartComponent {
|
|
|
73
75
|
getYDomain(): [number, number];
|
|
74
76
|
getSeriesDomain(): string[];
|
|
75
77
|
getXScale(domain: any, width: number): number;
|
|
76
|
-
getYScale(domain:
|
|
78
|
+
getYScale(domain: [number, number], height: number): any;
|
|
77
79
|
getScaleType(values: any): ScaleType;
|
|
78
80
|
updateDomain(domain: any): void;
|
|
79
81
|
updateHoveredVertical(item: any): void;
|
|
80
82
|
hideCircles(): void;
|
|
81
83
|
onClick(data: any, series?: Series): void;
|
|
82
|
-
trackBy
|
|
84
|
+
trackBy: TrackByFunction<Series>;
|
|
83
85
|
setColors(): void;
|
|
84
86
|
getLegendOptions(): LegendOptions;
|
|
85
87
|
updateYAxisWidth({ width }: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
|
-
import { Gradient
|
|
3
|
+
import { Gradient } from '../common/types/gradient.interface';
|
|
4
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
4
5
|
import { AreaChartSeries } from '../models/chart-data.model';
|
|
5
6
|
export declare class AreaSeriesComponent implements OnChanges {
|
|
6
7
|
data: AreaChartSeries;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef, TrackByFunction } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { DataItem } from '../models/chart-data.model';
|
|
4
4
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
5
|
-
import {
|
|
5
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
6
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
7
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
8
|
+
import { BarOrientation } from '../common/types/bar-orientation.enum';
|
|
6
9
|
export declare class BarHorizontal2DComponent extends BaseChartComponent {
|
|
7
10
|
legend: boolean;
|
|
8
11
|
legendTitle: string;
|
|
@@ -52,6 +55,7 @@ export declare class BarHorizontal2DComponent extends BaseChartComponent {
|
|
|
52
55
|
yAxisWidth: number;
|
|
53
56
|
legendOptions: LegendOptions;
|
|
54
57
|
dataLabelMaxWidth: any;
|
|
58
|
+
barOrientation: typeof BarOrientation;
|
|
55
59
|
update(): void;
|
|
56
60
|
getGroupScale(): any;
|
|
57
61
|
getInnerScale(): any;
|
|
@@ -61,7 +65,7 @@ export declare class BarHorizontal2DComponent extends BaseChartComponent {
|
|
|
61
65
|
getValueDomain(): [number, number];
|
|
62
66
|
groupTransform(group: DataItem): string;
|
|
63
67
|
onClick(data: any, group?: DataItem): void;
|
|
64
|
-
trackBy
|
|
68
|
+
trackBy: TrackByFunction<DataItem>;
|
|
65
69
|
setColors(): void;
|
|
66
70
|
getLegendOptions(): LegendOptions;
|
|
67
71
|
updateYAxisWidth({ width }: {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef, TrackByFunction } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { Series } from '../models/chart-data.model';
|
|
4
4
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
5
|
-
import {
|
|
5
|
+
import { BarChartType } from './types/bar-chart-type.enum';
|
|
6
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
7
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
8
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
6
9
|
export declare class BarHorizontalNormalizedComponent extends BaseChartComponent {
|
|
7
10
|
legend: boolean;
|
|
8
11
|
legendTitle: string;
|
|
@@ -45,6 +48,7 @@ export declare class BarHorizontalNormalizedComponent extends BaseChartComponent
|
|
|
45
48
|
xAxisHeight: number;
|
|
46
49
|
yAxisWidth: number;
|
|
47
50
|
legendOptions: LegendOptions;
|
|
51
|
+
barChartType: typeof BarChartType;
|
|
48
52
|
update(): void;
|
|
49
53
|
getGroupDomain(): string[];
|
|
50
54
|
getInnerDomain(): string[];
|
|
@@ -52,7 +56,7 @@ export declare class BarHorizontalNormalizedComponent extends BaseChartComponent
|
|
|
52
56
|
getXScale(): any;
|
|
53
57
|
groupTransform(group: Series): string;
|
|
54
58
|
onClick(data: any, group?: Series): void;
|
|
55
|
-
trackBy
|
|
59
|
+
trackBy: TrackByFunction<Series>;
|
|
56
60
|
setColors(): void;
|
|
57
61
|
getLegendOptions(): LegendOptions;
|
|
58
62
|
updateYAxisWidth({ width }: {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef, TrackByFunction } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { Series } from '../models/chart-data.model';
|
|
4
4
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
5
|
-
import {
|
|
5
|
+
import { BarChartType } from './types/bar-chart-type.enum';
|
|
6
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
7
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
8
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
6
9
|
export declare class BarHorizontalStackedComponent extends BaseChartComponent {
|
|
7
10
|
legend: boolean;
|
|
8
11
|
legendTitle: string;
|
|
@@ -49,6 +52,7 @@ export declare class BarHorizontalStackedComponent extends BaseChartComponent {
|
|
|
49
52
|
yAxisWidth: number;
|
|
50
53
|
legendOptions: LegendOptions;
|
|
51
54
|
dataLabelMaxWidth: any;
|
|
55
|
+
barChartType: typeof BarChartType;
|
|
52
56
|
update(): void;
|
|
53
57
|
getGroupDomain(): string[];
|
|
54
58
|
getInnerDomain(): string[];
|
|
@@ -57,7 +61,7 @@ export declare class BarHorizontalStackedComponent extends BaseChartComponent {
|
|
|
57
61
|
getXScale(): any;
|
|
58
62
|
groupTransform(group: Series): string;
|
|
59
63
|
onClick(data: any, group?: Series): void;
|
|
60
|
-
trackBy
|
|
64
|
+
trackBy: TrackByFunction<Series>;
|
|
61
65
|
setColors(): void;
|
|
62
66
|
getLegendOptions(): LegendOptions;
|
|
63
67
|
updateYAxisWidth({ width }: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
4
|
-
import {
|
|
4
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
5
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
6
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
5
7
|
export declare class BarHorizontalComponent extends BaseChartComponent {
|
|
6
8
|
legend: boolean;
|
|
7
9
|
legendTitle: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges, ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { BarOrientation } from '../common/types/bar-orientation.enum';
|
|
2
3
|
export declare class BarLabelComponent implements OnChanges {
|
|
3
4
|
value: any;
|
|
4
5
|
valueFormatting: any;
|
|
@@ -6,7 +7,7 @@ export declare class BarLabelComponent implements OnChanges {
|
|
|
6
7
|
barY: any;
|
|
7
8
|
barWidth: any;
|
|
8
9
|
barHeight: any;
|
|
9
|
-
orientation:
|
|
10
|
+
orientation: BarOrientation;
|
|
10
11
|
dimensionsChanged: EventEmitter<any>;
|
|
11
12
|
element: any;
|
|
12
13
|
x: number;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef, TrackByFunction } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { DataItem } from '../models/chart-data.model';
|
|
4
4
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
5
|
-
import {
|
|
5
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
6
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
7
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
8
|
+
import { BarOrientation } from '../common/types/bar-orientation.enum';
|
|
6
9
|
export declare class BarVertical2DComponent extends BaseChartComponent {
|
|
7
10
|
legend: boolean;
|
|
8
11
|
legendTitle: string;
|
|
@@ -53,6 +56,7 @@ export declare class BarVertical2DComponent extends BaseChartComponent {
|
|
|
53
56
|
yAxisWidth: number;
|
|
54
57
|
legendOptions: LegendOptions;
|
|
55
58
|
dataLabelMaxHeight: any;
|
|
59
|
+
barOrientation: typeof BarOrientation;
|
|
56
60
|
update(): void;
|
|
57
61
|
onDataLabelMaxHeightChanged(event: any, groupIndex: number): void;
|
|
58
62
|
getGroupScale(): any;
|
|
@@ -63,7 +67,7 @@ export declare class BarVertical2DComponent extends BaseChartComponent {
|
|
|
63
67
|
getValueDomain(): [number, number];
|
|
64
68
|
groupTransform(group: DataItem): string;
|
|
65
69
|
onClick(data: any, group?: DataItem): void;
|
|
66
|
-
trackBy
|
|
70
|
+
trackBy: TrackByFunction<DataItem>;
|
|
67
71
|
setColors(): void;
|
|
68
72
|
getLegendOptions(): LegendOptions;
|
|
69
73
|
updateYAxisWidth({ width }: {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef, TrackByFunction } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { Series } from '../models/chart-data.model';
|
|
4
4
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
5
|
-
import {
|
|
5
|
+
import { BarChartType } from './types/bar-chart-type.enum';
|
|
6
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
7
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
8
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
6
9
|
export declare class BarVerticalNormalizedComponent extends BaseChartComponent {
|
|
7
10
|
legend: boolean;
|
|
8
11
|
legendTitle: string;
|
|
@@ -45,6 +48,7 @@ export declare class BarVerticalNormalizedComponent extends BaseChartComponent {
|
|
|
45
48
|
xAxisHeight: number;
|
|
46
49
|
yAxisWidth: number;
|
|
47
50
|
legendOptions: LegendOptions;
|
|
51
|
+
barChartType: typeof BarChartType;
|
|
48
52
|
update(): void;
|
|
49
53
|
getGroupDomain(): string[];
|
|
50
54
|
getInnerDomain(): string[];
|
|
@@ -52,7 +56,7 @@ export declare class BarVerticalNormalizedComponent extends BaseChartComponent {
|
|
|
52
56
|
getYScale(): any;
|
|
53
57
|
groupTransform(group: Series): string;
|
|
54
58
|
onClick(data: any, group?: Series): void;
|
|
55
|
-
trackBy
|
|
59
|
+
trackBy: TrackByFunction<Series>;
|
|
56
60
|
setColors(): void;
|
|
57
61
|
getLegendOptions(): LegendOptions;
|
|
58
62
|
updateYAxisWidth({ width }: {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef, TrackByFunction } from '@angular/core';
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { Series } from '../models/chart-data.model';
|
|
4
4
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
5
|
-
import {
|
|
5
|
+
import { BarChartType } from './types/bar-chart-type.enum';
|
|
6
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
7
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
8
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
6
9
|
export declare class BarVerticalStackedComponent extends BaseChartComponent {
|
|
7
10
|
legend: boolean;
|
|
8
11
|
legendTitle: string;
|
|
@@ -50,6 +53,7 @@ export declare class BarVerticalStackedComponent extends BaseChartComponent {
|
|
|
50
53
|
yAxisWidth: number;
|
|
51
54
|
legendOptions: LegendOptions;
|
|
52
55
|
dataLabelMaxHeight: any;
|
|
56
|
+
barChartType: typeof BarChartType;
|
|
53
57
|
update(): void;
|
|
54
58
|
getGroupDomain(): string[];
|
|
55
59
|
getInnerDomain(): string[];
|
|
@@ -59,7 +63,7 @@ export declare class BarVerticalStackedComponent extends BaseChartComponent {
|
|
|
59
63
|
onDataLabelMaxHeightChanged(event: any, groupIndex: number): void;
|
|
60
64
|
groupTransform(group: Series): string;
|
|
61
65
|
onClick(data: any, group?: Series): void;
|
|
62
|
-
trackBy
|
|
66
|
+
trackBy: TrackByFunction<Series>;
|
|
63
67
|
setColors(): void;
|
|
64
68
|
getLegendOptions(): LegendOptions;
|
|
65
69
|
updateYAxisWidth({ width }: {
|
|
@@ -2,7 +2,9 @@ import { EventEmitter, TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { ColorHelper } from '../common/color.helper';
|
|
3
3
|
import { BaseChartComponent } from '../common/base-chart.component';
|
|
4
4
|
import { DataItem } from '../models/chart-data.model';
|
|
5
|
-
import {
|
|
5
|
+
import { LegendOptions, LegendPosition } from '../common/types/legend.model';
|
|
6
|
+
import { ScaleType } from '../common/types/scale-type.enum';
|
|
7
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
6
8
|
export declare class BarVerticalComponent extends BaseChartComponent {
|
|
7
9
|
legend: boolean;
|
|
8
10
|
legendTitle: string;
|
|
@@ -55,7 +57,7 @@ export declare class BarVerticalComponent extends BaseChartComponent {
|
|
|
55
57
|
getYScale(): any;
|
|
56
58
|
getXDomain(): any[];
|
|
57
59
|
getYDomain(): [number, number];
|
|
58
|
-
onClick(data: DataItem): void;
|
|
60
|
+
onClick(data: DataItem | string): void;
|
|
59
61
|
setColors(): void;
|
|
60
62
|
getLegendOptions(): {
|
|
61
63
|
scaleType: any;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
2
|
-
import { Gradient } from '../common/types';
|
|
1
|
+
import { ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
2
|
import { DataItem } from '../models/chart-data.model';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Horizontal = "horizontal"
|
|
7
|
-
}
|
|
3
|
+
import { BarOrientation } from '../common/types/bar-orientation.enum';
|
|
4
|
+
import { Gradient } from '../common/types/gradient.interface';
|
|
8
5
|
export declare class BarComponent implements OnChanges {
|
|
9
6
|
fill: string;
|
|
10
7
|
data: DataItem;
|
|
@@ -28,7 +25,6 @@ export declare class BarComponent implements OnChanges {
|
|
|
28
25
|
path: string;
|
|
29
26
|
gradientId: string;
|
|
30
27
|
gradientFill: string;
|
|
31
|
-
startOpacity: number;
|
|
32
28
|
gradientStops: Gradient[];
|
|
33
29
|
hasGradient: boolean;
|
|
34
30
|
hideBar: boolean;
|
|
@@ -47,4 +43,3 @@ export declare class BarComponent implements OnChanges {
|
|
|
47
43
|
onMouseLeave(): void;
|
|
48
44
|
private checkToHideBar;
|
|
49
45
|
}
|
|
50
|
-
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
-
import { DataItem, StringOrNumberOrDate
|
|
3
|
-
import { ViewDimensions } from '../common/types';
|
|
2
|
+
import { DataItem, StringOrNumberOrDate } from '../models/chart-data.model';
|
|
4
3
|
import { ColorHelper } from '../common/color.helper';
|
|
5
4
|
import { PlacementTypes } from '../common/tooltip/position';
|
|
6
5
|
import { StyleTypes } from '../common/tooltip/style.type';
|
|
7
6
|
import { BarChartType } from './types/bar-chart-type.enum';
|
|
8
7
|
import { Bar } from './types/bar.model';
|
|
8
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
9
|
+
import { BarOrientation } from '../common/types/bar-orientation.enum';
|
|
9
10
|
export declare class SeriesHorizontal implements OnChanges {
|
|
10
11
|
dims: ViewDimensions;
|
|
11
12
|
type: BarChartType;
|
|
@@ -15,8 +16,8 @@ export declare class SeriesHorizontal implements OnChanges {
|
|
|
15
16
|
colors: ColorHelper;
|
|
16
17
|
tooltipDisabled: boolean;
|
|
17
18
|
gradient: boolean;
|
|
18
|
-
activeEntries:
|
|
19
|
-
seriesName:
|
|
19
|
+
activeEntries: DataItem[];
|
|
20
|
+
seriesName: StringOrNumberOrDate;
|
|
20
21
|
tooltipTemplate: TemplateRef<any>;
|
|
21
22
|
roundEdges: boolean;
|
|
22
23
|
animations: boolean;
|
|
@@ -28,7 +29,7 @@ export declare class SeriesHorizontal implements OnChanges {
|
|
|
28
29
|
deactivate: EventEmitter<any>;
|
|
29
30
|
dataLabelWidthChanged: EventEmitter<{
|
|
30
31
|
size: Event;
|
|
31
|
-
index:
|
|
32
|
+
index: number;
|
|
32
33
|
}>;
|
|
33
34
|
tooltipPlacement: PlacementTypes;
|
|
34
35
|
tooltipType: StyleTypes;
|
|
@@ -41,11 +42,12 @@ export declare class SeriesHorizontal implements OnChanges {
|
|
|
41
42
|
total: number;
|
|
42
43
|
series: string;
|
|
43
44
|
}>;
|
|
45
|
+
barOrientation: typeof BarOrientation;
|
|
44
46
|
ngOnChanges(changes: SimpleChanges): void;
|
|
45
47
|
update(): void;
|
|
46
48
|
updateDataLabels(): void;
|
|
47
49
|
updateTooltipSettings(): void;
|
|
48
|
-
isActive(entry:
|
|
50
|
+
isActive(entry: DataItem): boolean;
|
|
49
51
|
getLabel(dataItem: DataItem): StringOrNumberOrDate;
|
|
50
52
|
trackBy(index: number, bar: Bar): string;
|
|
51
53
|
trackDataLabelBy(index: number, barLabel: any): string;
|
|
@@ -2,10 +2,11 @@ import { EventEmitter, OnChanges, TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { DataItem, StringOrNumberOrDate } from '../models/chart-data.model';
|
|
3
3
|
import { PlacementTypes } from '../common/tooltip/position';
|
|
4
4
|
import { StyleTypes } from '../common/tooltip/style.type';
|
|
5
|
-
import { ViewDimensions } from '../common/types';
|
|
6
5
|
import { ColorHelper } from '../common/color.helper';
|
|
7
6
|
import { BarChartType } from './types/bar-chart-type.enum';
|
|
8
7
|
import { Bar } from './types/bar.model';
|
|
8
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
9
|
+
import { BarOrientation } from '../common/types/bar-orientation.enum';
|
|
9
10
|
export declare class SeriesVerticalComponent implements OnChanges {
|
|
10
11
|
dims: ViewDimensions;
|
|
11
12
|
type: BarChartType;
|
|
@@ -14,8 +15,8 @@ export declare class SeriesVerticalComponent implements OnChanges {
|
|
|
14
15
|
yScale: any;
|
|
15
16
|
colors: ColorHelper;
|
|
16
17
|
gradient: boolean;
|
|
17
|
-
activeEntries:
|
|
18
|
-
seriesName:
|
|
18
|
+
activeEntries: DataItem[];
|
|
19
|
+
seriesName: StringOrNumberOrDate;
|
|
19
20
|
tooltipDisabled: boolean;
|
|
20
21
|
tooltipTemplate: TemplateRef<any>;
|
|
21
22
|
roundEdges: boolean;
|
|
@@ -38,11 +39,12 @@ export declare class SeriesVerticalComponent implements OnChanges {
|
|
|
38
39
|
total: number;
|
|
39
40
|
series: string;
|
|
40
41
|
}>;
|
|
42
|
+
barOrientation: typeof BarOrientation;
|
|
41
43
|
ngOnChanges(changes: any): void;
|
|
42
44
|
update(): void;
|
|
43
45
|
updateDataLabels(): void;
|
|
44
46
|
updateTooltipSettings(): void;
|
|
45
|
-
isActive(entry:
|
|
47
|
+
isActive(entry: DataItem): boolean;
|
|
46
48
|
onClick(data: DataItem): void;
|
|
47
49
|
getLabel(dataItem: DataItem): StringOrNumberOrDate;
|
|
48
50
|
trackBy(index: number, bar: Bar): string;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { DataItem } from '../../models/chart-data.model';
|
|
2
|
+
import { Gradient } from '../../common/types/gradient.interface';
|
|
2
3
|
export interface Bar {
|
|
3
4
|
ariaLabel: string;
|
|
4
5
|
color: string;
|
|
5
6
|
data: DataItem;
|
|
6
7
|
formattedLabel: string;
|
|
8
|
+
gradientStops: Gradient[];
|
|
7
9
|
height: number;
|
|
8
10
|
label: string;
|
|
9
|
-
|
|
11
|
+
roundEdges: boolean;
|
|
10
12
|
tooltipText: string;
|
|
11
13
|
value: number;
|
|
12
14
|
width: number;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import { BaseChartComponent } from '../common/base-chart.component';
|
|
3
|
+
import { ColorHelper } from '../common/color.helper';
|
|
4
|
+
import { BoxChartMultiSeries, BoxChartSeries, IBoxModel, StringOrNumberOrDate } from '../models/chart-data.model';
|
|
5
|
+
import { ScaleLinear, ScaleBand } from 'd3-scale';
|
|
6
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
7
|
+
import { LegendPosition, LegendOptions } from '../common/types/legend.model';
|
|
8
|
+
export declare class BoxChartComponent extends BaseChartComponent {
|
|
9
|
+
/** Show or hide the legend. */
|
|
10
|
+
legend: boolean;
|
|
11
|
+
legendPosition: LegendPosition;
|
|
12
|
+
legendTitle: string;
|
|
13
|
+
/** I think it is better to handle legend options as single Input object of type ILegendOptions */
|
|
14
|
+
legendOptionsConfig: LegendOptions;
|
|
15
|
+
showGridLines: boolean;
|
|
16
|
+
xAxis: boolean;
|
|
17
|
+
yAxis: boolean;
|
|
18
|
+
showXAxisLabel: boolean;
|
|
19
|
+
showYAxisLabel: boolean;
|
|
20
|
+
roundDomains: boolean;
|
|
21
|
+
xAxisLabel: string;
|
|
22
|
+
yAxisLabel: string;
|
|
23
|
+
roundEdges: boolean;
|
|
24
|
+
strokeColor: string;
|
|
25
|
+
strokeWidth: number;
|
|
26
|
+
tooltipDisabled: boolean;
|
|
27
|
+
gradient: boolean;
|
|
28
|
+
select: EventEmitter<IBoxModel>;
|
|
29
|
+
activate: EventEmitter<IBoxModel>;
|
|
30
|
+
deactivate: EventEmitter<IBoxModel>;
|
|
31
|
+
tooltipTemplate: TemplateRef<any>;
|
|
32
|
+
/** Input Data, this came from Base Chart Component. */
|
|
33
|
+
results: BoxChartMultiSeries;
|
|
34
|
+
/** Chart Dimensions, this came from Base Chart Component. */
|
|
35
|
+
dims: ViewDimensions;
|
|
36
|
+
/** Color data. */
|
|
37
|
+
colors: ColorHelper;
|
|
38
|
+
/** Transform string css attribute for the chart container */
|
|
39
|
+
transform: string;
|
|
40
|
+
/** Chart Margins (For each side, counterclock wise). */
|
|
41
|
+
margin: [number, number, number, number];
|
|
42
|
+
/** Legend Options object to handle positioning, title, colors and domain. */
|
|
43
|
+
legendOptions: LegendOptions;
|
|
44
|
+
xScale: ScaleBand<string>;
|
|
45
|
+
yScale: ScaleLinear<number, number>;
|
|
46
|
+
xDomain: StringOrNumberOrDate[];
|
|
47
|
+
yDomain: number[];
|
|
48
|
+
seriesDomain: string[];
|
|
49
|
+
/** Chart X axis dimension. */
|
|
50
|
+
xAxisHeight: number;
|
|
51
|
+
/** Chart Y axis dimension. */
|
|
52
|
+
yAxisWidth: number;
|
|
53
|
+
trackBy(index: number, item: BoxChartSeries): StringOrNumberOrDate;
|
|
54
|
+
update(): void;
|
|
55
|
+
setColors(): void;
|
|
56
|
+
setScales(): void;
|
|
57
|
+
getXScale(domain: Array<string | number | Date>, width: number): ScaleBand<string>;
|
|
58
|
+
getYScale(domain: number[], height: number): ScaleLinear<number, number>;
|
|
59
|
+
getUniqueBoxChartXDomainValues(results: BoxChartMultiSeries): (string | number | Date)[];
|
|
60
|
+
getXDomain(): Array<string | number | Date>;
|
|
61
|
+
getYDomain(): number[];
|
|
62
|
+
getSeriesDomain(): string[];
|
|
63
|
+
updateYAxisWidth({ width }: {
|
|
64
|
+
width: any;
|
|
65
|
+
}): void;
|
|
66
|
+
updateXAxisHeight({ height }: {
|
|
67
|
+
height: any;
|
|
68
|
+
}): void;
|
|
69
|
+
onClick(data: IBoxModel): void;
|
|
70
|
+
onActivate(data: IBoxModel): void;
|
|
71
|
+
onDeactivate(data: IBoxModel): void;
|
|
72
|
+
private getLegendOptions;
|
|
73
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ScaleLinear, ScaleBand } from 'd3-scale';
|
|
3
|
+
import { IBoxModel, BoxChartSeries, DataItem } from '../models/chart-data.model';
|
|
4
|
+
import { IVector2D } from '../models/coordinates.model';
|
|
5
|
+
import { ColorHelper } from '../common/color.helper';
|
|
6
|
+
import { StyleTypes } from '../common/tooltip/style.type';
|
|
7
|
+
import { PlacementTypes } from '../common/tooltip/position';
|
|
8
|
+
import { ViewDimensions } from '../common/types/view-dimension.interface';
|
|
9
|
+
export declare class BoxSeriesComponent implements OnChanges {
|
|
10
|
+
dims: ViewDimensions;
|
|
11
|
+
series: BoxChartSeries;
|
|
12
|
+
xScale: ScaleBand<string>;
|
|
13
|
+
yScale: ScaleLinear<number, number>;
|
|
14
|
+
colors: ColorHelper;
|
|
15
|
+
animations: boolean;
|
|
16
|
+
strokeColor: string;
|
|
17
|
+
strokeWidth: number;
|
|
18
|
+
tooltipDisabled: boolean;
|
|
19
|
+
tooltipTemplate: TemplateRef<any>;
|
|
20
|
+
tooltipPlacement: PlacementTypes;
|
|
21
|
+
tooltipType: StyleTypes;
|
|
22
|
+
roundEdges: boolean;
|
|
23
|
+
gradient: boolean;
|
|
24
|
+
select: EventEmitter<IBoxModel>;
|
|
25
|
+
activate: EventEmitter<IBoxModel>;
|
|
26
|
+
deactivate: EventEmitter<IBoxModel>;
|
|
27
|
+
box: IBoxModel;
|
|
28
|
+
counts: DataItem[];
|
|
29
|
+
quartiles: [number, number, number];
|
|
30
|
+
whiskers: [number, number];
|
|
31
|
+
lineCoordinates: [IVector2D, IVector2D, IVector2D, IVector2D];
|
|
32
|
+
tooltipTitle: string;
|
|
33
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
34
|
+
onClick(data: IBoxModel): void;
|
|
35
|
+
update(): void;
|
|
36
|
+
getBoxQuantiles(inputData: Array<number | Date>): [number, number, number];
|
|
37
|
+
getLinesCoordinates(seriesName: string, whiskers: [number, number], quartiles: [number, number, number], barWidth: number): [IVector2D, IVector2D, IVector2D, IVector2D];
|
|
38
|
+
updateTooltipSettings(): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, SimpleChanges, OnChanges, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { BaseType } from 'd3-selection';
|
|
3
|
+
import { IBoxModel } from '../models/chart-data.model';
|
|
4
|
+
import { IVector2D } from '../models/coordinates.model';
|
|
5
|
+
import { BarOrientation } from '../common/types/bar-orientation.enum';
|
|
6
|
+
import { Gradient } from '../common/types/gradient.interface';
|
|
7
|
+
declare type LineCoordinates = [IVector2D, IVector2D, IVector2D, IVector2D];
|
|
8
|
+
export declare class BoxComponent implements OnChanges {
|
|
9
|
+
protected cd: ChangeDetectorRef;
|
|
10
|
+
strokeColor: string;
|
|
11
|
+
strokeWidth: number;
|
|
12
|
+
fill: string;
|
|
13
|
+
data: IBoxModel;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
lineCoordinates: LineCoordinates;
|
|
19
|
+
roundEdges: boolean;
|
|
20
|
+
gradient: boolean;
|
|
21
|
+
gradientStops: Gradient[];
|
|
22
|
+
offset: number;
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
animations: boolean;
|
|
25
|
+
ariaLabel: string;
|
|
26
|
+
noBarWhenZero: boolean;
|
|
27
|
+
select: EventEmitter<IBoxModel>;
|
|
28
|
+
activate: EventEmitter<IBoxModel>;
|
|
29
|
+
deactivate: EventEmitter<IBoxModel>;
|
|
30
|
+
BarOrientation: typeof BarOrientation;
|
|
31
|
+
nativeElm: any;
|
|
32
|
+
oldPath: string;
|
|
33
|
+
boxPath: string;
|
|
34
|
+
oldLineCoordinates: LineCoordinates;
|
|
35
|
+
gradientId: string;
|
|
36
|
+
gradientFill: string;
|
|
37
|
+
initialized: boolean;
|
|
38
|
+
hasGradient: boolean;
|
|
39
|
+
hideBar: boolean;
|
|
40
|
+
/** Mask Path to cut the line on the box part. */
|
|
41
|
+
maskLine: string;
|
|
42
|
+
/** Mask Path Id to keep track of the mask element */
|
|
43
|
+
maskLineId: string;
|
|
44
|
+
boxStrokeWidth: number;
|
|
45
|
+
whiskerStrokeWidth: number;
|
|
46
|
+
medianLineWidth: number;
|
|
47
|
+
constructor(element: ElementRef, cd: ChangeDetectorRef);
|
|
48
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
49
|
+
update(): void;
|
|
50
|
+
loadAnimation(): void;
|
|
51
|
+
updatePathEl(): void;
|
|
52
|
+
updateLineEl(): void;
|
|
53
|
+
/**
|
|
54
|
+
* See [D3 Selections](https://www.d3indepth.com/selections/)
|
|
55
|
+
* @param d The joined data.
|
|
56
|
+
* @param index The index of the element within the selection
|
|
57
|
+
* @param node The node element (Line).
|
|
58
|
+
*/
|
|
59
|
+
lineTween(attr: string, d: any, index: number, node: BaseType[] | ArrayLike<BaseType>): any;
|
|
60
|
+
pathTween(d1: string, precision: number): () => (t: any) => string;
|
|
61
|
+
getStartingPath(): string;
|
|
62
|
+
getPath(): string;
|
|
63
|
+
getStartingLineCoordinates(): LineCoordinates;
|
|
64
|
+
getRadius(): number;
|
|
65
|
+
getGradient(): Gradient[];
|
|
66
|
+
getStartOpacity(): number;
|
|
67
|
+
get edges(): boolean[];
|
|
68
|
+
onMouseEnter(): void;
|
|
69
|
+
onMouseLeave(): void;
|
|
70
|
+
private checkToHideBar;
|
|
71
|
+
}
|
|
72
|
+
export {};
|