@tetacom/svg-charts 1.0.1

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.
Files changed (216) hide show
  1. package/.browserslistrc +16 -0
  2. package/README.md +24 -0
  3. package/dist/README.md +24 -0
  4. package/dist/chart/base/series-base.component.d.ts +22 -0
  5. package/dist/chart/chart/chart.component.d.ts +29 -0
  6. package/dist/chart/chart-container/chart-container.component.d.ts +42 -0
  7. package/dist/chart/chart-container/gridlines/gridlines.component.d.ts +23 -0
  8. package/dist/chart/chart-container/plotband/plotband.component.d.ts +33 -0
  9. package/dist/chart/chart-container/plotline/plotline.component.d.ts +30 -0
  10. package/dist/chart/chart-container/series/bar/bar-series.component.d.ts +25 -0
  11. package/dist/chart/chart-container/series/line/line-series.component.d.ts +28 -0
  12. package/dist/chart/chart-container/series-host/series-host.component.d.ts +20 -0
  13. package/dist/chart/chart-container/tooltip/tooltip.component.d.ts +29 -0
  14. package/dist/chart/chart-container/x-axis/x-axis.component.d.ts +23 -0
  15. package/dist/chart/chart-container/y-axis/y-axis.component.d.ts +24 -0
  16. package/dist/chart/chart.module.d.ts +22 -0
  17. package/dist/chart/core/axis/axis.d.ts +54 -0
  18. package/dist/chart/core/axis/builders/axis-size-builder.d.ts +8 -0
  19. package/dist/chart/core/axis/builders/extremes-builder.d.ts +7 -0
  20. package/dist/chart/core/axis/builders/public-api.d.ts +2 -0
  21. package/dist/chart/core/utils/generate-ticks.d.ts +1 -0
  22. package/dist/chart/core/utils/get-text-width.d.ts +1 -0
  23. package/dist/chart/core/utils/public-api.d.ts +2 -0
  24. package/dist/chart/directives/brushable.directive.d.ts +17 -0
  25. package/dist/chart/directives/zoomable.directive.d.ts +20 -0
  26. package/dist/chart/legend/legend.component.d.ts +14 -0
  27. package/dist/chart/model/axis-options.d.ts +17 -0
  28. package/dist/chart/model/base-point.d.ts +9 -0
  29. package/dist/chart/model/chart-bounds.d.ts +12 -0
  30. package/dist/chart/model/enum/axis-orientation.d.ts +4 -0
  31. package/dist/chart/model/enum/axis-type.d.ts +7 -0
  32. package/dist/chart/model/enum/brush-type.d.ts +5 -0
  33. package/dist/chart/model/enum/drag-point-type.d.ts +5 -0
  34. package/dist/chart/model/enum/series-type.d.ts +4 -0
  35. package/dist/chart/model/enum/tooltip-tracking.d.ts +4 -0
  36. package/dist/chart/model/enum/zoom-type.d.ts +5 -0
  37. package/dist/chart/model/i-broadcast-message.d.ts +5 -0
  38. package/dist/chart/model/i-builder.d.ts +3 -0
  39. package/dist/chart/model/i-chart-config.d.ts +32 -0
  40. package/dist/chart/model/i-chart-event.d.ts +4 -0
  41. package/dist/chart/model/i-display-tooltip.d.ts +6 -0
  42. package/dist/chart/model/i-point-move.d.ts +6 -0
  43. package/dist/chart/model/marker-options.d.ts +7 -0
  44. package/dist/chart/model/plotband.d.ts +31 -0
  45. package/dist/chart/model/plotline.d.ts +19 -0
  46. package/dist/chart/model/series.d.ts +17 -0
  47. package/dist/chart/model/svg-attributes.d.ts +14 -0
  48. package/dist/chart/model/tooltip-options.d.ts +8 -0
  49. package/dist/chart/service/axes.service.d.ts +11 -0
  50. package/dist/chart/service/broadcast.service.d.ts +11 -0
  51. package/dist/chart/service/brush.service.d.ts +17 -0
  52. package/dist/chart/service/chart.service.d.ts +38 -0
  53. package/dist/chart/service/scale.service.d.ts +14 -0
  54. package/dist/chart/service/zoom.service.d.ts +25 -0
  55. package/dist/esm2020/chart/base/series-base.component.mjs +34 -0
  56. package/dist/esm2020/chart/chart/chart.component.mjs +73 -0
  57. package/dist/esm2020/chart/chart-container/chart-container.component.mjs +151 -0
  58. package/dist/esm2020/chart/chart-container/gridlines/gridlines.component.mjs +41 -0
  59. package/dist/esm2020/chart/chart-container/plotband/plotband.component.mjs +139 -0
  60. package/dist/esm2020/chart/chart-container/plotline/plotline.component.mjs +79 -0
  61. package/dist/esm2020/chart/chart-container/series/bar/bar-series.component.mjs +48 -0
  62. package/dist/esm2020/chart/chart-container/series/line/line-series.component.mjs +148 -0
  63. package/dist/esm2020/chart/chart-container/series-host/series-host.component.mjs +59 -0
  64. package/dist/esm2020/chart/chart-container/tooltip/tooltip.component.mjs +81 -0
  65. package/dist/esm2020/chart/chart-container/x-axis/x-axis.component.mjs +56 -0
  66. package/dist/esm2020/chart/chart-container/y-axis/y-axis.component.mjs +63 -0
  67. package/dist/esm2020/chart/chart.module.mjs +62 -0
  68. package/dist/esm2020/chart/core/axis/axis.mjs +96 -0
  69. package/dist/esm2020/chart/core/axis/builders/axis-size-builder.mjs +24 -0
  70. package/dist/esm2020/chart/core/axis/builders/extremes-builder.mjs +32 -0
  71. package/dist/esm2020/chart/core/axis/builders/public-api.mjs +3 -0
  72. package/dist/esm2020/chart/core/utils/generate-ticks.mjs +11 -0
  73. package/dist/esm2020/chart/core/utils/get-text-width.mjs +6 -0
  74. package/dist/esm2020/chart/core/utils/public-api.mjs +3 -0
  75. package/dist/esm2020/chart/directives/brushable.directive.mjs +28 -0
  76. package/dist/esm2020/chart/directives/zoomable.directive.mjs +37 -0
  77. package/dist/esm2020/chart/legend/legend.component.mjs +30 -0
  78. package/dist/esm2020/chart/model/axis-options.mjs +2 -0
  79. package/dist/esm2020/chart/model/base-point.mjs +2 -0
  80. package/dist/esm2020/chart/model/chart-bounds.mjs +13 -0
  81. package/dist/esm2020/chart/model/enum/axis-orientation.mjs +6 -0
  82. package/dist/esm2020/chart/model/enum/axis-type.mjs +9 -0
  83. package/dist/esm2020/chart/model/enum/brush-type.mjs +7 -0
  84. package/dist/esm2020/chart/model/enum/drag-point-type.mjs +7 -0
  85. package/dist/esm2020/chart/model/enum/series-type.mjs +6 -0
  86. package/dist/esm2020/chart/model/enum/tooltip-tracking.mjs +6 -0
  87. package/dist/esm2020/chart/model/enum/zoom-type.mjs +7 -0
  88. package/dist/esm2020/chart/model/i-broadcast-message.mjs +2 -0
  89. package/dist/esm2020/chart/model/i-builder.mjs +2 -0
  90. package/dist/esm2020/chart/model/i-chart-config.mjs +2 -0
  91. package/dist/esm2020/chart/model/i-chart-event.mjs +2 -0
  92. package/dist/esm2020/chart/model/i-display-tooltip.mjs +2 -0
  93. package/dist/esm2020/chart/model/i-point-move.mjs +2 -0
  94. package/dist/esm2020/chart/model/marker-options.mjs +2 -0
  95. package/dist/esm2020/chart/model/plotband.mjs +16 -0
  96. package/dist/esm2020/chart/model/plotline.mjs +12 -0
  97. package/dist/esm2020/chart/model/series.mjs +2 -0
  98. package/dist/esm2020/chart/model/svg-attributes.mjs +2 -0
  99. package/dist/esm2020/chart/model/tooltip-options.mjs +2 -0
  100. package/dist/esm2020/chart/service/axes.service.mjs +29 -0
  101. package/dist/esm2020/chart/service/broadcast.service.mjs +25 -0
  102. package/dist/esm2020/chart/service/brush.service.mjs +67 -0
  103. package/dist/esm2020/chart/service/chart.service.mjs +76 -0
  104. package/dist/esm2020/chart/service/scale.service.mjs +64 -0
  105. package/dist/esm2020/chart/service/zoom.service.mjs +117 -0
  106. package/dist/esm2020/public-api.mjs +7 -0
  107. package/dist/esm2020/tetacom-svg-charts.mjs +5 -0
  108. package/dist/fesm2015/tetacom-svg-charts.mjs +1589 -0
  109. package/dist/fesm2015/tetacom-svg-charts.mjs.map +1 -0
  110. package/dist/fesm2020/tetacom-svg-charts.mjs +1575 -0
  111. package/dist/fesm2020/tetacom-svg-charts.mjs.map +1 -0
  112. package/dist/package.json +35 -0
  113. package/dist/public-api.d.ts +3 -0
  114. package/dist/tetacom-svg-charts.d.ts +5 -0
  115. package/karma.conf.js +44 -0
  116. package/ng-package.json +7 -0
  117. package/package.json +15 -0
  118. package/src/chart/Chart.stories.ts +397 -0
  119. package/src/chart/base/series-base.component.ts +41 -0
  120. package/src/chart/chart/chart.component.html +5 -0
  121. package/src/chart/chart/chart.component.scss +6 -0
  122. package/src/chart/chart/chart.component.spec.ts +25 -0
  123. package/src/chart/chart/chart.component.ts +97 -0
  124. package/src/chart/chart-container/chart-container.component.html +78 -0
  125. package/src/chart/chart-container/chart-container.component.scss +15 -0
  126. package/src/chart/chart-container/chart-container.component.spec.ts +25 -0
  127. package/src/chart/chart-container/chart-container.component.ts +242 -0
  128. package/src/chart/chart-container/gridlines/gridlines.component.html +7 -0
  129. package/src/chart/chart-container/gridlines/gridlines.component.scss +8 -0
  130. package/src/chart/chart-container/gridlines/gridlines.component.spec.ts +25 -0
  131. package/src/chart/chart-container/gridlines/gridlines.component.ts +55 -0
  132. package/src/chart/chart-container/plotband/plotband.component.html +58 -0
  133. package/src/chart/chart-container/plotband/plotband.component.scss +13 -0
  134. package/src/chart/chart-container/plotband/plotband.component.spec.ts +25 -0
  135. package/src/chart/chart-container/plotband/plotband.component.ts +206 -0
  136. package/src/chart/chart-container/plotline/plotline.component.html +22 -0
  137. package/src/chart/chart-container/plotline/plotline.component.scss +6 -0
  138. package/src/chart/chart-container/plotline/plotline.component.spec.ts +25 -0
  139. package/src/chart/chart-container/plotline/plotline.component.ts +113 -0
  140. package/src/chart/chart-container/series/bar/bar-series.component.html +3 -0
  141. package/src/chart/chart-container/series/bar/bar-series.component.scss +0 -0
  142. package/src/chart/chart-container/series/bar/bar-series.component.ts +71 -0
  143. package/src/chart/chart-container/series/line/line-series.component.html +38 -0
  144. package/src/chart/chart-container/series/line/line-series.component.scss +9 -0
  145. package/src/chart/chart-container/series/line/line-series.component.spec.ts +25 -0
  146. package/src/chart/chart-container/series/line/line-series.component.ts +245 -0
  147. package/src/chart/chart-container/series-host/series-host.component.ts +80 -0
  148. package/src/chart/chart-container/tooltip/tooltip.component.html +14 -0
  149. package/src/chart/chart-container/tooltip/tooltip.component.scss +7 -0
  150. package/src/chart/chart-container/tooltip/tooltip.component.spec.ts +25 -0
  151. package/src/chart/chart-container/tooltip/tooltip.component.ts +134 -0
  152. package/src/chart/chart-container/x-axis/x-axis.component.html +1 -0
  153. package/src/chart/chart-container/x-axis/x-axis.component.scss +3 -0
  154. package/src/chart/chart-container/x-axis/x-axis.component.spec.ts +25 -0
  155. package/src/chart/chart-container/x-axis/x-axis.component.ts +80 -0
  156. package/src/chart/chart-container/y-axis/y-axis.component.html +4 -0
  157. package/src/chart/chart-container/y-axis/y-axis.component.scss +13 -0
  158. package/src/chart/chart-container/y-axis/y-axis.component.spec.ts +25 -0
  159. package/src/chart/chart-container/y-axis/y-axis.component.ts +90 -0
  160. package/src/chart/chart.module.ts +40 -0
  161. package/src/chart/core/axis/axis.ts +132 -0
  162. package/src/chart/core/axis/builders/axis-size-builder.ts +37 -0
  163. package/src/chart/core/axis/builders/extremes-builder.ts +45 -0
  164. package/src/chart/core/axis/builders/public-api.ts +2 -0
  165. package/src/chart/core/utils/generate-ticks.ts +14 -0
  166. package/src/chart/core/utils/get-text-width.ts +10 -0
  167. package/src/chart/core/utils/public-api.ts +2 -0
  168. package/src/chart/default/default-chart-config.ts +12 -0
  169. package/src/chart/directives/brushable.directive.ts +30 -0
  170. package/src/chart/directives/zoomable.directive.ts +31 -0
  171. package/src/chart/legend/legend.component.html +6 -0
  172. package/src/chart/legend/legend.component.scss +20 -0
  173. package/src/chart/legend/legend.component.spec.ts +25 -0
  174. package/src/chart/legend/legend.component.ts +35 -0
  175. package/src/chart/model/axis-options.ts +18 -0
  176. package/src/chart/model/base-point.ts +10 -0
  177. package/src/chart/model/chart-bounds.ts +18 -0
  178. package/src/chart/model/enum/axis-orientation.ts +4 -0
  179. package/src/chart/model/enum/axis-type.ts +7 -0
  180. package/src/chart/model/enum/brush-type.ts +5 -0
  181. package/src/chart/model/enum/drag-point-type.ts +5 -0
  182. package/src/chart/model/enum/public-api.ts +7 -0
  183. package/src/chart/model/enum/series-type.ts +4 -0
  184. package/src/chart/model/enum/tooltip-tracking.ts +4 -0
  185. package/src/chart/model/enum/zoom-type.ts +5 -0
  186. package/src/chart/model/i-broadcast-message.ts +5 -0
  187. package/src/chart/model/i-builder.ts +3 -0
  188. package/src/chart/model/i-chart-config.ts +33 -0
  189. package/src/chart/model/i-chart-event.ts +4 -0
  190. package/src/chart/model/i-display-tooltip.ts +7 -0
  191. package/src/chart/model/i-drag-event.ts +5 -0
  192. package/src/chart/model/i-point-move.ts +7 -0
  193. package/src/chart/model/marker-options.ts +8 -0
  194. package/src/chart/model/plotband.ts +45 -0
  195. package/src/chart/model/plotline.ts +29 -0
  196. package/src/chart/model/public-api.ts +0 -0
  197. package/src/chart/model/series.ts +18 -0
  198. package/src/chart/model/svg-attributes.ts +14 -0
  199. package/src/chart/model/tooltip-options.ts +37 -0
  200. package/src/chart/service/axes.service.spec.ts +16 -0
  201. package/src/chart/service/axes.service.ts +27 -0
  202. package/src/chart/service/broadcast.service.spec.ts +16 -0
  203. package/src/chart/service/broadcast.service.ts +24 -0
  204. package/src/chart/service/brush.service.spec.ts +16 -0
  205. package/src/chart/service/brush.service.ts +87 -0
  206. package/src/chart/service/chart.service.spec.ts +16 -0
  207. package/src/chart/service/chart.service.ts +100 -0
  208. package/src/chart/service/scale.service.spec.ts +16 -0
  209. package/src/chart/service/scale.service.ts +74 -0
  210. package/src/chart/service/zoom.service.spec.ts +16 -0
  211. package/src/chart/service/zoom.service.ts +153 -0
  212. package/src/public-api.ts +7 -0
  213. package/src/test.ts +27 -0
  214. package/tsconfig.lib.json +15 -0
  215. package/tsconfig.lib.prod.json +10 -0
  216. package/tsconfig.spec.json +17 -0
