axidio-styleguide-library1-v2 0.2.24 → 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,5 +1,6 @@
1
- import { OnInit, ElementRef, EventEmitter, OnChanges, SimpleChanges } 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
6
  interface ChartData {
@@ -9,32 +10,32 @@ interface ChartData {
9
10
  targetLineData?: TargetLineData;
10
11
  }
11
12
  interface ChartMetaData {
13
+ unit?: string;
14
+ isCC?: boolean;
15
+ barWithoutClick?: string[];
12
16
  colors: {
13
17
  [key: string]: string;
14
18
  };
15
19
  keyList: string[];
16
- unit?: string;
17
- isCC?: boolean;
18
- barWithoutClick?: string[];
20
+ dataType?: string;
19
21
  hasDrillDown?: boolean;
20
22
  hoverColor?: string;
21
- dataType?: string;
22
23
  yLabel?: string;
23
- lineyLabel?: string;
24
24
  xLabel?: string;
25
+ lineyLabel?: string;
25
26
  }
26
27
  interface TargetLineData {
27
- target: number | string;
28
- targetName?: string;
28
+ target: string | number;
29
29
  color: string;
30
+ targetName?: string;
30
31
  barAboveTargetColor?: string;
31
32
  barAboveTargetHoverColor?: string;
32
33
  }
33
34
  export declare class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId implements OnInit, OnChanges {
34
35
  containerElt: ElementRef;
35
36
  verticalstackedcontainerElt: ElementRef;
36
- chartData: ChartData;
37
- customChartConfiguration?: any;
37
+ chartData: ChartData | any;
38
+ customChartConfiguration: any;
38
39
  clickEvent: EventEmitter<any>;
39
40
  headerMenuclickEvent: EventEmitter<any>;
40
41
  chartConfiguration: any;
@@ -44,48 +45,110 @@ export declare class HorizontalBarsWithScrollZoomComponent extends ComponentUniq
44
45
  isTransparentBackground: boolean;
45
46
  isCC: boolean;
46
47
  isZoomedOut: boolean;
47
- private readonly TICK_LENGTHS;
48
- private readonly SPACING;
49
- private readonly defaultConfiguration;
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
+ };
50
99
  constructor();
51
100
  ngOnInit(): void;
52
- ngOnChanges(changes: SimpleChanges): void;
101
+ ngOnChanges(): void;
53
102
  onResized(event: ResizedEvent): void;
54
103
  isZoomOutSelected(isZoomOut: boolean): void;
55
- private redrawChart;
56
- private getDeviceBreakpoints;
57
- private applyResponsiveConfig;
104
+ private removeExistingChart;
105
+ private getDeviceConfig;
106
+ private configureResponsiveSettings;
58
107
  private mergeConfigurations;
59
108
  private prepareMetaData;
60
- private parseTargetValue;
61
109
  private calculateDimensions;
62
- private calculateBarDimensions;
110
+ private createSvgContainers;
63
111
  private createScales;
64
- private calculateYScaleDomain;
65
- private shouldShowTargetLineColor;
66
- private getBarFillColor;
67
- private isAcronym;
68
- private formatAxisLabel;
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;
69
130
  initializeStackedChart(): void;
70
- private createOuterContainer;
71
- private createAxisContainers;
72
- private createInnerContainer;
73
131
  private renderGrids;
74
- private renderBars;
75
- private addBarLabels;
76
132
  private renderAxes;
77
133
  private renderStandardAxes;
78
134
  private renderMobileXAxis;
79
135
  private renderDrilldownAxes;
80
136
  private renderMultiChartAxes;
81
- private styleAxisDomains;
82
- private renderLabels;
83
- private renderYAxisLabel;
84
- private renderXAxisLabel;
137
+ private applyAxisStyling;
138
+ private applyAxisConfigurations;
139
+ private renderCustomXAxis;
140
+ private styleCustomXAxisTicks;
141
+ private applyXLabelsOnSameLine;
142
+ private renderDataLabels;
143
+ private renderTopLabels;
144
+ private renderAngledLabels;
85
145
  private renderTargetLine;
146
+ private parseTargetValue;
147
+ private renderTargetLabel;
86
148
  private renderLineChart;
87
- handleClick(data: any): void;
88
- handleHeaderMenuClick(id: string): void;
149
+ private renderLineDots;
150
+ handleClick(d: any): void;
151
+ handleHeaderMenuClick(id: any): void;
89
152
  handleCompareByFilterSelection(event: any): void;
90
153
  handleZoominZoomoutClick({ isZoomOut, event }: {
91
154
  isZoomOut: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axidio-styleguide-library1-v2",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.1",
6
6
  "@angular/core": "^17.3.1",