axidio-styleguide-library1-v2 0.2.28 → 0.2.30

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,6 +2,62 @@ 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 ChartConfiguration {
6
+ margin: {
7
+ top: number;
8
+ right: number;
9
+ bottom: number;
10
+ left: number;
11
+ };
12
+ labelFormatter: (value: any) => string;
13
+ svgHeight: number;
14
+ numberOfYTicks: number;
15
+ legendJustified: boolean;
16
+ yLineAxisLabelFomatter: (value: any) => string;
17
+ yAxisLabelFomatter: (value: any) => string;
18
+ lineGraphColor: string;
19
+ showLineChartAxis: boolean;
20
+ showValues: boolean;
21
+ headerMenuOptions: any[];
22
+ xAxisGrid?: boolean;
23
+ yAxisGrid: boolean;
24
+ legendVisible: boolean;
25
+ isHeaderVisible?: boolean;
26
+ isTransparentBackground?: boolean;
27
+ isMultiChartGridLine?: boolean;
28
+ isFullScreen?: boolean;
29
+ customYscale?: number;
30
+ textsOnBar?: boolean;
31
+ isXaxisLabelHidden?: boolean;
32
+ isYaxisLabelHidden: boolean;
33
+ isYaxisHidden?: boolean;
34
+ isYaxisDashed?: boolean;
35
+ textFormatter?: string;
36
+ isNoAlternateXaxisText?: boolean;
37
+ isXgridBetweenLabels?: boolean;
38
+ backgroundColor: string;
39
+ hideLegendOnTop: boolean;
40
+ isXaxisColor: string;
41
+ labelOverlapMinorFix: boolean;
42
+ noHoverEffect: boolean;
43
+ noHoverDisplayData: boolean;
44
+ showXaxisTop: boolean;
45
+ displayYaxisLabels?: boolean;
46
+ xLabelsOnSameLine?: boolean;
47
+ textAlwaysHorizontal?: boolean;
48
+ legendAtTopRight?: boolean;
49
+ isDrilldownChart?: boolean;
50
+ displayTitleOnTop?: boolean;
51
+ isToggleVisible?: boolean;
52
+ isTitleHidden?: boolean;
53
+ isDisplayBarDetailsAtBottom?: boolean;
54
+ howmanyBarDetailsToDisplay: number;
55
+ barVauleColor?: string;
56
+ yAxisCustomTextStyles?: string;
57
+ yAxisCustomlabelStyles?: string;
58
+ xAxisCustomlabelStyles?: string;
59
+ isRia?: boolean;
60
+ }
5
61
  export declare class GroupChartComponent extends ComponentUniqueId implements OnInit {
6
62
  containerElt: ElementRef;
7
63
  groupcontainerElt: ElementRef;
@@ -12,33 +68,77 @@ export declare class GroupChartComponent extends ComponentUniqueId implements On
12
68
  isHeaderVisible: boolean;
13
69
  legendVisible: boolean;
14
70
  isTransparentBackground: boolean;
15
- chartConfiguration: any;
71
+ chartConfiguration: ChartConfiguration;
16
72
  objectKeys: {
17
73
  (o: object): string[];
18
74
  (o: {}): string[];
19
75
  };
20
- defaultConfiguration: any;
76
+ private readonly defaultConfiguration;
21
77
  uniqueId: any;
22
78
  isZoomedOut: boolean;
23
79
  isDD1Open: boolean;
24
80
  isDD2Open: boolean;
25
81
  constructor();
82
+ ngOnInit(): void;
83
+ get isAlertEnabled(): boolean;
26
84
  onResized(event: ResizedEvent): void;
27
- isZoomOutSelected(isZoomOut: any, event: any): void;
85
+ isZoomOutSelected(isZoomOut: boolean, event: any): void;
28
86
  handleZoominZoomoutClick({ isZoomOut, event }: {
29
87
  isZoomOut: any;
30
88
  event: any;
31
89
  }): void;
32
- ngOnInit(): void;
33
90
  isLegendVisible(): boolean;
34
91
  keepOrder: (a: any, b: any) => any;
35
- get isAlertEnabled(): boolean;
36
92
  initializegroupChart(): void;
93
+ private mergeConfigurations;
94
+ private prepareChartData;
95
+ private calculateDimensions;
96
+ private calculateWidth;
97
+ private calculateHeight;
98
+ private createScales;
99
+ private calculateMaxValue;
100
+ private createLineYScale;
101
+ private createSVGStructure;
102
+ private renderAxes;
103
+ private renderXAxis;
104
+ private renderMultiChartXAxis;
105
+ private renderXLabelsOnSameLine;
106
+ private renderYAxis;
107
+ private applyAxisVisibilitySettings;
108
+ private renderYAxisGrid;
109
+ private renderXAxisGrid;
110
+ private renderLineYAxis;
111
+ private renderBars;
112
+ private prepareBarData;
113
+ private handleBarClick;
114
+ private getBarX;
115
+ private calculateDrilldownBarX;
116
+ private adjustDrilldownScale;
117
+ private getBarWidth;
118
+ private getBarHeight;
119
+ private getBarColor;
120
+ private renderBarTexts;
121
+ private getBarTextLabel;
122
+ private getBarTextFontSize;
123
+ private getBarTextTransform;
124
+ private handleMouseOver;
125
+ private calculateTooltipX;
126
+ private calculateTooltipWidth;
127
+ private getTooltipHTML;
128
+ private handleMouseOut;
129
+ private renderLabels;
130
+ private renderYAxisLabel;
131
+ private renderXAxisLabel;
132
+ private isAcronym;
133
+ private renderLineYAxisLabel;
134
+ private renderTargetLine;
135
+ private renderLineGraph;
37
136
  handleClick(d: any): void;
38
- handleHeaderMenuClick(id: any): void;
137
+ handleHeaderMenuClick(id: string): void;
39
138
  handleDD1Click(event: any): void;
40
139
  handleDD2Click(event: any): void;
41
140
  handleCompareByFilterSelection(event: any): void;
42
141
  static ɵfac: i0.ɵɵFactoryDeclaration<GroupChartComponent, never>;
43
142
  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
143
  }
144
+ 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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axidio-styleguide-library1-v2",
3
- "version": "0.2.28",
3
+ "version": "0.2.30",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.1",
6
6
  "@angular/core": "^17.3.1",