@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,5 @@
1
+ export declare enum DragPointType {
2
+ x = 0,
3
+ y = 1,
4
+ xy = 2
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum SeriesType {
2
+ line = 0,
3
+ bar = 1
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum TooltipTracking {
2
+ x = 0,
3
+ y = 1
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum ZoomType {
2
+ x = 0,
3
+ y = 1,
4
+ xy = 2
5
+ }
@@ -0,0 +1,5 @@
1
+ export interface IBroadcastMessage {
2
+ channel: string;
3
+ message: any;
4
+ domain?: number[];
5
+ }
@@ -0,0 +1,3 @@
1
+ export interface IBuilder<T, U> {
2
+ build(settings: T): U;
3
+ }
@@ -0,0 +1,32 @@
1
+ import { Series } from './series';
2
+ import { BasePoint } from './base-point';
3
+ import { AxisOptions } from './axis-options';
4
+ import { ZoomType } from './enum/zoom-type';
5
+ import { TooltipOptions } from './tooltip-options';
6
+ import { ChartBounds } from './chart-bounds';
7
+ import { BrushType } from './enum/brush-type';
8
+ export interface IChartConfig {
9
+ name?: string;
10
+ series?: Series<BasePoint>[];
11
+ zoom?: {
12
+ enable: boolean;
13
+ type: ZoomType;
14
+ syncChannel?: string;
15
+ };
16
+ brush?: {
17
+ enable: boolean;
18
+ type: BrushType;
19
+ axisIndex?: number;
20
+ };
21
+ legend?: {
22
+ enable?: boolean;
23
+ };
24
+ bounds?: ChartBounds;
25
+ inverted?: boolean;
26
+ tooltip?: TooltipOptions;
27
+ xAxis: AxisOptions[];
28
+ yAxis: AxisOptions[];
29
+ gridLines?: boolean;
30
+ width?: number;
31
+ height?: number;
32
+ }
@@ -0,0 +1,4 @@
1
+ export interface IChartEvent<T> {
2
+ event?: any;
3
+ target?: T;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { BasePoint } from './base-point';
2
+ import { Series } from './series';
3
+ export interface IDisplayTooltip {
4
+ point: BasePoint;
5
+ series: Series<BasePoint>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { Series } from './series';
2
+ import { BasePoint } from './base-point';
3
+ export interface IPointMove {
4
+ series: Series<BasePoint>;
5
+ point: BasePoint;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { DragPointType } from './enum/drag-point-type';
2
+ import { SvgAttributes } from './svg-attributes';
3
+ export interface MarkerOptions {
4
+ draggable?: boolean;
5
+ dragType: DragPointType;
6
+ style?: SvgAttributes;
7
+ }
@@ -0,0 +1,31 @@
1
+ import { SvgAttributes } from './svg-attributes';
2
+ export declare class Plotband {
3
+ id: number | string;
4
+ from: number;
5
+ to: number;
6
+ label?: string;
7
+ showGrabbers?: boolean;
8
+ draggable?: boolean;
9
+ resizable?: boolean;
10
+ min?: number;
11
+ max?: number;
12
+ style?: {
13
+ plotband?: SvgAttributes;
14
+ grabbers?: SvgAttributes;
15
+ };
16
+ constructor(options?: {
17
+ id: any;
18
+ from: number;
19
+ to: number;
20
+ label?: string;
21
+ showGrabbers?: boolean;
22
+ draggable?: boolean;
23
+ resizable?: boolean;
24
+ min?: number;
25
+ max?: number;
26
+ style?: {
27
+ plotband?: SvgAttributes;
28
+ grabbers?: SvgAttributes;
29
+ };
30
+ });
31
+ }
@@ -0,0 +1,19 @@
1
+ import { SvgAttributes } from './svg-attributes';
2
+ export declare class PlotLine {
3
+ id?: number | string;
4
+ value: number;
5
+ label?: string;
6
+ min?: number;
7
+ max?: number;
8
+ draggable?: boolean;
9
+ style?: SvgAttributes;
10
+ constructor(options?: {
11
+ id?: number;
12
+ value: number;
13
+ label?: string;
14
+ min?: number;
15
+ max?: number;
16
+ draggable?: boolean;
17
+ style?: SvgAttributes;
18
+ });
19
+ }
@@ -0,0 +1,17 @@
1
+ import { BasePoint } from './base-point';
2
+ import { SeriesType } from './enum/series-type';
3
+ import { SeriesBaseComponent } from '../base/series-base.component';
4
+ import { SvgAttributes } from './svg-attributes';
5
+ export interface Series<T extends BasePoint> {
6
+ id?: number | string;
7
+ type: SeriesType;
8
+ data: T[];
9
+ name?: string;
10
+ xAxisIndex?: number;
11
+ yAxisIndex?: number;
12
+ component?: typeof SeriesBaseComponent;
13
+ visible?: boolean;
14
+ color?: string;
15
+ showInLegend?: boolean;
16
+ style?: SvgAttributes;
17
+ }
@@ -0,0 +1,14 @@
1
+ export interface SvgAttributes {
2
+ className?: string;
3
+ fill?: string;
4
+ fillOpacity?: number;
5
+ opacity?: number;
6
+ stroke?: string;
7
+ strokeLinecap?: 'butt' | 'round' | 'square';
8
+ strokeLinejoin?: 'butt' | 'round' | 'square';
9
+ strokeDasharray?: string;
10
+ strokeOpacity?: number;
11
+ strokeWidth?: number;
12
+ patternImage?: string;
13
+ radius?: number;
14
+ }
@@ -0,0 +1,8 @@
1
+ import { TooltipTracking } from './enum/tooltip-tracking';
2
+ export interface TooltipOptions {
3
+ enable?: boolean;
4
+ showMarkers?: boolean;
5
+ showLine?: boolean;
6
+ tracking?: TooltipTracking;
7
+ format?: (data: any) => any;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { IChartConfig } from '../model/i-chart-config';
2
+ import { Axis } from '../core/axis/axis';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AxesService {
5
+ yAxis: Map<number, Axis>;
6
+ xAxis: Map<number, Axis>;
7
+ constructor();
8
+ init(config: IChartConfig): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<AxesService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<AxesService>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { IBroadcastMessage } from '../model/i-broadcast-message';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class BroadcastService {
5
+ private emitter;
6
+ constructor();
7
+ broadcast(value: IBroadcastMessage): void;
8
+ subscribeToChannel(channel: string): Observable<IBroadcastMessage>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<BroadcastService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<BroadcastService>;
11
+ }
@@ -0,0 +1,17 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import { BroadcastService } from './broadcast.service';
4
+ import { IChartConfig } from '../model/i-chart-config';
5
+ import { ScaleService } from './scale.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class BrushService {
8
+ private broadcastService;
9
+ private scaleService;
10
+ broadcastSubscribtion: Subscription;
11
+ private brushMap;
12
+ private scaleMap;
13
+ constructor(broadcastService: BroadcastService, scaleService: ScaleService);
14
+ applyBrush(svgElement: ElementRef, config: IChartConfig, size: DOMRect): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<BrushService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<BrushService>;
17
+ }
@@ -0,0 +1,38 @@
1
+ import { IChartConfig } from '../model/i-chart-config';
2
+ import { AxesService } from './axes.service';
3
+ import { Observable } from 'rxjs';
4
+ import { ScaleService } from './scale.service';
5
+ import { IChartEvent } from '../model/i-chart-event';
6
+ import { IDisplayTooltip } from '../model/i-display-tooltip';
7
+ import { Plotband } from '../model/plotband';
8
+ import { PlotLine } from '../model/plotline';
9
+ import { IPointMove } from '../model/i-point-move';
10
+ import * as i0 from "@angular/core";
11
+ export declare class ChartService {
12
+ private axesService;
13
+ private scaleService;
14
+ size: Observable<DOMRect>;
15
+ pointerMove: Observable<any>;
16
+ tooltips: Observable<IDisplayTooltip>;
17
+ plotbandMove: Observable<IChartEvent<Plotband>>;
18
+ plotlineMove: Observable<IChartEvent<PlotLine>>;
19
+ pointMove: Observable<IChartEvent<IPointMove>>;
20
+ private size$;
21
+ private pointerMove$;
22
+ private tooltips$;
23
+ private plotbandMove$;
24
+ private plotlineMove$;
25
+ private pointMove$;
26
+ private _config;
27
+ constructor(axesService: AxesService, scaleService: ScaleService);
28
+ init(config: IChartConfig): void;
29
+ setSize(size: DOMRect): void;
30
+ setPointerMove(event: any): void;
31
+ setTooltip(tooltip: IDisplayTooltip): void;
32
+ emitPlotband(event: IChartEvent<Plotband>): void;
33
+ emitPlotline(event: IChartEvent<PlotLine>): void;
34
+ emitPoint(event: IChartEvent<IPointMove>): void;
35
+ get config(): IChartConfig;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChartService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<ChartService>;
38
+ }
@@ -0,0 +1,14 @@
1
+ import { AxesService } from './axes.service';
2
+ import { IChartConfig } from '../model/i-chart-config';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ScaleService {
5
+ private axesService;
6
+ yScales: Map<number | string, any>;
7
+ xScales: Map<number | string, any>;
8
+ private scaleMapping;
9
+ constructor(axesService: AxesService);
10
+ createScales(size: DOMRect, config?: IChartConfig): void;
11
+ private getScale;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScaleService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<ScaleService>;
14
+ }
@@ -0,0 +1,25 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { ScaleService } from './scale.service';
3
+ import { Observable, Subscription } from 'rxjs';
4
+ import { IChartConfig } from '../model/i-chart-config';
5
+ import { BroadcastService } from './broadcast.service';
6
+ import { ChartService } from './chart.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class ZoomService {
9
+ private scaleService;
10
+ private broadcastService;
11
+ private chartService;
12
+ zoomed: Observable<any>;
13
+ private zoomed$;
14
+ broadcastSubscribtion: Subscription;
15
+ private x;
16
+ private y;
17
+ private zoom;
18
+ private svg;
19
+ private initialZoom;
20
+ constructor(scaleService: ScaleService, broadcastService: BroadcastService, chartService: ChartService);
21
+ applyZoom(svgElement: ElementRef, config: IChartConfig, size: DOMRect): void;
22
+ setZoom(transform: any): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZoomService, never>;
24
+ static ɵprov: i0.ɵɵInjectableDeclaration<ZoomService>;
25
+ }
@@ -0,0 +1,34 @@
1
+ import { Component, Input, } from '@angular/core';
2
+ import { tap } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "../service/chart.service";
5
+ import * as i2 from "../service/scale.service";
6
+ import * as i3 from "../service/zoom.service";
7
+ export class SeriesBaseComponent {
8
+ constructor(svc, cdr, scaleService, zoomService, element) {
9
+ this.svc = svc;
10
+ this.cdr = cdr;
11
+ this.scaleService = scaleService;
12
+ this.zoomService = zoomService;
13
+ this.element = element;
14
+ this.zoomService.zoomed
15
+ .pipe(tap((_) => {
16
+ this.cdr.detectChanges();
17
+ }))
18
+ .subscribe();
19
+ }
20
+ ngOnInit() { }
21
+ }
22
+ SeriesBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SeriesBaseComponent, deps: [{ token: i1.ChartService }, { token: i0.ChangeDetectorRef }, { token: i2.ScaleService }, { token: i3.ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
23
+ SeriesBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SeriesBaseComponent, selector: "ng-component", inputs: { series: "series", size: "size" }, ngImport: i0, template: '', isInline: true });
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SeriesBaseComponent, decorators: [{
25
+ type: Component,
26
+ args: [{
27
+ template: '',
28
+ }]
29
+ }], ctorParameters: function () { return [{ type: i1.ChartService }, { type: i0.ChangeDetectorRef }, { type: i2.ScaleService }, { type: i3.ZoomService }, { type: i0.ElementRef }]; }, propDecorators: { series: [{
30
+ type: Input
31
+ }], size: [{
32
+ type: Input
33
+ }] } });
34
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWVzLWJhc2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NoYXJ0L2Jhc2Uvc2VyaWVzLWJhc2UuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxTQUFTLEVBRVQsS0FBSyxHQUVOLE1BQU0sZUFBZSxDQUFDO0FBTXZCLE9BQU8sRUFBYyxHQUFHLEVBQUUsTUFBTSxNQUFNLENBQUM7Ozs7O0FBS3ZDLE1BQU0sT0FBTyxtQkFBbUI7SUFNOUIsWUFDWSxHQUFpQixFQUNqQixHQUFzQixFQUN0QixZQUEwQixFQUMxQixXQUF3QixFQUN4QixPQUFtQjtRQUpuQixRQUFHLEdBQUgsR0FBRyxDQUFjO1FBQ2pCLFFBQUcsR0FBSCxHQUFHLENBQW1CO1FBQ3RCLGlCQUFZLEdBQVosWUFBWSxDQUFjO1FBQzFCLGdCQUFXLEdBQVgsV0FBVyxDQUFhO1FBQ3hCLFlBQU8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tcGxhdGU6ICcnLFxufSlcbmV4cG9ydCBjbGFzcyBTZXJpZXNCYXNlQ29tcG9uZW50PFQgZXh0ZW5kcyBCYXNlUG9pbnQ+IGltcGxlbWVudHMgT25Jbml0IHtcbiAgQElucHV0KCkgc2VyaWVzOiBTZXJpZXM8VD47XG4gIEBJbnB1dCgpIHNpemU6IERPTVJlY3Q7XG5cbiAgem9vbTogT2JzZXJ2YWJsZTxhbnk+O1xuXG4gIGNvbnN0cnVjdG9yKFxuICAgIHByb3RlY3RlZCBzdmM6IENoYXJ0U2VydmljZSxcbiAgICBwcm90ZWN0ZWQgY2RyOiBDaGFuZ2VEZXRlY3RvclJlZixcbiAgICBwcm90ZWN0ZWQgc2NhbGVTZXJ2aWNlOiBTY2FsZVNlcnZpY2UsXG4gICAgcHJvdGVjdGVkIHpvb21TZXJ2aWNlOiBab29tU2VydmljZSxcbiAgICBwcm90ZWN0ZWQgZWxlbWVudDogRWxlbWVudFJlZlxuICApIHtcbiAgICB0aGlzLnpvb21TZXJ2aWNlLnpvb21lZFxuICAgICAgLnBpcGUoXG4gICAgICAgIHRhcCgoXykgPT4ge1xuICAgICAgICAgIHRoaXMuY2RyLmRldGVjdENoYW5nZXMoKTtcbiAgICAgICAgfSlcbiAgICAgIClcbiAgICAgIC5zdWJzY3JpYmUoKTtcbiAgfVxuXG4gIG5nT25Jbml0KCk6IHZvaWQge31cbn1cbiJdfQ==
@@ -0,0 +1,73 @@
1
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, } from '@angular/core';
2
+ import { ChartService } from '../service/chart.service';
3
+ import { ZoomService } from '../service/zoom.service';
4
+ import { ScaleService } from '../service/scale.service';
5
+ import { BrushService } from '../service/brush.service';
6
+ import { AxesService } from '../service/axes.service';
7
+ import { ChartBounds } from '../model/chart-bounds';
8
+ import * as i0 from "@angular/core";
9
+ import * as i1 from "../service/chart.service";
10
+ import * as i2 from "../service/zoom.service";
11
+ import * as i3 from "../chart-container/chart-container.component";
12
+ import * as i4 from "../legend/legend.component";
13
+ import * as i5 from "@angular/common";
14
+ export class ChartComponent {
15
+ constructor(svc, zoomService) {
16
+ this.svc = svc;
17
+ this.zoomService = zoomService;
18
+ this.plotBandsMove = new EventEmitter();
19
+ this.plotLinesMove = new EventEmitter();
20
+ this.pointMove = new EventEmitter();
21
+ }
22
+ set config(config) {
23
+ this._config = Object.assign({
24
+ bounds: new ChartBounds(),
25
+ }, config);
26
+ }
27
+ get config() {
28
+ return this._config;
29
+ }
30
+ ngOnChanges(changes) { }
31
+ ngOnInit() {
32
+ this.svc.plotbandMove.subscribe((_) => {
33
+ this.plotBandsMove.emit(_);
34
+ });
35
+ this.svc.plotlineMove.subscribe((_) => {
36
+ this.plotLinesMove.emit(_);
37
+ });
38
+ this.svc.pointMove.subscribe((_) => {
39
+ this.pointMove.emit(_);
40
+ });
41
+ }
42
+ ngAfterViewInit() { }
43
+ ngOnDestroy() {
44
+ this.zoomService.broadcastSubscribtion?.unsubscribe();
45
+ }
46
+ }
47
+ ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ChartComponent, deps: [{ token: i1.ChartService }, { token: i2.ZoomService }], target: i0.ɵɵFactoryTarget.Component });
48
+ ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ChartComponent, selector: "teta-chart", inputs: { config: "config" }, outputs: { plotBandsMove: "plotBandsMove", plotLinesMove: "plotLinesMove", pointMove: "pointMove" }, providers: [
49
+ ChartService,
50
+ ZoomService,
51
+ ScaleService,
52
+ AxesService,
53
+ BrushService,
54
+ ], usesOnChanges: true, ngImport: i0, template: "<div class=\"column column_auto\">\n <teta-chart-container class=\"chart-container\" [config]=\"config\"></teta-chart-container>\n</div>\n\n<teta-legend *ngIf=\"config.legend?.enable === true\" [series]=\"config.series\"></teta-legend>\n", styles: [":host{display:flex;flex-direction:column;height:100%;width:100%}\n"], components: [{ type: i3.ChartContainerComponent, selector: "teta-chart-container", inputs: ["config"] }, { type: i4.LegendComponent, selector: "teta-legend", inputs: ["series"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ChartComponent, decorators: [{
56
+ type: Component,
57
+ args: [{ selector: 'teta-chart', providers: [
58
+ ChartService,
59
+ ZoomService,
60
+ ScaleService,
61
+ AxesService,
62
+ BrushService,
63
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"column column_auto\">\n <teta-chart-container class=\"chart-container\" [config]=\"config\"></teta-chart-container>\n</div>\n\n<teta-legend *ngIf=\"config.legend?.enable === true\" [series]=\"config.series\"></teta-legend>\n", styles: [":host{display:flex;flex-direction:column;height:100%;width:100%}\n"] }]
64
+ }], ctorParameters: function () { return [{ type: i1.ChartService }, { type: i2.ZoomService }]; }, propDecorators: { plotBandsMove: [{
65
+ type: Output
66
+ }], plotLinesMove: [{
67
+ type: Output
68
+ }], pointMove: [{
69
+ type: Output
70
+ }], config: [{
71
+ type: Input
72
+ }] } });
73
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NoYXJ0L2NoYXJ0L2NoYXJ0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uL3NyYy9jaGFydC9jaGFydC9jaGFydC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxZQUFZLEVBQ1osS0FBSyxFQUlMLE1BQU0sR0FFUCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFP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