@tetacom/svg-charts 1.1.1 → 1.1.2

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 (233) hide show
  1. package/{dist/chart → chart}/base/series-base.component.d.ts +0 -0
  2. package/{dist/chart → chart}/chart/chart.component.d.ts +0 -0
  3. package/{dist/chart → chart}/chart-container/chart-container.component.d.ts +0 -0
  4. package/{dist/chart → chart}/chart-container/gridlines/gridlines.component.d.ts +0 -0
  5. package/{dist/chart → chart}/chart-container/plotband/plot-band.component.d.ts +1 -0
  6. package/{dist/chart → chart}/chart-container/plotline/plotline.component.d.ts +0 -0
  7. package/{dist/chart → chart}/chart-container/series/bar/bar-series.component.d.ts +0 -0
  8. package/{dist/chart → chart}/chart-container/series/line/line-series.component.d.ts +0 -0
  9. package/{dist/chart → chart}/chart-container/series/scatter-series/scatter-series.component.d.ts +0 -0
  10. package/{dist/chart → chart}/chart-container/series-host/series-host.component.d.ts +0 -0
  11. package/{dist/chart → chart}/chart-container/tooltip/tooltip.component.d.ts +0 -0
  12. package/{dist/chart → chart}/chart-container/x-axis/x-axis.component.d.ts +0 -0
  13. package/{dist/chart → chart}/chart-container/y-axis/y-axis.component.d.ts +0 -0
  14. package/{dist/chart → chart}/chart.module.d.ts +0 -0
  15. package/{dist/chart → chart}/core/axis/axis.d.ts +0 -0
  16. package/{dist/chart → chart}/core/axis/builders/axis-size-builder.d.ts +0 -0
  17. package/{dist/chart → chart}/core/axis/builders/extremes-builder.d.ts +0 -0
  18. package/{dist/chart → chart}/core/axis/builders/public-api.d.ts +0 -0
  19. package/{dist/chart → chart}/core/utils/generate-ticks.d.ts +0 -0
  20. package/{dist/chart → chart}/core/utils/get-text-width.d.ts +0 -0
  21. package/{dist/chart → chart}/core/utils/public-api.d.ts +0 -0
  22. package/{dist/chart → chart}/default/default-axis-config.d.ts +0 -0
  23. package/{dist/chart → chart}/default/default-chart-config.d.ts +0 -0
  24. package/{dist/chart → chart}/default/default-series-config.d.ts +0 -0
  25. package/{dist/chart → chart}/directives/brushable.directive.d.ts +0 -0
  26. package/{dist/chart → chart}/directives/zoomable.directive.d.ts +0 -0
  27. package/{dist/chart → chart}/legend/legend.component.d.ts +0 -0
  28. package/{dist/chart → chart}/model/axis-options.d.ts +0 -0
  29. package/{dist/chart → chart}/model/base-point.d.ts +0 -0
  30. package/{dist/chart → chart}/model/chart-bounds.d.ts +0 -0
  31. package/{dist/chart → chart}/model/enum/axis-orientation.d.ts +0 -0
  32. package/{dist/chart → chart}/model/enum/brush-type.d.ts +0 -0
  33. package/{dist/chart → chart}/model/enum/drag-point-type.d.ts +0 -0
  34. package/{dist/chart → chart}/model/enum/public-api.d.ts +0 -0
  35. package/{dist/chart → chart}/model/enum/scale-type.d.ts +0 -0
  36. package/{dist/chart → chart}/model/enum/series-type.d.ts +0 -0
  37. package/{dist/chart → chart}/model/enum/tooltip-tracking.d.ts +0 -0
  38. package/{dist/chart → chart}/model/enum/zoom-type.d.ts +0 -0
  39. package/{dist/chart → chart}/model/i-broadcast-message.d.ts +0 -0
  40. package/{dist/chart → chart}/model/i-builder.d.ts +0 -0
  41. package/{dist/chart → chart}/model/i-chart-config.d.ts +0 -0
  42. package/{dist/chart → chart}/model/i-chart-event.d.ts +0 -0
  43. package/{dist/chart → chart}/model/i-display-tooltip.d.ts +0 -0
  44. package/{dist/chart → chart}/model/i-point-move.d.ts +0 -0
  45. package/{dist/chart → chart}/model/marker-options.d.ts +0 -0
  46. package/{dist/chart → chart}/model/plot-band.d.ts +0 -0
  47. package/{dist/chart → chart}/model/plot-line.d.ts +0 -0
  48. package/{dist/chart → chart}/model/public-api.d.ts +0 -0
  49. package/{dist/chart → chart}/model/series.d.ts +0 -0
  50. package/{dist/chart → chart}/model/svg-attributes.d.ts +0 -0
  51. package/{dist/chart → chart}/model/tooltip-options.d.ts +0 -0
  52. package/{dist/chart → chart}/service/broadcast.service.d.ts +0 -0
  53. package/{dist/chart → chart}/service/brush.service.d.ts +0 -0
  54. package/{dist/chart → chart}/service/chart.service.d.ts +0 -0
  55. package/{dist/chart → chart}/service/scale.service.d.ts +0 -0
  56. package/{dist/chart → chart}/service/zoom.service.d.ts +0 -0
  57. package/{dist/esm2020 → esm2020}/chart/base/series-base.component.mjs +0 -0
  58. package/{dist/esm2020 → esm2020}/chart/chart/chart.component.mjs +0 -0
  59. package/{dist/esm2020 → esm2020}/chart/chart-container/chart-container.component.mjs +0 -0
  60. package/{dist/esm2020 → esm2020}/chart/chart-container/gridlines/gridlines.component.mjs +0 -0
  61. package/esm2020/chart/chart-container/plotband/plot-band.component.mjs +150 -0
  62. package/{dist/esm2020 → esm2020}/chart/chart-container/plotline/plotline.component.mjs +0 -0
  63. package/{dist/esm2020 → esm2020}/chart/chart-container/series/bar/bar-series.component.mjs +0 -0
  64. package/{dist/esm2020 → esm2020}/chart/chart-container/series/line/line-series.component.mjs +0 -0
  65. package/{dist/esm2020 → esm2020}/chart/chart-container/series/scatter-series/scatter-series.component.mjs +0 -0
  66. package/{dist/esm2020 → esm2020}/chart/chart-container/series-host/series-host.component.mjs +0 -0
  67. package/{dist/esm2020 → esm2020}/chart/chart-container/tooltip/tooltip.component.mjs +0 -0
  68. package/{dist/esm2020 → esm2020}/chart/chart-container/x-axis/x-axis.component.mjs +0 -0
  69. package/{dist/esm2020 → esm2020}/chart/chart-container/y-axis/y-axis.component.mjs +0 -0
  70. package/{dist/esm2020 → esm2020}/chart/chart.module.mjs +0 -0
  71. package/{dist/esm2020 → esm2020}/chart/core/axis/axis.mjs +0 -0
  72. package/{dist/esm2020 → esm2020}/chart/core/axis/builders/axis-size-builder.mjs +0 -0
  73. package/{dist/esm2020 → esm2020}/chart/core/axis/builders/extremes-builder.mjs +0 -0
  74. package/{dist/esm2020 → esm2020}/chart/core/axis/builders/public-api.mjs +0 -0
  75. package/{dist/esm2020 → esm2020}/chart/core/utils/generate-ticks.mjs +0 -0
  76. package/{dist/esm2020 → esm2020}/chart/core/utils/get-text-width.mjs +0 -0
  77. package/{dist/esm2020 → esm2020}/chart/core/utils/public-api.mjs +0 -0
  78. package/{dist/esm2020 → esm2020}/chart/default/default-axis-config.mjs +0 -0
  79. package/{dist/esm2020 → esm2020}/chart/default/default-chart-config.mjs +0 -0
  80. package/{dist/esm2020 → esm2020}/chart/default/default-series-config.mjs +0 -0
  81. package/{dist/esm2020 → esm2020}/chart/directives/brushable.directive.mjs +0 -0
  82. package/{dist/esm2020 → esm2020}/chart/directives/zoomable.directive.mjs +0 -0
  83. package/{dist/esm2020 → esm2020}/chart/legend/legend.component.mjs +0 -0
  84. package/{dist/esm2020 → esm2020}/chart/model/axis-options.mjs +0 -0
  85. package/{dist/esm2020 → esm2020}/chart/model/base-point.mjs +0 -0
  86. package/{dist/esm2020 → esm2020}/chart/model/chart-bounds.mjs +0 -0
  87. package/{dist/esm2020 → esm2020}/chart/model/enum/axis-orientation.mjs +0 -0
  88. package/{dist/esm2020 → esm2020}/chart/model/enum/brush-type.mjs +0 -0
  89. package/{dist/esm2020 → esm2020}/chart/model/enum/drag-point-type.mjs +0 -0
  90. package/{dist/esm2020 → esm2020}/chart/model/enum/public-api.mjs +0 -0
  91. package/{dist/esm2020 → esm2020}/chart/model/enum/scale-type.mjs +0 -0
  92. package/{dist/esm2020 → esm2020}/chart/model/enum/series-type.mjs +0 -0
  93. package/{dist/esm2020 → esm2020}/chart/model/enum/tooltip-tracking.mjs +0 -0
  94. package/{dist/esm2020 → esm2020}/chart/model/enum/zoom-type.mjs +0 -0
  95. package/{dist/esm2020 → esm2020}/chart/model/i-broadcast-message.mjs +0 -0
  96. package/{dist/esm2020 → esm2020}/chart/model/i-builder.mjs +0 -0
  97. package/{dist/esm2020 → esm2020}/chart/model/i-chart-config.mjs +0 -0
  98. package/{dist/esm2020 → esm2020}/chart/model/i-chart-event.mjs +0 -0
  99. package/{dist/esm2020 → esm2020}/chart/model/i-display-tooltip.mjs +0 -0
  100. package/{dist/esm2020 → esm2020}/chart/model/i-point-move.mjs +0 -0
  101. package/{dist/esm2020 → esm2020}/chart/model/marker-options.mjs +0 -0
  102. package/{dist/esm2020 → esm2020}/chart/model/plot-band.mjs +0 -0
  103. package/{dist/esm2020 → esm2020}/chart/model/plot-line.mjs +0 -0
  104. package/{dist/esm2020 → esm2020}/chart/model/public-api.mjs +0 -0
  105. package/{dist/esm2020 → esm2020}/chart/model/series.mjs +0 -0
  106. package/{dist/esm2020 → esm2020}/chart/model/svg-attributes.mjs +0 -0
  107. package/{dist/esm2020 → esm2020}/chart/model/tooltip-options.mjs +0 -0
  108. package/{dist/esm2020 → esm2020}/chart/service/broadcast.service.mjs +0 -0
  109. package/{dist/esm2020 → esm2020}/chart/service/brush.service.mjs +0 -0
  110. package/{dist/esm2020 → esm2020}/chart/service/chart.service.mjs +0 -0
  111. package/{dist/esm2020 → esm2020}/chart/service/scale.service.mjs +0 -0
  112. package/{dist/esm2020 → esm2020}/chart/service/zoom.service.mjs +0 -0
  113. package/{dist/esm2020 → esm2020}/public-api.mjs +0 -0
  114. package/{dist/esm2020 → esm2020}/tetacom-svg-charts.mjs +0 -0
  115. package/{dist/fesm2015 → fesm2015}/tetacom-svg-charts.mjs +18 -9
  116. package/fesm2015/tetacom-svg-charts.mjs.map +1 -0
  117. package/{dist/fesm2020 → fesm2020}/tetacom-svg-charts.mjs +18 -9
  118. package/fesm2020/tetacom-svg-charts.mjs.map +1 -0
  119. package/package.json +22 -2
  120. package/{dist/public-api.d.ts → public-api.d.ts} +0 -0
  121. package/{dist/tetacom-svg-charts.d.ts → tetacom-svg-charts.d.ts} +0 -0
  122. package/dist/README.md +0 -24
  123. package/dist/esm2020/chart/chart-container/plotband/plot-band.component.mjs +0 -141
  124. package/dist/fesm2015/tetacom-svg-charts.mjs.map +0 -1
  125. package/dist/fesm2020/tetacom-svg-charts.mjs.map +0 -1
  126. package/dist/package.json +0 -35
  127. package/karma.conf.js +0 -44
  128. package/ng-package.json +0 -7
  129. package/src/chart/Chart.stories.ts +0 -312
  130. package/src/chart/base/series-base.component.ts +0 -36
  131. package/src/chart/chart/chart.component.html +0 -16
  132. package/src/chart/chart/chart.component.scss +0 -7
  133. package/src/chart/chart/chart.component.spec.ts +0 -25
  134. package/src/chart/chart/chart.component.ts +0 -103
  135. package/src/chart/chart-container/chart-container.component.html +0 -124
  136. package/src/chart/chart-container/chart-container.component.scss +0 -14
  137. package/src/chart/chart-container/chart-container.component.spec.ts +0 -25
  138. package/src/chart/chart-container/chart-container.component.ts +0 -213
  139. package/src/chart/chart-container/gridlines/gridlines.component.html +0 -14
  140. package/src/chart/chart-container/gridlines/gridlines.component.scss +0 -8
  141. package/src/chart/chart-container/gridlines/gridlines.component.spec.ts +0 -25
  142. package/src/chart/chart-container/gridlines/gridlines.component.ts +0 -37
  143. package/src/chart/chart-container/plotband/plot-band.component.html +0 -64
  144. package/src/chart/chart-container/plotband/plot-band.component.scss +0 -13
  145. package/src/chart/chart-container/plotband/plot-band.component.spec.ts +0 -25
  146. package/src/chart/chart-container/plotband/plot-band.component.ts +0 -200
  147. package/src/chart/chart-container/plotline/plotline.component.html +0 -22
  148. package/src/chart/chart-container/plotline/plotline.component.scss +0 -6
  149. package/src/chart/chart-container/plotline/plotline.component.spec.ts +0 -25
  150. package/src/chart/chart-container/plotline/plotline.component.ts +0 -101
  151. package/src/chart/chart-container/series/bar/bar-series.component.html +0 -3
  152. package/src/chart/chart-container/series/bar/bar-series.component.scss +0 -0
  153. package/src/chart/chart-container/series/bar/bar-series.component.ts +0 -69
  154. package/src/chart/chart-container/series/line/line-series.component.html +0 -36
  155. package/src/chart/chart-container/series/line/line-series.component.scss +0 -9
  156. package/src/chart/chart-container/series/line/line-series.component.spec.ts +0 -25
  157. package/src/chart/chart-container/series/line/line-series.component.ts +0 -264
  158. package/src/chart/chart-container/series/scatter-series/scatter-series.component.html +0 -43
  159. package/src/chart/chart-container/series/scatter-series/scatter-series.component.scss +0 -9
  160. package/src/chart/chart-container/series/scatter-series/scatter-series.component.spec.ts +0 -25
  161. package/src/chart/chart-container/series/scatter-series/scatter-series.component.ts +0 -254
  162. package/src/chart/chart-container/series-host/series-host.component.ts +0 -89
  163. package/src/chart/chart-container/tooltip/tooltip.component.html +0 -14
  164. package/src/chart/chart-container/tooltip/tooltip.component.scss +0 -8
  165. package/src/chart/chart-container/tooltip/tooltip.component.spec.ts +0 -25
  166. package/src/chart/chart-container/tooltip/tooltip.component.ts +0 -137
  167. package/src/chart/chart-container/x-axis/x-axis.component.html +0 -1
  168. package/src/chart/chart-container/x-axis/x-axis.component.scss +0 -3
  169. package/src/chart/chart-container/x-axis/x-axis.component.spec.ts +0 -25
  170. package/src/chart/chart-container/x-axis/x-axis.component.ts +0 -78
  171. package/src/chart/chart-container/y-axis/y-axis.component.html +0 -4
  172. package/src/chart/chart-container/y-axis/y-axis.component.scss +0 -13
  173. package/src/chart/chart-container/y-axis/y-axis.component.spec.ts +0 -25
  174. package/src/chart/chart-container/y-axis/y-axis.component.ts +0 -80
  175. package/src/chart/chart.module.ts +0 -42
  176. package/src/chart/core/axis/axis.ts +0 -148
  177. package/src/chart/core/axis/builders/axis-size-builder.ts +0 -37
  178. package/src/chart/core/axis/builders/extremes-builder.ts +0 -40
  179. package/src/chart/core/axis/builders/public-api.ts +0 -2
  180. package/src/chart/core/builder/domain-builder.ts +0 -0
  181. package/src/chart/core/utils/generate-ticks.ts +0 -14
  182. package/src/chart/core/utils/get-text-width.ts +0 -10
  183. package/src/chart/core/utils/public-api.ts +0 -2
  184. package/src/chart/default/default-axis-config.ts +0 -10
  185. package/src/chart/default/default-chart-config.ts +0 -24
  186. package/src/chart/default/default-series-config.ts +0 -10
  187. package/src/chart/directives/brushable.directive.ts +0 -31
  188. package/src/chart/directives/zoomable.directive.ts +0 -28
  189. package/src/chart/legend/legend.component.html +0 -8
  190. package/src/chart/legend/legend.component.scss +0 -20
  191. package/src/chart/legend/legend.component.spec.ts +0 -25
  192. package/src/chart/legend/legend.component.ts +0 -31
  193. package/src/chart/model/axis-options.ts +0 -20
  194. package/src/chart/model/base-point.ts +0 -10
  195. package/src/chart/model/chart-bounds.ts +0 -18
  196. package/src/chart/model/enum/axis-orientation.ts +0 -4
  197. package/src/chart/model/enum/brush-type.ts +0 -5
  198. package/src/chart/model/enum/drag-point-type.ts +0 -5
  199. package/src/chart/model/enum/public-api.ts +0 -7
  200. package/src/chart/model/enum/scale-type.ts +0 -8
  201. package/src/chart/model/enum/series-type.ts +0 -5
  202. package/src/chart/model/enum/tooltip-tracking.ts +0 -4
  203. package/src/chart/model/enum/zoom-type.ts +0 -5
  204. package/src/chart/model/i-broadcast-message.ts +0 -20
  205. package/src/chart/model/i-builder.ts +0 -3
  206. package/src/chart/model/i-chart-config.ts +0 -34
  207. package/src/chart/model/i-chart-event.ts +0 -4
  208. package/src/chart/model/i-display-tooltip.ts +0 -7
  209. package/src/chart/model/i-dom-rect.ts +0 -6
  210. package/src/chart/model/i-drag-event.ts +0 -5
  211. package/src/chart/model/i-point-move.ts +0 -7
  212. package/src/chart/model/marker-options.ts +0 -8
  213. package/src/chart/model/plot-band.ts +0 -48
  214. package/src/chart/model/plot-line.ts +0 -32
  215. package/src/chart/model/public-api.ts +0 -14
  216. package/src/chart/model/series.ts +0 -18
  217. package/src/chart/model/svg-attributes.ts +0 -14
  218. package/src/chart/model/tooltip-options.ts +0 -37
  219. package/src/chart/service/broadcast.service.spec.ts +0 -16
  220. package/src/chart/service/broadcast.service.ts +0 -25
  221. package/src/chart/service/brush.service.spec.ts +0 -16
  222. package/src/chart/service/brush.service.ts +0 -90
  223. package/src/chart/service/chart.service.spec.ts +0 -16
  224. package/src/chart/service/chart.service.ts +0 -126
  225. package/src/chart/service/scale.service.spec.ts +0 -16
  226. package/src/chart/service/scale.service.ts +0 -230
  227. package/src/chart/service/zoom.service.spec.ts +0 -16
  228. package/src/chart/service/zoom.service.ts +0 -184
  229. package/src/public-api.ts +0 -11
  230. package/src/test.ts +0 -27
  231. package/tsconfig.lib.json +0 -15
  232. package/tsconfig.lib.prod.json +0 -10
  233. package/tsconfig.spec.json +0 -17
