axidio-styleguide-library1-v2 0.2.27 → 0.2.29

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.
@@ -2,43 +2,168 @@ import { OnInit, ElementRef, EventEmitter } from '@angular/core';
2
2
  import { ComponentUniqueId } from '../unique-id';
3
3
  import { ResizedEvent } from 'angular-resize-event';
4
4
  import * as i0 from "@angular/core";
5
+ interface ChartData {
6
+ data: any[];
7
+ metaData: ChartMetaData;
8
+ lineData?: any[];
9
+ targetLineData?: TargetLineData;
10
+ dropdownData1?: any;
11
+ dropdownData2?: any;
12
+ }
13
+ interface ChartMetaData {
14
+ colors: {
15
+ [key: string]: string;
16
+ };
17
+ colorAboveTarget?: {
18
+ [key: string]: string;
19
+ };
20
+ keyList: string[];
21
+ hasDrillDown?: boolean;
22
+ barWithoutClick?: string[];
23
+ dataType?: string;
24
+ yLabel?: string;
25
+ xLabel?: string;
26
+ lineyLabel?: string;
27
+ }
28
+ interface TargetLineData {
29
+ target: number;
30
+ targetName?: string;
31
+ color: string;
32
+ }
33
+ interface ChartConfiguration {
34
+ margin: {
35
+ top: number;
36
+ right: number;
37
+ bottom: number;
38
+ left: number;
39
+ };
40
+ labelFormatter: Function;
41
+ svgHeight: number;
42
+ numberOfYTicks: number;
43
+ legendJustified: boolean;
44
+ yLineAxisLabelFomatter: Function;
45
+ yAxisLabelFomatter: Function;
46
+ lineGraphColor: string;
47
+ showLineChartAxis: boolean;
48
+ showValues: boolean;
49
+ headerMenuOptions: any[];
50
+ xAxisGrid?: boolean;
51
+ yAxisGrid: boolean;
52
+ legendVisible: boolean;
53
+ isHeaderVisible?: boolean;
54
+ isTransparentBackground?: boolean;
55
+ isMultiChartGridLine?: boolean;
56
+ isFullScreen?: boolean;
57
+ customYscale?: number;
58
+ textsOnBar?: boolean;
59
+ isXaxisLabelHidden?: boolean;
60
+ isYaxisLabelHidden: boolean;
61
+ isYaxisHidden?: boolean;
62
+ isYaxisDashed?: boolean;
63
+ textFormatter?: string;
64
+ isNoAlternateXaxisText?: boolean;
65
+ isXgridBetweenLabels?: boolean;
66
+ backgroundColor: string;
67
+ hideLegendOnTop: boolean;
68
+ isXaxisColor: string;
69
+ labelOverlapMinorFix: boolean;
70
+ noHoverEffect: boolean;
71
+ noHoverDisplayData: boolean;
72
+ showXaxisTop: boolean;
73
+ displayYaxisLabels?: boolean;
74
+ xLabelsOnSameLine?: boolean;
75
+ textAlwaysHorizontal?: boolean;
76
+ legendAtTopRight?: boolean;
77
+ isDrilldownChart?: boolean;
78
+ displayTitleOnTop?: boolean;
79
+ isToggleVisible?: boolean;
80
+ isTitleHidden?: boolean;
81
+ isDisplayBarDetailsAtBottom?: boolean;
82
+ howmanyBarDetailsToDisplay: number;
83
+ barVauleColor?: string;
84
+ isRia?: boolean;
85
+ yAxisCustomTextStyles?: string;
86
+ yAxisCustomlabelStyles?: string;
87
+ xAxisCustomlabelStyles?: string;
88
+ }
5
89
  export declare class GroupChartComponent extends ComponentUniqueId implements OnInit {
6
90
  containerElt: ElementRef;
7
91
  groupcontainerElt: ElementRef;
8
- chartData: any;
9
- customChartConfiguration: any;
92
+ chartData: ChartData;
93
+ customChartConfiguration: Partial<ChartConfiguration>;
10
94
  clickEvent: EventEmitter<any>;
11
95
  headerMenuclickEvent: EventEmitter<any>;
12
96
  isHeaderVisible: boolean;
13
97
  legendVisible: boolean;
14
98
  isTransparentBackground: boolean;
15
- chartConfiguration: any;
99
+ chartConfiguration: ChartConfiguration;
16
100
  objectKeys: {
17
101
  (o: object): string[];
18
102
  (o: {}): string[];
19
103
  };
20
- defaultConfiguration: any;
21
- uniqueId: any;
104
+ private readonly CONSTANTS;
105
+ private readonly defaultConfiguration;
106
+ uniqueId: string;
22
107
  isZoomedOut: boolean;
23
108
  isDD1Open: boolean;
24
109
  isDD2Open: boolean;
25
110
  constructor();
111
+ ngOnInit(): void;
112
+ get isAlertEnabled(): boolean;
26
113
  onResized(event: ResizedEvent): void;
27
- isZoomOutSelected(isZoomOut: any, event: any): void;
28
114
  handleZoominZoomoutClick({ isZoomOut, event }: {
29
115
  isZoomOut: any;
30
116
  event: any;
31
117
  }): void;
32
- ngOnInit(): void;
33
118
  isLegendVisible(): boolean;
34
- keepOrder: (a: any, b: any) => any;
35
- get isAlertEnabled(): boolean;
119
+ keepOrder: (a: any) => any;
120
+ private initializeConfiguration;
36
121
  initializegroupChart(): void;
122
+ private prepareMetaData;
123
+ private calculateDimensions;
124
+ private adjustWidthForZoom;
125
+ private calculateHeight;
126
+ private createSvgContainers;
127
+ private createLeftYAxis;
128
+ private createRightYAxis;
129
+ private createScales;
130
+ private createXScales;
131
+ private createYScale;
132
+ private createSubgroupScale;
133
+ private createLineYScale;
134
+ private renderAxes;
135
+ private renderXAxis;
136
+ private renderYAxis;
137
+ private renderGridLines;
138
+ private applyAxisVisibility;
139
+ private renderBars;
140
+ private prepareBarData;
141
+ private handleBarClick;
142
+ private getBarX;
143
+ private getBarWidth;
144
+ private adjustScaleForWidth;
145
+ private getBarHeight;
146
+ private getBarColor;
147
+ private handleMouseOver;
148
+ private getTooltipX;
149
+ private getTooltipWidth;
150
+ private getTempScale;
151
+ private getTooltipHtml;
152
+ private handleMouseOut;
153
+ private renderLabels;
154
+ private renderYLabel;
155
+ private renderXLabel;
156
+ private renderLineYLabel;
157
+ private isAcronym;
158
+ private renderTargetLine;
159
+ private renderLineGraph;
160
+ private handleLinePointClick;
37
161
  handleClick(d: any): void;
38
- handleHeaderMenuClick(id: any): void;
39
- handleDD1Click(event: any): void;
40
- handleDD2Click(event: any): void;
162
+ handleHeaderMenuClick(id: string): void;
163
+ handleDD1Click(event: Event): void;
164
+ handleDD2Click(event: Event): void;
41
165
  handleCompareByFilterSelection(event: any): void;
42
166
  static ɵfac: i0.ɵɵFactoryDeclaration<GroupChartComponent, never>;
43
167
  static ɵcmp: i0.ɵɵComponentDeclaration<GroupChartComponent, "lib-group-chart", never, { "chartData": { "alias": "chartData"; "required": false; }; "customChartConfiguration": { "alias": "customChartConfiguration"; "required": false; }; }, { "clickEvent": "clickEvent"; "headerMenuclickEvent": "headerMenuclickEvent"; }, never, never, false, never>;
44
168
  }