@@ -0,0 +1,16 @@
1
+ # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2
+ # For additional information regarding the format and rule options, please see:
3
+ # https://github.com/browserslist/browserslist#queries
4
+
5
+ # For the full list of supported browsers by the Angular framework, please see:
6
+ # https://angular.io/guide/browser-support
7
+
8
+ # You can see what browsers were selected by your queries by running:
9
+ # npx browserslist
10
+
11
+ last 1 Chrome version
12
+ last 1 Firefox version
13
+ last 2 Edge major versions
14
+ last 2 Safari major versions
15
+ last 2 iOS major versions
16
+ Firefox ESR
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # Chart
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project chart` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project chart`.
8
+ > Note: Don't forget to add `--project chart` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build chart` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build chart`, go to the dist folder `cd dist/chart` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test chart` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
package/dist/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # Chart
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project chart` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project chart`.
8
+ > Note: Don't forget to add `--project chart` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build chart` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build chart`, go to the dist folder `cd dist/chart` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test chart` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -0,0 +1,22 @@
1
+ import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
2
+ import { ChartService } from '../service/chart.service';
3
+ import { Series } from '../model/series';
4
+ import { BasePoint } from '../model/base-point';
5
+ import { ScaleService } from '../service/scale.service';
6
+ import { ZoomService } from '../service/zoom.service';
7
+ import { Observable } from 'rxjs';
8
+ import * as i0 from "@angular/core";
9
+ export declare class SeriesBaseComponent<T extends BasePoint> implements OnInit {
10
+ protected svc: ChartService;
11
+ protected cdr: ChangeDetectorRef;
12
+ protected scaleService: ScaleService;
13
+ protected zoomService: ZoomService;
14
+ protected element: ElementRef;
15
+ series: Series<T>;
16
+ size: DOMRect;
17
+ zoom: Observable<any>;
18
+ constructor(svc: ChartService, cdr: ChangeDetectorRef, scaleService: ScaleService, zoomService: ZoomService, element: ElementRef);
19
+ ngOnInit(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<SeriesBaseComponent<any>, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<SeriesBaseComponent<any>, "ng-component", never, { "series": "series"; "size": "size"; }, {}, never, never>;
22
+ }
@@ -0,0 +1,29 @@
1
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
+ import { ChartService } from '../service/chart.service';
3
+ import { IChartConfig } from '../model/i-chart-config';
4
+ import { BasePoint } from '../model/base-point';
5
+ import { Series } from '../model/series';
6
+ import { ZoomService } from '../service/zoom.service';
7
+ import { IChartEvent } from '../model/i-chart-event';
8
+ import { PlotLine } from '../model/plotline';
9
+ import { Plotband } from '../model/plotband';
10
+ import { IPointMove } from '../model/i-point-move';
11
+ import * as i0 from "@angular/core";
12
+ export declare class ChartComponent implements OnInit, OnChanges, OnDestroy {
13
+ private svc;
14
+ private zoomService;
15
+ legendSeries: Array<Series<BasePoint>>;
16
+ plotBandsMove: EventEmitter<IChartEvent<Plotband>>;
17
+ plotLinesMove: EventEmitter<IChartEvent<PlotLine>>;
18
+ pointMove: EventEmitter<IChartEvent<IPointMove>>;
19
+ set config(config: IChartConfig);
20
+ get config(): IChartConfig;
21
+ private _config;
22
+ constructor(svc: ChartService, zoomService: ZoomService);
23
+ ngOnChanges(changes: SimpleChanges): void;
24
+ ngOnInit(): void;
25
+ ngAfterViewInit(): void;
26
+ ngOnDestroy(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChartComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "teta-chart", never, { "config": "config"; }, { "plotBandsMove": "plotBandsMove"; "plotLinesMove": "plotLinesMove"; "pointMove": "pointMove"; }, never, never>;
29
+ }
@@ -0,0 +1,42 @@
1
+ import { AfterContentChecked, AfterViewChecked, ChangeDetectorRef, ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { IChartConfig } from '../model/i-chart-config';
3
+ import { ChartService } from '../service/chart.service';
4
+ import { Observable } from 'rxjs';
5
+ import { AxesService } from '../service/axes.service';
6
+ import { Axis } from '../core/axis/axis';
7
+ import * as i0 from "@angular/core";
8
+ export declare class ChartContainerComponent implements OnInit, OnChanges, AfterViewChecked, AfterContentChecked {
9
+ private _svc;
10
+ private _cdr;
11
+ private _elementRef;
12
+ private _axesService;
13
+ config: IChartConfig;
14
+ yAxes: Map<number, Axis>;
15
+ xAxes: Map<number, Axis>;
16
+ size: Observable<DOMRect>;
17
+ private _observer;
18
+ private uniqId;
19
+ private filterPositionMap;
20
+ constructor(_svc: ChartService, _cdr: ChangeDetectorRef, _elementRef: ElementRef, _axesService: AxesService);
21
+ ngOnInit(): void;
22
+ private sumSize;
23
+ private oppositeFilter;
24
+ private nonOppositeFilter;
25
+ getVisibleRect(size: DOMRect): {
26
+ left: any;
27
+ top: any;
28
+ width: number;
29
+ height: number;
30
+ };
31
+ getYAxisTranslate(axis: Axis, size: DOMRect): string;
32
+ getXAxisTranslate(axis: Axis, size: DOMRect): string;
33
+ getTranslate(axis?: Axis, size?: DOMRect): string;
34
+ mouseMove(event: any): void;
35
+ mouseLeave(event: any): void;
36
+ id(): string;
37
+ ngAfterContentChecked(): void;
38
+ ngAfterViewChecked(): void;
39
+ ngOnChanges(changes: SimpleChanges): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChartContainerComponent, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChartContainerComponent, "teta-chart-container", never, { "config": "config"; }, {}, never, never>;
42
+ }
@@ -0,0 +1,23 @@
1
+ import { ChangeDetectorRef, OnInit } from '@angular/core';
2
+ import { ScaleService } from '../../service/scale.service';
3
+ import { AxesService } from '../../service/axes.service';
4
+ import { ChartService } from '../../service/chart.service';
5
+ import { ZoomService } from '../../service/zoom.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class GridlinesComponent implements OnInit {
8
+ private scaleService;
9
+ private axesService;
10
+ private chartService;
11
+ private zoomService;
12
+ private cdr;
13
+ size: DOMRect;
14
+ tickYValues: number[];
15
+ tickXValues: number[];
16
+ y: any;
17
+ x: any;
18
+ constructor(scaleService: ScaleService, axesService: AxesService, chartService: ChartService, zoomService: ZoomService, cdr: ChangeDetectorRef);
19
+ draw(): void;
20
+ ngOnInit(): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<GridlinesComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<GridlinesComponent, "[teta-gridlines]", never, { "size": "size"; }, {}, never, never>;
23
+ }
@@ -0,0 +1,33 @@
1
+ import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
2
+ import { Plotband } from '../../model/plotband';
3
+ import { ScaleService } from '../../service/scale.service';
4
+ import { Axis } from '../../core/axis/axis';
5
+ import { ZoomService } from '../../service/zoom.service';
6
+ import { AxisOrientation } from '../../model/enum/axis-orientation';
7
+ import { IChartEvent } from '../../model/i-chart-event';
8
+ import { ChartService } from '../../service/chart.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class PlotbandComponent implements OnInit {
11
+ private scaleService;
12
+ private zoomService;
13
+ private chartService;
14
+ private cdr;
15
+ private element;
16
+ plotband: Plotband;
17
+ axis: Axis;
18
+ size: DOMRect;
19
+ orientation: typeof AxisOrientation;
20
+ private scale;
21
+ domain: number[];
22
+ constructor(scaleService: ScaleService, zoomService: ZoomService, chartService: ChartService, cdr: ChangeDetectorRef, element: ElementRef);
23
+ emit(event: IChartEvent<Plotband>): void;
24
+ ngOnInit(): void;
25
+ get bandSize(): number;
26
+ get height(): number;
27
+ get width(): number;
28
+ get from(): number;
29
+ get to(): number;
30
+ getFill(d: Plotband): string;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlotbandComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<PlotbandComponent, "[teta-plot-band]", never, { "plotband": "plotband"; "axis": "axis"; "size": "size"; }, {}, never, never>;
33
+ }
@@ -0,0 +1,30 @@
1
+ import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
2
+ import { PlotLine } from '../../model/plotline';
3
+ import { Axis } from '../../core/axis/axis';
4
+ import { AxisOrientation } from '../../model/enum/axis-orientation';
5
+ import { ZoomService } from '../../service/zoom.service';
6
+ import { ScaleService } from '../../service/scale.service';
7
+ import { IChartEvent } from '../../model/i-chart-event';
8
+ import { ChartService } from '../../service/chart.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class PlotlineComponent implements OnInit {
11
+ private cdr;
12
+ private zoomService;
13
+ private scaleService;
14
+ private chartService;
15
+ private element;
16
+ plotline: PlotLine;
17
+ size: DOMRect;
18
+ axis: Axis;
19
+ orientation: typeof AxisOrientation;
20
+ private scale;
21
+ private domain;
22
+ constructor(cdr: ChangeDetectorRef, zoomService: ZoomService, scaleService: ScaleService, chartService: ChartService, element: ElementRef);
23
+ ngOnInit(): void;
24
+ emit(event: IChartEvent<PlotLine>): void;
25
+ get value(): any;
26
+ get height(): number;
27
+ get width(): number;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlotlineComponent, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<PlotlineComponent, "[teta-plot-line]", never, { "plotline": "plotline"; "size": "size"; "axis": "axis"; }, {}, never, never>;
30
+ }
@@ -0,0 +1,25 @@
1
+ import { ChangeDetectorRef, ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { SeriesBaseComponent } from '../../../base/series-base.component';
3
+ import { BasePoint } from '../../../model/base-point';
4
+ import { ChartService } from '../../../service/chart.service';
5
+ import { ScaleService } from '../../../service/scale.service';
6
+ import { ZoomService } from '../../../service/zoom.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class BarSeriesComponent<T extends BasePoint> extends SeriesBaseComponent<T> implements OnInit, OnChanges {
9
+ protected svc: ChartService;
10
+ protected cdr: ChangeDetectorRef;
11
+ protected scaleService: ScaleService;
12
+ protected zoomService: ZoomService;
13
+ protected element: ElementRef;
14
+ private scaleBand;
15
+ private y;
16
+ constructor(svc: ChartService, cdr: ChangeDetectorRef, scaleService: ScaleService, zoomService: ZoomService, element: ElementRef);
17
+ ngOnInit(): void;
18
+ width(): number;
19
+ height(point: BasePoint): number;
20
+ getX(point: BasePoint): number;
21
+ getY(point: BasePoint): any;
22
+ ngOnChanges(changes: SimpleChanges): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<BarSeriesComponent<any>, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<BarSeriesComponent<any>, "svg:svg[teta-bar-series]", never, {}, {}, never, never>;
25
+ }
@@ -0,0 +1,28 @@
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
2
+ import { SeriesBaseComponent } from '../../../base/series-base.component';
3
+ import { ChartService } from '../../../service/chart.service';
4
+ import { BasePoint } from '../../../model/base-point';
5
+ import { ScaleService } from '../../../service/scale.service';
6
+ import { Observable } from 'rxjs';
7
+ import { ZoomService } from '../../../service/zoom.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class LineSeriesComponent<T extends BasePoint> extends SeriesBaseComponent<T> implements OnInit, AfterViewInit {
10
+ protected svc: ChartService;
11
+ protected cdr: ChangeDetectorRef;
12
+ protected scaleService: ScaleService;
13
+ protected zoomService: ZoomService;
14
+ protected element: ElementRef;
15
+ transform: Observable<Pick<BasePoint, 'x' | 'y'>>;
16
+ display: Observable<number>;
17
+ svgElement: SVGGeometryElement;
18
+ x: any;
19
+ y: any;
20
+ constructor(svc: ChartService, cdr: ChangeDetectorRef, scaleService: ScaleService, zoomService: ZoomService, element: ElementRef);
21
+ ngOnInit(): void;
22
+ ngAfterViewInit(): void;
23
+ getPath(): string;
24
+ getMarkers(): T[];
25
+ getTransform(event: any): Pick<BasePoint, 'x' | 'y'>;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<LineSeriesComponent<any>, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<LineSeriesComponent<any>, "svg:svg[teta-line-series]", never, {}, {}, never, never>;
28
+ }
@@ -0,0 +1,20 @@
1
+ import { OnInit, SimpleChanges, ViewContainerRef } from '@angular/core';
2
+ import { Series } from '../../model/series';
3
+ import { BasePoint } from '../../model/base-point';
4
+ import { ChartService } from '../../service/chart.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SeriesHostComponent<T extends BasePoint> implements OnInit {
7
+ private viewContainerRef;
8
+ private chartService;
9
+ series: Series<T>;
10
+ size: DOMRect;
11
+ private defaultSeriesTypeMapping;
12
+ private _init;
13
+ private _componentRef;
14
+ constructor(viewContainerRef: ViewContainerRef, chartService: ChartService);
15
+ ngOnInit(): void;
16
+ ngOnDestroy(): void;
17
+ ngOnChanges(changes: SimpleChanges): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<SeriesHostComponent<any>, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<SeriesHostComponent<any>, "[teta-series-host]", never, { "series": "series"; "size": "size"; }, {}, never, never>;
20
+ }
@@ -0,0 +1,29 @@
1
+ import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { ChartService } from '../../service/chart.service';
4
+ import { ZoomService } from '../../service/zoom.service';
5
+ import { DomSanitizer } from '@angular/platform-browser';
6
+ import * as i0 from "@angular/core";
7
+ export declare class TooltipComponent implements OnInit, OnDestroy {
8
+ private svc;
9
+ private cdr;
10
+ private zoomService;
11
+ private sanitizer;
12
+ size: DOMRect;
13
+ position: Observable<{
14
+ left: string;
15
+ top: string;
16
+ bottom: string;
17
+ right: string;
18
+ }>;
19
+ displayTooltips: Observable<string>;
20
+ tooltips: any[];
21
+ private alive;
22
+ display: Observable<number>;
23
+ constructor(svc: ChartService, cdr: ChangeDetectorRef, zoomService: ZoomService, sanitizer: DomSanitizer);
24
+ ngOnInit(): void;
25
+ private getPoisition;
26
+ ngOnDestroy(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "teta-tooltip", never, { "size": "size"; }, {}, never, never>;
29
+ }
@@ -0,0 +1,23 @@
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
+ import { Axis } from '../../core/axis/axis';
3
+ import { ScaleService } from '../../service/scale.service';
4
+ import { ChartService } from '../../service/chart.service';
5
+ import { ZoomService } from '../../service/zoom.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class XAxisComponent implements OnInit, OnDestroy, AfterViewInit {
8
+ private scaleService;
9
+ private chartService;
10
+ private cdr;
11
+ private zoomService;
12
+ axis: Axis;
13
+ size: DOMRect;
14
+ node: ElementRef;
15
+ private _alive;
16
+ constructor(scaleService: ScaleService, chartService: ChartService, cdr: ChangeDetectorRef, zoomService: ZoomService);
17
+ ngOnInit(): void;
18
+ ngOnDestroy(): void;
19
+ ngAfterViewInit(): void;
20
+ private draw;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<XAxisComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<XAxisComponent, "[teta-x-axis]", never, { "axis": "axis"; "size": "size"; }, {}, never, never>;
23
+ }
@@ -0,0 +1,24 @@
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
+ import { Axis } from '../../core/axis/axis';
3
+ import { ScaleService } from '../../service/scale.service';
4
+ import { ChartService } from '../../service/chart.service';
5
+ import { ZoomService } from '../../service/zoom.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class YAxisComponent implements OnInit, OnDestroy, AfterViewInit {
8
+ private scaleService;
9
+ private chartService;
10
+ private cdr;
11
+ private zoomService;
12
+ axis: Axis;
13
+ size: DOMRect;
14
+ node: ElementRef;
15
+ private _alive;
16
+ constructor(scaleService: ScaleService, chartService: ChartService, cdr: ChangeDetectorRef, zoomService: ZoomService);
17
+ ngOnInit(): void;
18
+ ngOnDestroy(): void;
19
+ ngAfterViewInit(): void;
20
+ getLabelTransform(): string;
21
+ private draw;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<YAxisComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<YAxisComponent, "[teta-y-axis]", never, { "axis": "axis"; "size": "size"; }, {}, never, never>;
24
+ }
@@ -0,0 +1,22 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./chart/chart.component";
3
+ import * as i2 from "./chart-container/series-host/series-host.component";
4
+ import * as i3 from "./chart-container/chart-container.component";
5
+ import * as i4 from "./legend/legend.component";
6
+ import * as i5 from "./base/series-base.component";
7
+ import * as i6 from "./chart-container/series/line/line-series.component";
8
+ import * as i7 from "./chart-container/gridlines/gridlines.component";
9
+ import * as i8 from "./chart-container/x-axis/x-axis.component";
10
+ import * as i9 from "./chart-container/y-axis/y-axis.component";
11
+ import * as i10 from "./chart-container/plotline/plotline.component";
12
+ import * as i11 from "./chart-container/plotband/plotband.component";
13
+ import * as i12 from "./chart-container/series/bar/bar-series.component";
14
+ import * as i13 from "./chart-container/tooltip/tooltip.component";
15
+ import * as i14 from "./directives/zoomable.directive";
16
+ import * as i15 from "./directives/brushable.directive";
17
+ import * as i16 from "@angular/common";
18
+ export declare class ChartModule {
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChartModule, never>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ChartModule, [typeof i1.ChartComponent, typeof i2.SeriesHostComponent, typeof i3.ChartContainerComponent, typeof i4.LegendComponent, typeof i5.SeriesBaseComponent, typeof i6.LineSeriesComponent, typeof i7.GridlinesComponent, typeof i8.XAxisComponent, typeof i9.YAxisComponent, typeof i10.PlotlineComponent, typeof i11.PlotbandComponent, typeof i12.BarSeriesComponent, typeof i13.TooltipComponent, typeof i14.ZoomableDirective, typeof i15.BrushableDirective], [typeof i16.CommonModule], [typeof i1.ChartComponent]>;
21
+ static ɵinj: i0.ɵɵInjectorDeclaration<ChartModule>;
22
+ }
@@ -0,0 +1,54 @@
1
+ import { IChartConfig } from '../../model/i-chart-config';
2
+ import { AxisOrientation } from '../../model/enum/axis-orientation';
3
+ import { Series } from '../../model/series';
4
+ import { BasePoint } from '../../model/base-point';
5
+ import { AxisOptions } from '../../model/axis-options';
6
+ export declare class Axis {
7
+ private chartConfig;
8
+ private _orientation;
9
+ private _index;
10
+ private _extremes;
11
+ private _selfSize;
12
+ private _ticksValues;
13
+ private defaultFormatters;
14
+ constructor(config: IChartConfig);
15
+ /**
16
+ * Factory for creating x,y axes
17
+ * @param {AxisOrientation} orientation
18
+ * Axis type
19
+ * @param {IChartConfig} config
20
+ * Chart config
21
+ * @param {number} index
22
+ * Index axis
23
+ * @return {Axis}
24
+ * New generated axis
25
+ */
26
+ static createAxis(orientation: AxisOrientation, config: IChartConfig, index: number): Axis;
27
+ /**
28
+ *
29
+ * @param {orientation} orientation
30
+ * Set locate axis x or y
31
+ */
32
+ private setLocate;
33
+ /**
34
+ *
35
+ * @param {number | string} index
36
+ * Index axis
37
+ */
38
+ private setIndex;
39
+ /**
40
+ * @return {Array<Series<BasePoint>>}
41
+ * Linked series
42
+ */
43
+ linkedSeries(): Array<Series<BasePoint>>;
44
+ private setExtremes;
45
+ private setSelfSize;
46
+ private setTicksValues;
47
+ get extremes(): Array<number>;
48
+ get orientation(): AxisOrientation;
49
+ get selfSize(): number;
50
+ get tickValues(): number[];
51
+ get index(): string | number;
52
+ get options(): AxisOptions;
53
+ defaultFormatter(): any;
54
+ }
@@ -0,0 +1,8 @@
1
+ import { Axis } from '../axis';
2
+ import { IBuilder } from '../../../model/i-builder';
3
+ export declare class AxisSizeBuilder implements IBuilder<Axis, number> {
4
+ private titlePadding;
5
+ private basePadding;
6
+ private backupRatio;
7
+ build(settings: Axis): number;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { IBuilder } from '../../../model/i-builder';
2
+ import { Axis } from '../axis';
3
+ export declare class ExtremesBuilder implements IBuilder<Axis, [number, number]> {
4
+ private extentAccessorMap;
5
+ private extremes;
6
+ build(settings: Axis): [number, number];
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './axis-size-builder';
2
+ export * from './extremes-builder';
@@ -0,0 +1 @@
1
+ export declare function generateTicks(extremes: number[]): number[];
@@ -0,0 +1 @@
1
+ export declare const getTextWidth: (inputText?: string | number | null, backupRatio?: number, fontSize?: number) => number;
@@ -0,0 +1,2 @@
1
+ export * from './get-text-width';
2
+ export * from './generate-ticks';
@@ -0,0 +1,17 @@
1
+ import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
2
+ import { IChartConfig } from '../model/i-chart-config';
3
+ import { BrushService } from '../service/brush.service';
4
+ import { ChartService } from '../service/chart.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class BrushableDirective implements OnInit, AfterViewInit {
7
+ private brushService;
8
+ private chartService;
9
+ private element;
10
+ config?: IChartConfig;
11
+ size?: DOMRect;
12
+ constructor(brushService: BrushService, chartService: ChartService, element: ElementRef);
13
+ ngOnInit(): void;
14
+ ngAfterViewInit(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<BrushableDirective, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BrushableDirective, "svg:svg[tetaBrushable]", never, { "config": "config"; "size": "size"; }, {}, never>;
17
+ }
@@ -0,0 +1,20 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { ZoomService } from '../service/zoom.service';
3
+ import { ChartService } from '../service/chart.service';
4
+ import { IChartConfig } from '../model/i-chart-config';
5
+ import { Axis } from '../core/axis/axis';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ZoomableDirective {
8
+ private element;
9
+ private svc;
10
+ private chartService;
11
+ config?: IChartConfig;
12
+ axis?: Axis;
13
+ size?: DOMRect;
14
+ private zoomable;
15
+ constructor(element: ElementRef, svc: ZoomService, chartService: ChartService);
16
+ ngOnInit(): void;
17
+ ngAfterViewInit(): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZoomableDirective, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ZoomableDirective, "[tetaZoomable]", never, { "config": "config"; "axis": "axis"; "size": "size"; }, {}, never>;
20
+ }
@@ -0,0 +1,14 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Series } from '../model/series';
3
+ import { BasePoint } from '../model/base-point';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LegendComponent implements OnInit {
6
+ private sizeMapping;
7
+ series: Array<Series<BasePoint>>;
8
+ classLegend: boolean;
9
+ constructor();
10
+ ngOnInit(): void;
11
+ getHeight(serie: Series<BasePoint>): number;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<LegendComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<LegendComponent, "teta-legend", never, { "series": "series"; }, {}, never, never>;
14
+ }
@@ -0,0 +1,17 @@
1
+ import { AxisType } from './enum/axis-type';
2
+ import { Plotband } from './plotband';
3
+ import { PlotLine } from './plotline';
4
+ export interface AxisOptions {
5
+ title?: string;
6
+ min?: number;
7
+ max?: number;
8
+ visible?: boolean;
9
+ tickFormat?: (d: any) => string;
10
+ type?: AxisType;
11
+ zoom?: boolean;
12
+ inverted?: boolean;
13
+ negative?: boolean;
14
+ opposite?: boolean;
15
+ plotbands?: Plotband[];
16
+ plotlines?: PlotLine[];
17
+ }
@@ -0,0 +1,9 @@
1
+ import { MarkerOptions } from './marker-options';
2
+ export interface BasePoint {
3
+ x: number;
4
+ x1?: number;
5
+ y: number;
6
+ y1?: number;
7
+ color?: string | number;
8
+ marker?: MarkerOptions;
9
+ }
@@ -0,0 +1,12 @@
1
+ export declare class ChartBounds {
2
+ top: number;
3
+ right: number;
4
+ bottom: number;
5
+ left: number;
6
+ constructor(options?: {
7
+ top?: number;
8
+ right?: number;
9
+ bottom?: number;
10
+ left: number;
11
+ });
12
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum AxisOrientation {
2
+ x = 0,
3
+ y = 1
4
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum AxisType {
2
+ number = 0,
3
+ time = 1,
4
+ category = 2,
5
+ log = 3,
6
+ pow = 4
7
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum BrushType {
2
+ x = 0,
3
+ y = 1,
4
+ xy = 2
5
+ }