axidio-styleguide-library1-v2 0.2.23 → 0.2.25

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.
@@ -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.23",
3
+ "version": "0.2.25",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.1",
6
6
  "@angular/core": "^17.3.1",