File without changes
@@ -20,6 +20,7 @@ export declare class PlotBandComponent implements AfterViewInit {
20
20
  orientation: typeof AxisOrientation;
21
21
  domain: number[];
22
22
  constructor(scaleService: ScaleService, zoomService: ZoomService, chartService: ChartService, cdr: ChangeDetectorRef, element: ElementRef);
23
+ click(event: MouseEvent): void;
23
24
  emit(event: IChartEvent<PlotBand>): void;
24
25
  ngAfterViewInit(): void;
25
26
  get bandSize(): number;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,150 @@
1
+ import { ChangeDetectionStrategy, Component, HostListener, Input, } from '@angular/core';
2
+ import * as d3 from 'd3';
3
+ import { AxisOrientation } from '../../model/enum/axis-orientation';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "../../service/scale.service";
6
+ import * as i2 from "../../service/zoom.service";
7
+ import * as i3 from "../../service/chart.service";
8
+ import * as i4 from "@angular/common";
9
+ export class PlotBandComponent {
10
+ constructor(scaleService, zoomService, chartService, cdr, element) {
11
+ this.scaleService = scaleService;
12
+ this.zoomService = zoomService;
13
+ this.chartService = chartService;
14
+ this.cdr = cdr;
15
+ this.element = element;
16
+ this.orientation = AxisOrientation;
17
+ }
18
+ click(event) {
19
+ this.emit({
20
+ target: this.plotBand,
21
+ event
22
+ });
23
+ }
24
+ emit(event) {
25
+ this.chartService.emitPlotband(event);
26
+ }
27
+ ngAfterViewInit() {
28
+ this.domain = this.scale.domain();
29
+ const plotbandElement = d3
30
+ .select(this.element.nativeElement)
31
+ .select('.plotband');
32
+ // .on('click', (event, d: PlotBand) => {
33
+ // this.emit({
34
+ // event,
35
+ // target: d,
36
+ // });
37
+ // });
38
+ const grabElements = d3
39
+ .select(this.element.nativeElement)
40
+ .selectAll('.grabber');
41
+ const drag = d3
42
+ .drag()
43
+ .subject(() => {
44
+ if (this.axis.orientation === AxisOrientation.x) {
45
+ return { x: plotbandElement.attr('x') };
46
+ }
47
+ if (this.axis.orientation === AxisOrientation.y) {
48
+ return { y: plotbandElement.attr('y') };
49
+ }
50
+ })
51
+ .on('start drag end', (event, d) => {
52
+ let bandSize = parseFloat(plotbandElement.attr(this.axis.orientation === AxisOrientation.x ? 'width' : 'height'));
53
+ d.to = this.scale.invert(event[AxisOrientation[this.axis.orientation]] +
54
+ (this.axis.orientation === AxisOrientation.x ? bandSize : 0));
55
+ d.from = this.scale.invert(event[AxisOrientation[this.axis.orientation]] +
56
+ (this.axis.orientation === AxisOrientation.y ? bandSize : 0));
57
+ this.emit({
58
+ event,
59
+ target: d,
60
+ });
61
+ this.cdr.detectChanges();
62
+ });
63
+ let grabberKey;
64
+ const resize = d3
65
+ .drag()
66
+ .on('start drag end', (event, d) => {
67
+ requestAnimationFrame(() => {
68
+ if (event?.type === 'start') {
69
+ const { grabber } = event?.sourceEvent?.target?.dataset;
70
+ grabberKey = grabber;
71
+ }
72
+ const min = Math.min(...this.domain);
73
+ const max = Math.max(...this.domain);
74
+ const minValue = d.min ?? min;
75
+ const maxValue = d.max ?? max;
76
+ d[grabberKey] = this.scale.invert(event[AxisOrientation[this.axis.orientation]]);
77
+ if (grabberKey === 'from') {
78
+ const borderMin = d.from <= minValue;
79
+ if (d.from >= d.to) {
80
+ d.from = d.to;
81
+ }
82
+ if (borderMin) {
83
+ d.from = minValue;
84
+ }
85
+ }
86
+ if (grabberKey === 'to') {
87
+ const borderMax = d.to >= maxValue;
88
+ if (borderMax) {
89
+ d.to = maxValue;
90
+ }
91
+ if (d.to <= d.from) {
92
+ d.to = d.from;
93
+ }
94
+ }
95
+ this.emit({
96
+ event,
97
+ target: d,
98
+ });
99
+ this.cdr.detectChanges();
100
+ });
101
+ });
102
+ plotbandElement.datum(this.plotBand);
103
+ grabElements.datum(this.plotBand);
104
+ if (this.plotBand.draggable) {
105
+ plotbandElement.call(drag);
106
+ }
107
+ if (this.plotBand.resizable) {
108
+ grabElements.call(resize);
109
+ }
110
+ }
111
+ get bandSize() {
112
+ return Math.abs(this.scale(this.plotBand.to) - this.scale(this.plotBand.from));
113
+ }
114
+ get height() {
115
+ return this.size.height;
116
+ }
117
+ get width() {
118
+ return this.size.width;
119
+ }
120
+ get from() {
121
+ return this.scale(this.plotBand.from);
122
+ }
123
+ get to() {
124
+ return this.scale(this.plotBand.to);
125
+ }
126
+ getFill(d) {
127
+ if (d.style?.plotBand?.patternImage) {
128
+ return `url(#${d.style.plotBand?.patternImage})`;
129
+ }
130
+ return d.style.plotBand?.fill;
131
+ }
132
+ }
133
+ PlotBandComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PlotBandComponent, deps: [{ token: i1.ScaleService }, { token: i2.ZoomService }, { token: i3.ChartService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
134
+ PlotBandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PlotBandComponent, selector: "[teta-plot-band]", inputs: { plotBand: "plotBand", axis: "axis", scale: "scale", size: "size" }, host: { listeners: { "click": "click($event)" } }, ngImport: i0, template: "<svg:rect\n class=\"plotband\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? to : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n", styles: [":host .draggable rect:hover{cursor:grab}:host .draggable rect:active{cursor:grabbing}:host .x-grabber.resizeable{cursor:col-resize}:host .y-grabber.resizeable{cursor:row-resize}\n"], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PlotBandComponent, decorators: [{
136
+ type: Component,
137
+ args: [{ selector: '[teta-plot-band]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg:rect\n class=\"plotband\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? to : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n", styles: [":host .draggable rect:hover{cursor:grab}:host .draggable rect:active{cursor:grabbing}:host .x-grabber.resizeable{cursor:col-resize}:host .y-grabber.resizeable{cursor:row-resize}\n"] }]
138
+ }], ctorParameters: function () { return [{ type: i1.ScaleService }, { type: i2.ZoomService }, { type: i3.ChartService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { plotBand: [{
139
+ type: Input
140
+ }], axis: [{
141
+ type: Input
142
+ }], scale: [{
143
+ type: Input
144
+ }], size: [{
145
+ type: Input
146
+ }], click: [{
147
+ type: HostListener,
148
+ args: ['click', ['$event']]
149
+ }] } });
150
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxvdC1iYW5kLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jaGFydC9jaGFydC1jb250YWluZXIvcGxvdGJhbmQvcGxvdC1iYW5kLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9jaGFydC9jaGFydC1jb250YWluZXIvcGxvdGJhbmQvcGxvdC1iYW5kLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCx1QkFBdUIsRUFFdkIsU0FBUyxFQUNHLFlBQVksRUFDeEIsS0FBSyxHQUVOLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sS0FBSyxFQUFFLE1BQU0sSUFBSSxDQUFDO0FBTXpCLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQzs7Ozs7O0FBVXBFLE1BQU0sT0FBTyxpQkFBaUI7SUFTNUIsWUFDVSxZQUEwQixFQUMxQixXQUF3QixFQUN4QixZQUEwQixFQUMxQixHQUFzQixFQUN0QixPQUFtQjtRQUpuQixpQkFBWSxHQUFaLFlBQVksQ0FBYztRQUMxQixnQkFBVyxHQUFYLFdBQVcsQ0FBYTtRQUN4QixpQkFBWSxHQUFaLFlBQVksQ0FBYztRQUMxQixRQUFHLEdBQUgsR0FBRyxDQUFtQjtRQUN0QixZQUFPLEdBQVAsT0FBTyxDQUFZO1FBVDdCLGdCQUFXLEdBQUcsZUFBZSxDQUFDO0lBVTNCLENBQUM7SUFFK0IsS0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pcy5vcmllbnRhdGlvbiA9PT0gQXhpc09yaWVudGF0aW9uLnkpIHtcbiAgICAgICAgICByZXR1cm4geyB5OiBwbG90YmFuZEVsZW1lbnQuYXR0cigneScpIH07XG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgICAub24oXG4gICAgICAgICdzdGFydCBkcmFnIGVuZCcsXG4gICAgICAgIChldmVudDogZDMuRDNEcmFnRXZlbnQ8YW55LCBQbG90QmFuZCwgYW55PiwgZDogUGxvdEJhbmQpID0+IHtcbiAgICAgICAgICBsZXQgYmFuZFNpemUgPSBwYXJzZUZsb2F0KFxuICAgICAgICAgICAgcGxvdGJhbmRFbGVtZW50LmF0dHIoXG4gICAgICAgICAgICAgIHRoaXMuYXhpcy5vcmllbnRhdGlvbiA9PT0gQXhpc09yaWVudGF0aW9uLnggPyAnd2lkdGgnIDogJ2hlaWdodCdcbiAgICAgICAgICAgIClcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgZC50byA9IHRoaXMuc2NhbGUuaW52ZXJ0KFxuICAgICAgICAgICAgZXZlbnRbQXhpc09yaWVudGF0aW9uW3RoaXMuYXhpcy5vcmllbnRhdGlvbl1dICtcbiAgICAgICAgICAgICAgKHRoaXMuYXhpcy5vcmllbnRhdGlvbiA9PT0gQXhpc09yaWVudGF0aW9uLnggPyBiYW5kU2l6ZSA6IDApXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIGQuZnJvbSA9IHRoaXMuc2NhbGUuaW52ZXJ0KFxuICAgICAgICAgICAgZXZlbnRbQXhpc09yaWVudGF0aW9uW3RoaXMuYXhpcy5vcmllbnRhdGlvbl1dICtcbiAgICAgICAgICAgICAgKHRoaXMuYXhpcy5vcmllbnRhdGlvbiA9PT0gQXhpc09yaWVudGF0aW9uLnkgPyBiYW5kU2l6ZSA6IDApXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIHRoaXMuZW1pdCh7XG4gICAgICAgICAgICBldmVudCxcbiAgICAgICAgICAgIHRhcmdldDogZCxcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIHRoaXMuY2RyLmRldGVjdENoYW5nZXMoKTtcbiAgICAgICAgfVxuICAgICAgKTtcblxuICAgIGxldCBncmFiYmVyS2V5O1xuXG4gICAgY29uc3QgcmVzaXplID0gZDNcbiAgICAgIC5kcmFnKClcbiAgICAgIC5vbihcbiAgICAgICAgJ3N0YXJ0IGRyYWcgZW5kJyxcbiAgICAgICAgKGV2ZW50OiBkMy5EM0RyYWdFdmVudDxhbnksIFBsb3RCYW5kLCBhbnk+LCBkOiBQbG90QmFuZCkgPT4ge1xuICAgICAgICAgIHJlcXVlc3RBbmltYXRpb25GcmFtZSgoKSA9PiB7XG4gICAgICAgICAgICBpZiAoZXZlbnQ/LnR5cGUgPT09ICdzdGFydCcpIHtcbiAgICAgICAgICAgICAgY29uc3QgeyBncmFiYmVyIH0gPSBldmVudD8uc291cmNlRXZlbnQ/LnRhcmdldD8uZGF0YXNldDtcbiAgICAgICAgICAgICAgZ3JhYmJlcktleSA9IGdyYWJiZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IG1pbiA9IE1hdGgubWluKC4uLnRoaXMuZG9tYWluKTtcbiAgICAgICAgICAgIGNvbnN0IG1heCA9IE1hdGgubWF4KC4uLnRoaXMuZG9tYWluKTtcblxuICAgICAgICAgICAgY29uc3QgbWluVmFsdWUgPSBkLm1pbiA/PyBtaW47XG4gICAgICAgICAgICBjb25zdCBtYXhWYWx1ZSA9IGQubWF4ID8/IG1heDtcbiAgICAgICAgICAgIGRbZ3JhYmJlcktleV0gPSB0aGlzLnNjYWxlLmludmVydChcbiAgICAgICAgICAgICAgZXZlbnRbQXhpc09yaWVudGF0aW9uW3RoaXMuYXhpcy5vcmllbnRhdGlvbl1dXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBpZiAoZ3JhYmJlcktleSA9PT0gJ2Zyb20nKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGJvcmRlck1pbiA9IGQuZnJvbSA8PSBtaW5WYWx1ZTtcblxuICAgICAgICAgICAgICBpZiAoZC5mcm9tID49IGQudG8pIHtcbiAgICAgICAgICAgICAgICBkLmZyb20gPSBkLnRvO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKGJvcmRlck1pbikge1xuICAgICAgICAgICAgICAgIGQuZnJvbSA9IG1pblZhbHVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChncmFiYmVyS2V5ID09PSAndG8nKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGJvcmRlck1heCA9IGQudG8gPj0gbWF4VmFsdWU7XG5cbiAgICAgICAgICAgICAgaWYgKGJvcmRlck1heCkge1xuICAgICAgICAgICAgICAgIGQudG8gPSBtYXhWYWx1ZTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGlmIChkLnRvIDw9IGQuZnJvbSkge1xuICAgICAgICAgICAgICAgIGQudG8gPSBkLmZyb207XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5lbWl0KHtcbiAgICAgICAgICAgICAgZXZlbnQsXG4gICAgICAgICAgICAgIHRhcmdldDogZCxcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICk7XG5cbiAgICBwbG90YmFuZEVsZW1lbnQuZGF0dW08UGxvdEJhbmQ+KHRoaXMucGxvdEJhbmQpO1xuICAgIGdyYWJFbGVtZW50cy5kYXR1bTxQbG90QmFuZD4odGhpcy5wbG90QmFuZCk7XG5cbiAgICBpZiAodGhpcy5wbG90QmFuZC5kcmFnZ2FibGUpIHtcbiAgICAgIHBsb3RiYW5kRWxlbWVudC5jYWxsKGRyYWcpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLnBsb3RCYW5kLnJlc2l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cbjxzdmc6bGluZSBjbGFzcz1cImdyYWJiZXJcIlxuICAgICAgICAgIFtjbGFzcy54LWdyYWJiZXJdPVwiYXhpcy5vcmllbnRhdGlvbiA9PT0gb3JpZW50YXRpb24ueFwiXG4gICAgICAgICAgW2NsYXNzLnktZ3JhYmJlcl09XCJheGlzLm9yaWVudGF0aW9uID09PSBvcmllbnRhdGlvbi55XCJcbiAgICAgICAgICBbY2xhc3MucmVzaXplYWJsZV09XCJwbG90QmFuZD8ucmVzaXphYmxlXCJcbiAgICAgICAgICBbYXR0ci5zdHJva2VdPVwiJ3JlZCdcIlxuICAgICAgICAgIFthdHRyLnN0cm9rZS13aWR0aF09XCI4XCJcbiAgICAgICAgICBvcGFjaXR5PVwiMFwiXG4gICAgICAgICAgW2F0dHIueDFdPVwiYXhpcy5vcmllbnRhdGlvbiA9PT0gb3JpZW50YXRpb24ueCA/IGZyb20gOiAwXCJcbiAgICAgICAgICBbYXR0ci54Ml09XCJheGlzLm9yaWVudGF0aW9uID09PSBvcmllbnRhdGlvbi54ID8gZnJvbSA6IHdpZHRoXCJcbiAgICAgICAgICBbYXR0ci5kYXRhLWdyYWJiZXJdPVwiJ2Zyb20nXCJcbiAgICAgICAgICBbYXR0ci55MV09XCJheGlzLm9yaWVudGF0aW9uID09PSBvcmllbnRhdGlvbi54ID8gMCA6IGZyb21cIlxuICAgICAgICAgIFthdHRyLnkyXT1cImF4aXMub3JpZW50YXRpb24gPT09IG9yaWVudGF0aW9uLnggPyBoZWlnaHQgOiBmcm9tXCI+XG48L3N2ZzpsaW5lPlxuXG48c3ZnOmxpbmUgY2xhc3M9XCJncmFiYmVyXCJcbiAgICAgICAgICBbY2xhc3MueC1ncmFiYmVyXT1cImF4aXMub3JpZW50YXRpb24gPT09IG9yaWVudGF0aW9uLnhcIlxuICAgICAgICAgIFtjbGFzcy55LWdyYWJiZXJdPVwiYXhpcy5vcmllbnRhdGlvbiA9PT0gb3JpZW50YXRpb24ueVwiXG4gICAgICAgICAgW2NsYXNzLnJlc2l6ZWFibGVdPVwicGxvdEJhbmQ/LnJlc2l6YWJsZVwiXG4gICAgICAgICAgW2F0dHIuc3Ryb2tlXT1cIidyZWQnXCJcbiAgICAgICAgICBbYXR0ci5zdHJva2Utd2lkdGhdPVwiOFwiXG4gICAgICAgICAgb3BhY2l0eT1cIjBcIlxuICAgICAgICAgIFthdHRyLngxXT1cImF4aXMub3JpZW50YXRpb24gPT09IG9yaWVudGF0aW9uLnggPyB0byA6IDBcIlxuICAgICAgICAgIFthdHRyLngyXT1cImF4aXMub3JpZW50YXRpb24gPT09IG9yaWVudGF0aW9uLnggPyB0byA6IHdpZHRoXCJcbiAgICAgICAgICBbYXR0ci5kYXRhLWdyYWJiZXJdPVwiJ3RvJ1wiXG4gICAgICAgICAgW2F0dHIueTFdPVwiYXhpcy5vcmllbnRhdGlvbiA9PT0gb3JpZW50YXRpb24ueCA/IDAgOiB0b1wiXG4gICAgICAgICAgW2F0dHIueTJdPVwiYXhpcy5vcmllbnRhdGlvbiA9PT0gb3JpZW50YXRpb24ueCA/IGhlaWdodCA6IHRvXCI+XG48L3N2ZzpsaW5lPlxuXG5cbiJdfQ==
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, ChangeDetectionStrategy, Input, ViewChild, ChangeDetectorRef, Directive, HostBinding, EventEmitter, Output, NgModule } from '@angular/core';
2
+ import { Injectable, Component, ChangeDetectionStrategy, Input, ViewChild, HostListener, ChangeDetectorRef, Directive, HostBinding, EventEmitter, Output, NgModule } from '@angular/core';
3
3
  import * as i4 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { BehaviorSubject, Subject, map, filter, shareReplay, combineLatest, withLatestFrom, tap, merge, takeWhile } from 'rxjs';
@@ -982,6 +982,12 @@ class PlotBandComponent {
982
982
  this.element = element;
983
983
  this.orientation = AxisOrientation;
984
984
  }
985
+ click(event) {
986
+ this.emit({
987
+ target: this.plotBand,
988
+ event
989
+ });
990
+ }
985
991
  emit(event) {
986
992
  this.chartService.emitPlotband(event);
987
993
  }
@@ -989,13 +995,13 @@ class PlotBandComponent {
989
995
  this.domain = this.scale.domain();
990
996
  const plotbandElement = d3
991
997
  .select(this.element.nativeElement)
992
- .select('.plotband')
993
- .on('click', (event, d) => {
994
- this.emit({
995
- event,
996
- target: d,
997
- });
998
- });
998
+ .select('.plotband');
999
+ // .on('click', (event, d: PlotBand) => {
1000
+ // this.emit({
1001
+ // event,
1002
+ // target: d,
1003
+ // });
1004
+ // });
999
1005
  const grabElements = d3
1000
1006
  .select(this.element.nativeElement)
1001
1007
  .selectAll('.grabber');
@@ -1094,7 +1100,7 @@ class PlotBandComponent {
1094
1100
  }
1095
1101
  }
1096
1102
  PlotBandComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PlotBandComponent, deps: [{ token: ScaleService }, { token: ZoomService }, { token: ChartService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1097
- PlotBandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PlotBandComponent, selector: "[teta-plot-band]", inputs: { plotBand: "plotBand", axis: "axis", scale: "scale", size: "size" }, ngImport: i0, template: "<svg:rect\n class=\"plotband\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? to : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n", styles: [":host .draggable rect:hover{cursor:grab}:host .draggable rect:active{cursor:grabbing}:host .x-grabber.resizeable{cursor:col-resize}:host .y-grabber.resizeable{cursor:row-resize}\n"], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1103
+ PlotBandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PlotBandComponent, selector: "[teta-plot-band]", inputs: { plotBand: "plotBand", axis: "axis", scale: "scale", size: "size" }, host: { listeners: { "click": "click($event)" } }, ngImport: i0, template: "<svg:rect\n class=\"plotband\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? to : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n", styles: [":host .draggable rect:hover{cursor:grab}:host .draggable rect:active{cursor:grabbing}:host .x-grabber.resizeable{cursor:col-resize}:host .y-grabber.resizeable{cursor:row-resize}\n"], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1098
1104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PlotBandComponent, decorators: [{
1099
1105
  type: Component,
1100
1106
  args: [{ selector: '[teta-plot-band]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg:rect\n class=\"plotband\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? to : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n", styles: [":host .draggable rect:hover{cursor:grab}:host .draggable rect:active{cursor:grabbing}:host .x-grabber.resizeable{cursor:col-resize}:host .y-grabber.resizeable{cursor:row-resize}\n"] }]
@@ -1106,6 +1112,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
1106
1112
  type: Input
1107
1113
  }], size: [{
1108
1114
  type: Input
1115
+ }], click: [{
1116
+ type: HostListener,
1117
+ args: ['click', ['$event']]
1109
1118
  }] } });
1110
1119
 
1111
1120
  class SeriesBaseComponent {