169
+ export {};
@@ -1,35 +1,160 @@
1
- import { OnInit, ElementRef, EventEmitter } from '@angular/core';
1
+ import { OnInit, ElementRef, EventEmitter, OnChanges } from '@angular/core';
2
2
  import { ComponentUniqueId } from '../unique-id';
3
+ import ChartHelper from '../chart-helper';
3
4
  import { ResizedEvent } from 'angular-resize-event';
4
5
  import * as i0 from "@angular/core";
5
- export declare class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId implements OnInit {
6
+ interface ChartData {
7
+ data: any[];
8
+ metaData: ChartMetaData;
9
+ lineData?: any[];
10
+ targetLineData?: TargetLineData;
11
+ }
12
+ interface ChartMetaData {
13
+ unit?: string;
14
+ isCC?: boolean;
15
+ barWithoutClick?: string[];
16
+ colors: {
17
+ [key: string]: string;
18
+ };
19
+ keyList: string[];
20
+ dataType?: string;
21
+ hasDrillDown?: boolean;
22
+ hoverColor?: string;
23
+ yLabel?: string;
24
+ xLabel?: string;
25
+ lineyLabel?: string;
26
+ }
27
+ interface TargetLineData {
28
+ target: string | number;
29
+ color: string;
30
+ targetName?: string;
31
+ barAboveTargetColor?: string;
32
+ barAboveTargetHoverColor?: string;
33
+ }
34
+ export declare class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId implements OnInit, OnChanges {
6
35
  containerElt: ElementRef;
7
36
  verticalstackedcontainerElt: ElementRef;
8
- chartData: any;
37
+ chartData: ChartData | any;
9
38
  customChartConfiguration: any;
10
39
  clickEvent: EventEmitter<any>;
11
40
  headerMenuclickEvent: EventEmitter<any>;
12
41
  chartConfiguration: any;
13
42
  isHeaderVisible: boolean;
14
43
  isTopCaptionVisible: boolean;
15
- uniqueId: any;
44
+ uniqueId: string;
16
45
  isTransparentBackground: boolean;
17
- defaultConfiguration: any;
18
46
  isCC: boolean;
19
47
  isZoomedOut: boolean;
48
+ private readonly CONSTANTS;
49
+ defaultConfiguration: {
50
+ margin: {
51
+ top: number;
52
+ right: number;
53
+ bottom: number;
54
+ left: number;
55
+ };
56
+ svgHeight: number;
57
+ legendHeight: string;
58
+ numberOfYTicks: number;
59
+ labelFormatter: typeof ChartHelper.defaultFormatter;
60
+ xAxisLabelFomatter: typeof ChartHelper.defaultFormatter;
61
+ yAxisLabelFomatter: typeof ChartHelper.defaultFormatter;
62
+ yLineAxisLabelFomatter: typeof ChartHelper.defaultFormatter;
63
+ lineGraphColor: string;
64
+ showLineChartAxis: boolean;
65
+ showLegend: boolean;
66
+ forComparison: boolean;
67
+ headerMenuOptions: {
68
+ name: string;
69
+ id: string;
70
+ }[];
71
+ yAxisGrid: boolean;
72
+ isHeaderVisible: undefined;
73
+ isTransparentBackground: undefined;
74
+ isTopCaptionVisible: undefined;
75
+ isMultiChartGridLine: undefined;
76
+ isFullScreen: undefined;
77
+ customYscale: undefined;
78
+ isXaxisLabelHidden: undefined;
79
+ isYaxisLabelHidden: undefined;
80
+ isYaxisHidden: undefined;
81
+ isYaxisDashed: undefined;
82
+ isXaxisColor: undefined;
83
+ textFormatter: undefined;
84
+ showTotalOnTop: undefined;
85
+ backendFormatterHasPriority: undefined;
86
+ showAngledLabels: undefined;
87
+ isNoAlternateXaxisText: undefined;
88
+ isXgridBetweenLabels: undefined;
89
+ showXaxisTop: undefined;
90
+ xAxisGrid: undefined;
91
+ xLabelsOnSameLine: undefined;
92
+ hideXaxisTick: undefined;
93
+ isDrilldownChart: undefined;
94
+ isTargetLine: undefined;
95
+ displayTitleOnTop: undefined;
96
+ isToggleVisible: undefined;
97
+ isTitleHidden: undefined;
98
+ };
20
99
  constructor();
21
- isZoomOutSelected(isZoomOut: any): void;
100
+ ngOnInit(): void;
22
101
  ngOnChanges(): void;
23
102
  onResized(event: ResizedEvent): void;
24
- ngOnInit(): void;
103
+ isZoomOutSelected(isZoomOut: boolean): void;
104
+ private removeExistingChart;
105
+ private getDeviceConfig;
106
+ private configureResponsiveSettings;
107
+ private mergeConfigurations;
108
+ private prepareMetaData;
109
+ private calculateDimensions;
110
+ private createSvgContainers;
111
+ private createScales;
112
+ private createAxes;
113
+ private renderBars;
114
+ private appendRectangles;
115
+ private getBarColor;
116
+ private addInteractions;
117
+ private handleMouseOver;
118
+ private getHoverColor;
119
+ private displayTooltip;
120
+ private calculateTooltipX;
121
+ private generateTooltipHtml;
122
+ private handleMouseOut;
123
+ private renderAxisLabels;
124
+ private addYAxisLabel;
125
+ private addXAxisLabel;
126
+ private isAcronymLabel;
127
+ private getYAxisLabelClass;
128
+ private getXAxisLabelClass;
129
+ private applyConfigurationFlags;
25
130
  initializeStackedChart(): void;
131
+ private renderGrids;
132
+ private renderAxes;
133
+ private renderStandardAxes;
134
+ private renderMobileXAxis;
135
+ private renderDrilldownAxes;
136
+ private renderMultiChartAxes;
137
+ private applyAxisStyling;
138
+ private applyAxisConfigurations;
139
+ private renderCustomXAxis;
140
+ private styleCustomXAxisTicks;
141
+ private applyXLabelsOnSameLine;
142
+ private renderDataLabels;
143
+ private renderTopLabels;
144
+ private renderAngledLabels;
145
+ private renderTargetLine;
146
+ private parseTargetValue;
147
+ private renderTargetLabel;
148
+ private renderLineChart;
149
+ private renderLineDots;
26
150
  handleClick(d: any): void;
27
151
  handleHeaderMenuClick(id: any): void;
28
152
  handleCompareByFilterSelection(event: any): void;
29
153
  handleZoominZoomoutClick({ isZoomOut, event }: {
30
- isZoomOut: any;
154
+ isZoomOut: boolean;
31
155
  event: any;
32
156
  }): void;
33
157
  static ɵfac: i0.ɵɵFactoryDeclaration<HorizontalBarsWithScrollZoomComponent, never>;
34
158
  static ɵcmp: i0.ɵɵComponentDeclaration<HorizontalBarsWithScrollZoomComponent, "lib-horizontal-bars-with-scroll-zoom", never, { "chartData": { "alias": "chartData"; "required": false; }; "customChartConfiguration": { "alias": "customChartConfiguration"; "required": false; }; }, { "clickEvent": "clickEvent"; "headerMenuclickEvent": "headerMenuclickEvent"; }, never, never, false, never>;
35
159
  }
160
+ export {};
@@ -34,6 +34,40 @@ export declare class HorizontalGroupedBarWithScrollZoomComponent extends Compone
34
34
  keepOrder: (a: any, b: any) => any;
35
35
  get isAlertEnabled(): boolean;
36
36
  initializegroupChart(): void;
37
+ private renderXAxis;
38
+ private applyXLabelsOnSameLine;
39
+ private calculateXLabelYPosition;
40
+ private formatXLabelText;
41
+ private calculateMaxValue;
42
+ private setupLineYScale;
43
+ private renderGridLines;
44
+ private setupXSubgroupScale;
45
+ private renderBars;
46
+ private prepareBarData;
47
+ private handleBarClick;
48
+ private calculateBarX;
49
+ private calculateDrilldownBarX;
50
+ private calculateBarY;
51
+ private calculateBarWidth;
52
+ private calculateBarHeight;
53
+ private getBarColor;
54
+ private renderBarLabels;
55
+ private formatBarLabel;
56
+ private calculateLabelFontSize;
57
+ private calculateLabelTransform;
58
+ private handleMouseOver;
59
+ private calculateTooltipX;
60
+ private calculateTooltipWidth;
61
+ private generateTooltipHTML;
62
+ private handleMouseOut;
63
+ private renderYAxis;
64
+ private applyAxisVisibilityConfig;
65
+ private renderAxisLabels;
66
+ private isLabelAcronym;
67
+ private getXLabelClass;
68
+ private renderTargetLine;
69
+ private renderLineChart;
70
+ private handleZoomOut;
37
71
  private calculateChartDimensions;
38
72
  private createChartContainers;
39
73
  handleClick(d: any): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axidio-styleguide-library1-v2",
3
- "version": "0.2.27",
3
+ "version": "0.2.29",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.1",
6
6
  "@angular/core": "^17.3.1",