axidio-styleguide-library1-v2 0.2.9 → 0.2.10

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,53 +1,57 @@
1
- import { OnInit, ElementRef, EventEmitter } from '@angular/core';
2
- import { ComponentUniqueId } from '../unique-id';
1
+ import { OnInit, OnChanges, ElementRef, EventEmitter, SimpleChanges } from '@angular/core';
3
2
  import { ResizedEvent } from 'angular-resize-event';
3
+ import { ComponentUniqueId } from '../unique-id';
4
4
  import * as i0 from "@angular/core";
5
- export declare class GuageChartComponent extends ComponentUniqueId implements OnInit {
6
- containerElt: ElementRef;
7
- guagecontainerElt: ElementRef;
5
+ export declare class GuageChartComponent extends ComponentUniqueId implements OnInit, OnChanges {
6
+ chartContainer: ElementRef;
7
+ gaugeWrapper: ElementRef;
8
8
  chartData: any;
9
9
  customChartConfiguration: any;
10
10
  clickEvent: EventEmitter<any>;
11
11
  headerMenuclickEvent: EventEmitter<any>;
12
12
  chartConfiguration: any;
13
- dataType: any;
13
+ dataType: string;
14
14
  datatype_status: boolean;
15
- uniqueId: any;
15
+ uniqueId: string;
16
16
  isHeaderVisible: boolean;
17
17
  defaultConfiguration: any;
18
18
  constructor();
19
19
  get isAlertEnabled(): boolean;
20
20
  ngOnInit(): void;
21
- ngOnChanges(): void;
21
+ ngOnChanges(changes: SimpleChanges): void;
22
22
  onResized(event: ResizedEvent): void;
23
- /** -------------------------------
24
- * Main Initialization Function
25
- * ------------------------------*/
26
- initializeLineChart(): void;
27
- /** -------------------------------
28
- * Modular Helper Functions
29
- * ------------------------------*/
30
- private setupChartConfiguration;
31
- private getColorMap;
32
- private configureDataType;
33
- private calculateDataReady;
34
- private setupContainer;
35
- private createSvg;
36
- private adjustDimensionsAndRadius;
23
+ /** ---------------------------------------------
24
+ * CHART RENDERING
25
+ * --------------------------------------------- */
26
+ private renderChart;
27
+ /** Merge custom config into default config */
28
+ private mergeConfigurations;
29
+ /** Handle currency or unit type */
30
+ private setDataType;
31
+ /** Resolve color map based on colorType */
32
+ private resolveColorMap;
33
+ /** Compute difference between consecutive data points */
34
+ private computeDataDiffs;
35
+ /** Convert data differences into cumulative angles */
37
36
  private computeAngles;
38
- private createArc;
39
- private drawGaugeArcs;
37
+ /** D3 utility methods */
38
+ private deg2rad;
39
+ private getChartWidth;
40
+ private getChartHeight;
41
+ private createSvgContainer;
42
+ private adjustScaleFactors;
43
+ /** Draw the colored arcs */
44
+ private drawArcs;
45
+ /** Draw the pointer indicator */
40
46
  private drawPointer;
47
+ /** Draw the numeric labels around the arc */
41
48
  private drawLabels;
42
- private buildLabelArray;
43
- private drawCenterTexts;
44
- private centerTranslation;
49
+ /** Draw central text blocks (value, status, date range) */
50
+ private drawTextBlocks;
45
51
  private centerSvg;
46
- /** -------------------------------
47
- * Event Handlers
48
- * ------------------------------*/
52
+ /** Event Emitters */
49
53
  handleClick(d: any): void;
50
- handleHeaderMenuClick(id: any): void;
54
+ handleHeaderMenuClick(id: string): void;
51
55
  static ɵfac: i0.ɵɵFactoryDeclaration<GuageChartComponent, never>;
52
56
  static ɵcmp: i0.ɵɵComponentDeclaration<GuageChartComponent, "lib-guage-chart", never, { "chartData": { "alias": "chartData"; "required": false; }; "customChartConfiguration": { "alias": "customChartConfiguration"; "required": false; }; }, { "clickEvent": "clickEvent"; "headerMenuclickEvent": "headerMenuclickEvent"; }, never, never, false, never>;
53
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axidio-styleguide-library1-v2",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.1",
6
6
  "@angular/core": "^17.3.1",