ca-components 1.0.63 → 1.0.65

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.
@@ -22,7 +22,10 @@ export declare class CaChartComponent implements AfterViewInit {
22
22
  private setChartOptionsProperties;
23
23
  private setChartDataProperties;
24
24
  private setChartPluginsProperties;
25
+ private updateChartAnnotations;
25
26
  private setMultipleYAxis;
27
+ private resetAnnotations;
28
+ private setVerticalDashedAnnotationLine;
26
29
  static ɵfac: i0.ɵɵFactoryDeclaration<CaChartComponent, never>;
27
30
  static ɵcmp: i0.ɵɵComponentDeclaration<CaChartComponent, "app-ca-chart", never, { "chartConfig": { "alias": "chartConfig"; "required": false; }; "isDatasetHovered": { "alias": "isDatasetHovered"; "required": false; }; }, {}, never, never, true, never>;
28
31
  }
@@ -0,0 +1,8 @@
1
+ export declare enum EChartAnnotationType {
2
+ LINE = "line",
3
+ BOX = "box",
4
+ ELLIPSE = "ellipse",
5
+ LABEL = "label",
6
+ POINT = "point",
7
+ POLYGON = "polygon"
8
+ }
@@ -1,4 +1,4 @@
1
- export declare enum ChartEventProperties {
1
+ export declare enum EChartEventProperties {
2
2
  X = "x",
3
3
  Y = "y",
4
4
  Y_AXIS_0 = "y-axis-0"
@@ -6,3 +6,4 @@ export * from './chart-event-types.enum';
6
6
  export * from './chart-event-properties.enum';
7
7
  export * from './chart-images.enum';
8
8
  export * from './chart-font-properties.enum';
9
+ export * from './chart-annotation-type.enum';
@@ -0,0 +1,10 @@
1
+ import { EChartAnnotationType, EChartEventProperties } from "../enums";
2
+ export interface IChartAnnotation {
3
+ id?: string;
4
+ value: number;
5
+ type: EChartAnnotationType;
6
+ color?: string;
7
+ borderWidth?: number;
8
+ borderDash?: [number, number];
9
+ axis: EChartEventProperties;
10
+ }
@@ -1,5 +1,6 @@
1
1
  import { ChartOptions, ChartType } from 'chart.js';
2
2
  import { IBaseDataset, IChartData } from '../models';
3
+ import { IChartAnnotation } from './chart-annotation.model';
3
4
  export interface IChartConfiguration {
4
5
  chartType: ChartType;
5
6
  chartData: IChartData<IBaseDataset>;
@@ -11,4 +12,6 @@ export interface IChartConfiguration {
11
12
  isStacked?: boolean;
12
13
  showTooltipBackground?: boolean;
13
14
  showXAxisLabels?: boolean;
15
+ annotations?: IChartAnnotation[];
16
+ hasVerticalDashedAnnotation?: boolean;
14
17
  }
@@ -2,3 +2,4 @@ export * from './chart-data.model';
2
2
  export * from './chart-base-dataset.model';
3
3
  export * from './chart-line-dataset.model';
4
4
  export * from './chart-config.model';
5
+ export * from './chart-annotation.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ca-components",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.13",
6
6
  "@angular/core": "^18.2.13",