@kiwibit/chart 20.0.0 → 20.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.
@@ -0,0 +1,588 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, HostListener, Input, Output, Directive, Component } from '@angular/core';
3
+ import * as echarts from 'echarts/core';
4
+ import { TitleComponent, TooltipComponent, GridComponent, LegendComponent, DataZoomComponent, ToolboxComponent } from 'echarts/components';
5
+ import { LineChart, ScatterChart } from 'echarts/charts';
6
+ import { CanvasRenderer } from 'echarts/renderers';
7
+
8
+ var TraceType;
9
+ (function (TraceType) {
10
+ TraceType["LINE"] = "line";
11
+ TraceType["SCATTER"] = "scatter";
12
+ })(TraceType || (TraceType = {}));
13
+ var PointSymbol;
14
+ (function (PointSymbol) {
15
+ PointSymbol["NONE"] = "none";
16
+ PointSymbol["CIRCLE"] = "circle";
17
+ PointSymbol["TRIANGLE"] = "triangle";
18
+ PointSymbol["PIN"] = "pin";
19
+ PointSymbol["DIAMOND"] = "diamond";
20
+ })(PointSymbol || (PointSymbol = {}));
21
+ var TraceStyle;
22
+ (function (TraceStyle) {
23
+ TraceStyle["SOLID"] = "solid";
24
+ TraceStyle["DASHED"] = "dashed";
25
+ TraceStyle["DOTTED"] = "dotted";
26
+ })(TraceStyle || (TraceStyle = {}));
27
+ var AxisType;
28
+ (function (AxisType) {
29
+ AxisType["VALUE"] = "value";
30
+ })(AxisType || (AxisType = {}));
31
+ var ShapeVariant;
32
+ (function (ShapeVariant) {
33
+ ShapeVariant[ShapeVariant["TRACE"] = 0] = "TRACE";
34
+ })(ShapeVariant || (ShapeVariant = {}));
35
+
36
+ const ZOOM_IN = "M39.35 40.45 26.6 27.7q-1.55 1.35-3.6 2.025-2.05.675-4 .675-4.9 0-8.225-3.325Q7.45 23.75 7.45 18.9q0-4.9 3.325-8.225Q14.1 7.35 18.95 7.35q4.85 0 8.225 3.325t3.375 8.175q0 2.1-.725 4.1-.725 2-2.025 3.45l12.8 12.75ZM19 28.65q4.15 0 6.975-2.8 2.825-2.8 2.825-7 0-4.15-2.825-6.95T19 9.1q-4.2 0-7 2.8t-2.8 6.95q0 4.2 2.8 7t7 2.8Zm-.9-5.1V19.7h-3.85v-1.75h3.85v-3.8h1.75v3.8h3.8v1.75h-3.8v3.85Z";
37
+ const ZOOM_OUT = "M41.25 39.35 29.55 27.7q-1.5 1.25-3.525 1.975Q24 30.4 22.05 30.4q-2.1 0-3.975-.725T14.9 27.65l1.2-1.2q1.2 1.1 2.65 1.65 1.45.55 3.25.55 4.2 0 7-2.8t2.8-7q0-4.15-2.8-6.95t-7-2.8q-4.15 0-7 2.8-2.85 2.8-2.75 6.95l3.2-3.4 1.3 1.3-5.35 5.35-5.3-5.35 1.3-1.3 3.05 3.3q0-4.85 3.4-8.125Q17.25 7.35 22 7.35q4.9 0 8.225 3.325Q33.55 14 33.55 18.85q0 2.1-.75 4.1-.75 2-1.95 3.45L42.5 38.05Z";
38
+ const SAVE_AS_SVG = "M11.3 40.05q-1.35 0-2.35-1t-1-2.35V11.3q0-1.4 1-2.375 1-.975 2.35-.975h25.4q1.4 0 2.375.975.975.975.975 2.375v25.4q0 1.35-.975 2.35t-2.375 1Zm0-1.75h25.4q.6 0 1.1-.5.5-.5.5-1.1V11.3q0-.6-.5-1.1-.5-.5-1.1-.5H11.3q-.6 0-1.1.5-.5.5-.5 1.1v25.4q0 .6.5 1.1.5.5 1.1.5Zm4.1-5.15h17.65l-5.5-7.3-5.2 6.45-3.3-3.85ZM9.7 38.3V9.7v28.6Z";
39
+ const RESTORE = "M24.2 25.65q-.65 0-1.125-.475T22.6 24q0-.7.475-1.2t1.175-.5q.65 0 1.175.525T25.95 24q0 .7-.55 1.175-.55.475-1.2.475Zm.1 14.55q-6.4 0-11.1-4.25Q8.5 31.7 8.1 25.4h1.8q.5 5.55 4.6 9.3 4.1 3.75 9.75 3.75 6.05 0 10.225-4.225T38.65 24.05q0-6.05-4.2-10.275Q30.25 9.55 24.3 9.55q-3.2 0-6.025 1.3t-4.875 3.6h4.95v1.75H10.4v-8h1.75v5.05q2.25-2.6 5.475-4.025Q20.85 7.8 24.3 7.8q3.3 0 6.225 1.25t5.125 3.475q2.2 2.225 3.475 5.175Q40.4 20.65 40.4 24q0 3.35-1.275 6.3-1.275 2.95-3.475 5.175-2.2 2.225-5.125 3.475T24.3 40.2Z";
40
+ const ADD_POINT = "M222.895-189.538q-22.456 0-37.906-15.451-15.451-15.45-15.451-37.906v-474.21q0-22.456 15.451-37.906 15.45-15.451 38.088-15.451h322.346v28.924H223.077q-10.769 0-17.692 6.923t-6.923 17.692v473.846q0 10.769 6.923 17.692t17.692 6.923h473.846q10.77 0 17.693-6.923 6.923-6.923 6.923-17.692v-322.346h28.923v322.346q0 22.638-15.451 38.088-15.45 15.451-37.906 15.451h-474.21Zm78.028-121.539h28.923v-243.077h-28.923v243.077Zm144.923 0h28.923v-337.846h-28.923v337.846Zm144.308 0h28.923v-148.308h-28.923v148.308Zm100-327.692v-71.385h-71.385v-28.923h71.385v-71.385h28.923v71.385h71.385v28.923h-71.385v71.385h-28.923ZM460-480Z";
41
+
42
+ // Angular Imports
43
+ echarts.use([
44
+ TitleComponent,
45
+ TooltipComponent,
46
+ GridComponent,
47
+ LineChart,
48
+ ScatterChart,
49
+ CanvasRenderer,
50
+ LegendComponent,
51
+ DataZoomComponent,
52
+ ToolboxComponent,
53
+ ]);
54
+ class KiwiChartDirective {
55
+ /**
56
+ * If you resize the page, the chart is automatically re-rendered wiht the right proportions.
57
+ *
58
+ * @memberof EnchartingDirective
59
+ */
60
+ onResize() {
61
+ if (this.echartsInstance) {
62
+ this.echartsInstance.resize();
63
+ }
64
+ }
65
+ constructor(el) {
66
+ this.el = el;
67
+ /**
68
+ * The Chart Object rendered by the canvas. For all the available options refer
69
+ * to Chart interface in the models folder.
70
+ *
71
+ * @type {(Chart | null)}
72
+ * @memberof KiwiChartDirective
73
+ */
74
+ this.chart = null;
75
+ /**
76
+ * Width and Height of the chart area. The dimensions refer to the father component
77
+ * into which the kiwi-chart is inserted. For example in an empty page the width/height
78
+ * of the chart can take the whole available space in the page.
79
+ *
80
+ * @type {string}
81
+ * @memberof KiwiChartDirective
82
+ */
83
+ this.width = '100%';
84
+ this.height = '480px';
85
+ this.chartInit = new EventEmitter();
86
+ /**
87
+ * Output event used to emit to the father component the coordinates
88
+ * of the point clicked in the chart area. This functionality to be used must
89
+ * have the property "clickToAddPoint" in the Chart object set to true.
90
+ *
91
+ * @type {EventEmitter<BasePoint>}
92
+ * @memberof KiwiChartDirective
93
+ */
94
+ this.addPoint = new EventEmitter();
95
+ /**
96
+ * When the cursor hovers the chart area it emits to the father component the
97
+ * x and y coordinates relative to the chart reference system.
98
+ *
99
+ * @type {EventEmitter<BasePoint>}
100
+ * @memberof KiwiChartDirective
101
+ */
102
+ this.chartHover = new EventEmitter();
103
+ /**
104
+ * This property simply activates or not the dark theme of the chart
105
+ * defined by the Echarts library. In addition the background color can be custom
106
+ * so that the chart can match the background of the application in which it's used.
107
+ *
108
+ * @type {boolean}
109
+ * @memberof KiwiChartDirective
110
+ */
111
+ this.darkTheme = false;
112
+ this.darkThemeBackground = null;
113
+ /**
114
+ * The instance of the Chart.
115
+ *
116
+ * @type {ECharts}
117
+ * @memberof KiwiChartDirective
118
+ */
119
+ this.echartsInstance = null;
120
+ /**
121
+ * Default number of decimals that can have
122
+ * the values on the x and y axes.
123
+ *
124
+ * @private
125
+ * @type {number}
126
+ * @memberof KiwiChartDirective
127
+ */
128
+ this.MAX_DECIMALS = 3;
129
+ this.legendSelected = {};
130
+ this.isLegendClicked = false;
131
+ /**
132
+ * Used to perform actions (as point addition based on the cursor position) on the chart.
133
+ *
134
+ * @type {(zrender.ZRenderType | null)}
135
+ * @memberof KiwiChartComponent
136
+ */
137
+ this.zr = null;
138
+ }
139
+ ngAfterViewInit() {
140
+ if (this.chart) {
141
+ this.renderChart(this.chart);
142
+ }
143
+ }
144
+ ngOnChanges(changes) {
145
+ let chart = changes['chart']?.currentValue;
146
+ if (this.echartsInstance) {
147
+ // Every time we have an external change we
148
+ // destroy the chart and re-initialize it
149
+ this.echartsInstance.dispose();
150
+ this.renderChart(chart);
151
+ }
152
+ }
153
+ renderChart(chart) {
154
+ // Update ElementRef styles
155
+ this.el.nativeElement.style.width = this.width;
156
+ this.el.nativeElement.style.height = this.height;
157
+ this.echartsInstance = echarts.init(this.el.nativeElement, this.darkTheme ? 'dark' : 'default', {
158
+ renderer: 'svg'
159
+ });
160
+ if (chart) {
161
+ this.echartsInstance.setOption({
162
+ title: {
163
+ text: chart.title,
164
+ },
165
+ grid: {
166
+ id: 0,
167
+ width: '70%'
168
+ },
169
+ backgroundColor: this.darkTheme ? this.darkThemeBackground ?? '#303030' : 'transparent', tooltip: {
170
+ axisPointer: {
171
+ type: 'cross',
172
+ crossStyle: {
173
+ color: '#bebebe'
174
+ }
175
+ }
176
+ },
177
+ toolbox: {
178
+ orient: 'horizontal',
179
+ left: 'center',
180
+ top: '25px',
181
+ feature: {
182
+ dataZoom: {
183
+ brushStyle: {
184
+ borderColor: '#000',
185
+ borderWidth: 1,
186
+ borderType: 'dashed'
187
+ },
188
+ emphasis: {
189
+ iconStyle: {
190
+ textPosition: 'top',
191
+ textPadding: 5
192
+ }
193
+ },
194
+ icon: {
195
+ zoom: ZOOM_IN,
196
+ back: ZOOM_OUT
197
+ },
198
+ },
199
+ saveAsImage: {
200
+ emphasis: {
201
+ iconStyle: {
202
+ textPosition: 'top',
203
+ textPadding: 5
204
+ }
205
+ },
206
+ icon: SAVE_AS_SVG,
207
+ },
208
+ restore: {
209
+ emphasis: {
210
+ iconStyle: {
211
+ textPosition: 'top',
212
+ textPadding: 5
213
+ }
214
+ },
215
+ icon: RESTORE,
216
+ },
217
+ myAddPoint: {
218
+ show: chart.clickToAddPoint ?? false,
219
+ title: chart.addPointCustomName ?? 'Add Point',
220
+ icon: ADD_POINT,
221
+ onclick: () => {
222
+ if (this.echartsInstance) {
223
+ const option = this.echartsInstance.getOption();
224
+ const toolbox = option.toolbox;
225
+ if (toolbox) {
226
+ const status = toolbox[0].feature?.['myAddPoint']?.iconStatus;
227
+ const offColor = 'rgb(102,102,102)';
228
+ const highlightColor = 'rgb(62,152,197)';
229
+ this.echartsInstance.setOption({
230
+ toolbox: {
231
+ feature: {
232
+ myAddPoint: {
233
+ iconStatus: !status,
234
+ iconStyle: {
235
+ borderColor: !status ? highlightColor : offColor
236
+ }
237
+ }
238
+ }
239
+ }
240
+ });
241
+ }
242
+ }
243
+ },
244
+ emphasis: {
245
+ iconStyle: {
246
+ textPosition: 'top',
247
+ textPadding: 5
248
+ }
249
+ }
250
+ }
251
+ },
252
+ },
253
+ dataZoom: [
254
+ {
255
+ type: 'inside',
256
+ xAxisIndex: [0],
257
+ throttle: 0,
258
+ filterMode: 'none',
259
+ disabled: !chart.scrollToZoom
260
+ },
261
+ {
262
+ type: 'inside',
263
+ yAxisIndex: [0],
264
+ throttle: 0,
265
+ filterMode: 'none',
266
+ disabled: !chart.scrollToZoom
267
+ },
268
+ ],
269
+ legend: {
270
+ inactiveColor: this.darkTheme ? '#8b8b8b' : '#ccc',
271
+ data: chart.shapes.map((shape) => ({
272
+ name: shape.name,
273
+ icon: 'circle',
274
+ })),
275
+ selected: chart.shapes.reduce((accumulator, shape) => ({
276
+ ...accumulator,
277
+ [shape.name]: this.getLegendItemSelection(shape),
278
+ }), {}),
279
+ show: chart.showLegend ?? false,
280
+ orient: 'vertical',
281
+ left: 'right',
282
+ padding: [60, 20],
283
+ type: 'scroll',
284
+ textStyle: {
285
+ width: 120,
286
+ fontWeight: 'bold',
287
+ overflow: 'break'
288
+ }
289
+ },
290
+ xAxis: {
291
+ type: chart.xAxisType,
292
+ name: chart.xAxisUom ? `${chart.xAxisName} [ ${chart.xAxisUom} ]` : chart.xAxisName,
293
+ nameLocation: 'middle',
294
+ nameGap: 30,
295
+ splitLine: {
296
+ show: chart.showGrid ?? true,
297
+ lineStyle: {
298
+ color: this.darkTheme ? '#595959' : '#ccc'
299
+ }
300
+ },
301
+ min: chart.xMin?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),
302
+ max: chart.xMax?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),
303
+ },
304
+ yAxis: {
305
+ type: chart.yAxisType,
306
+ name: chart.yAxisUom ? `${chart.yAxisName} [ ${chart.yAxisUom} ]` : chart.yAxisName,
307
+ nameLocation: 'middle',
308
+ nameGap: 50,
309
+ splitLine: {
310
+ show: chart.showGrid ?? true,
311
+ lineStyle: {
312
+ color: this.darkTheme ? '#595959' : '#ccc'
313
+ }
314
+ },
315
+ min: chart.yMin?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),
316
+ max: chart.yMax?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),
317
+ },
318
+ series: this.createSeries(chart.shapes),
319
+ animation: chart.hasAnimations,
320
+ animationDuration: chart.animationDuration ?? 250,
321
+ animationEasing: 'cubicOut'
322
+ }, true, true);
323
+ }
324
+ this.setupZrEventHandler(this.echartsInstance);
325
+ this.setupLegendEventHandler(this.echartsInstance);
326
+ }
327
+ createSeries(shapes) {
328
+ let series = [];
329
+ shapes.forEach((shape) => {
330
+ switch (shape.variant) {
331
+ case ShapeVariant.TRACE:
332
+ series.push(this.createTrace(shape));
333
+ break;
334
+ default:
335
+ break;
336
+ }
337
+ });
338
+ return series;
339
+ }
340
+ createTrace(trace) {
341
+ return {
342
+ type: trace.type,
343
+ name: trace.name,
344
+ data: trace.points.map((point) => ({
345
+ value: [point.x, point.y],
346
+ symbol: point.symbol ?? 'circle',
347
+ name: point.name,
348
+ symbolSize: point.symbolSize ?? 2,
349
+ itemStyle: {
350
+ color: point.color
351
+ },
352
+ emphasis: {
353
+ disabled: true
354
+ },
355
+ label: {
356
+ show: true,
357
+ position: 'bottom',
358
+ align: 'left',
359
+ verticalAlign: 'bottom',
360
+ formatter: () => `${point.name ?? ''}`,
361
+ fontSize: 13,
362
+ padding: [0, 0, 0, 10],
363
+ width: 100,
364
+ overflow: 'truncate',
365
+ ellipsis: '...',
366
+ fontWeight: 'bold',
367
+ color: this.darkTheme ? '#fff' : '#000'
368
+ },
369
+ tooltip: {
370
+ formatter: ({ value }) => `
371
+ <strong>${this.chart?.xAxisName}:</strong> ${value[0].toFixed(3).replace(/[.,]000$/, "")}
372
+ <br>
373
+ <strong>${this.chart?.yAxisName}:</strong> ${value[1].toFixed(3).replace(/[.,]000$/, "")}
374
+ `
375
+ }
376
+ })),
377
+ color: trace.color,
378
+ lineStyle: {
379
+ width: trace.width,
380
+ type: trace.style,
381
+ opacity: trace.opacity ?? 1
382
+ },
383
+ smooth: trace.smooth ?? false
384
+ };
385
+ }
386
+ getLegendItemSelection(shape) {
387
+ if (this.isLegendClicked) {
388
+ return this.legendSelected[shape.name] ?? true;
389
+ }
390
+ else {
391
+ return shape.selectedByDefault ?? true;
392
+ }
393
+ }
394
+ /**
395
+ * intercept a selection change event on the legend and save the state
396
+ * of all selections on the supporting variable legendSelected
397
+ *
398
+ * @param ec
399
+ */
400
+ setupLegendEventHandler(ec) {
401
+ if (this.echartsInstance != null) {
402
+ this.echartsInstance.on('legendselectchanged', (params) => {
403
+ this.isLegendClicked = true;
404
+ this.legendSelected = params.selected;
405
+ });
406
+ }
407
+ }
408
+ setupZrEventHandler(ec) {
409
+ this.zr = ec.getZr();
410
+ /**
411
+ * Intercepts the click event on the chart (if the clickToAddPoint property is set to true)
412
+ * and emits the point coordinates to the father component.
413
+ */
414
+ this.zr.on('click', params => {
415
+ let option = ec.getOption();
416
+ let active = option?.toolbox?.[0]?.feature?.myAddPoint?.iconStatus;
417
+ if (active && this.chart?.clickToAddPoint) {
418
+ const pointInPixel = [params.offsetX, params.offsetY];
419
+ const pointInGrid = ec.convertFromPixel({ gridId: 0 }, pointInPixel);
420
+ if (ec.containPixel({ gridId: 0 }, pointInPixel) && pointInGrid) {
421
+ let newPoint = {
422
+ x: +pointInGrid[0].toFixed(3),
423
+ y: +pointInGrid[1].toFixed(3)
424
+ };
425
+ this.addPoint.emit(newPoint);
426
+ }
427
+ }
428
+ });
429
+ /**
430
+ * This is used perform custom actions when the mouse is hovering the chart area
431
+ */
432
+ this.zr.on('mousemove', params => {
433
+ const pointInPixel = [params.offsetX, params.offsetY];
434
+ const pointInGrid = ec.convertFromPixel('grid', pointInPixel);
435
+ /*
436
+ * Logic to emit to the father component the x and y cdinates when the
437
+ * cursor is hovering the chart area .
438
+ */
439
+ if (ec.containPixel('grid', pointInPixel) && pointInGrid) {
440
+ let newPoint = {
441
+ x: +pointInGrid[0].toFixed(3),
442
+ y: +pointInGrid[1].toFixed(3)
443
+ };
444
+ this.chartHover.emit(newPoint);
445
+ }
446
+ /* Logic to change the cursor icon when the "Click to Add Point" feature is active and viceversa. */
447
+ const option = ec.getOption();
448
+ const addPointIsActive = option?.toolbox?.[0]?.feature?.myAddPoint?.iconStatus;
449
+ if (addPointIsActive) {
450
+ this.zr?.setCursorStyle(ec.containPixel('grid', pointInPixel) ? 'copy' : 'default');
451
+ }
452
+ });
453
+ }
454
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KiwiChartDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
455
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: KiwiChartDirective, isStandalone: true, selector: "div[kiwi-chart]", inputs: { chart: "chart", width: "width", height: "height", darkTheme: "darkTheme", darkThemeBackground: "darkThemeBackground" }, outputs: { chartInit: "chartInit", addPoint: "addPoint", chartHover: "chartHover" }, host: { listeners: { "window:resize": "onResize($event)" } }, usesOnChanges: true, ngImport: i0 }); }
456
+ }
457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KiwiChartDirective, decorators: [{
458
+ type: Directive,
459
+ args: [{
460
+ selector: 'div[kiwi-chart]',
461
+ standalone: true
462
+ }]
463
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { chart: [{
464
+ type: Input,
465
+ args: [{ required: true }]
466
+ }], width: [{
467
+ type: Input
468
+ }], height: [{
469
+ type: Input
470
+ }], chartInit: [{
471
+ type: Output
472
+ }], addPoint: [{
473
+ type: Output
474
+ }], chartHover: [{
475
+ type: Output
476
+ }], darkTheme: [{
477
+ type: Input
478
+ }], darkThemeBackground: [{
479
+ type: Input
480
+ }], onResize: [{
481
+ type: HostListener,
482
+ args: ['window:resize', ['$event']]
483
+ }] } });
484
+
485
+ // Angular General
486
+ class KiwiChartComponent {
487
+ constructor() {
488
+ /**
489
+ * The Chart Object rendered by the canvas. For all the available options refer
490
+ * to Chart interface in the models folder.
491
+ *
492
+ * @type {(Chart | null)}
493
+ * @memberof KiwiChartComponent
494
+ */
495
+ this.chart = null;
496
+ /**
497
+ * Width and Height of the chart area. The dimensions refer to the father component
498
+ * into which the kiwi-chart is inserted. For example in an empty page the width/height
499
+ * of the chart can take the whole available space in the page.
500
+ *
501
+ * @type {string}
502
+ * @memberof KiwiChartComponent
503
+ */
504
+ this.width = '100%';
505
+ this.height = '480px';
506
+ /**
507
+ * This property simply activates or not the dark theme of the chart
508
+ * defined by the Echarts library. In addition the background color can be custom
509
+ * so that the chart can match the background of the application in which it's used.
510
+ *
511
+ * @type {boolean}
512
+ * @memberof KiwiChartComponent
513
+ */
514
+ this.darkTheme = false;
515
+ this.darkThemeBackground = null;
516
+ /**
517
+ * Output event used to emit to the father component the coordinates
518
+ * of the point clicked in the chart area. This functionality to be used must
519
+ * have the property "clickToAddPoint" in the Chart object set to true.
520
+ *
521
+ * @type {EventEmitter<BasePoint>}
522
+ * @memberof KiwiChartComponent
523
+ */
524
+ this.addPoint = new EventEmitter();
525
+ /**
526
+ * When the cursor hovers the chart area it emits to the father component the
527
+ * x and y coordinates relative to the chart reference system.
528
+ *
529
+ * @type {EventEmitter<BasePoint>}
530
+ * @memberof KiwiChartComponent
531
+ */
532
+ this.chartHover = new EventEmitter();
533
+ }
534
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KiwiChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
535
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: KiwiChartComponent, isStandalone: true, selector: "kiwi-chart", inputs: { chart: "chart", width: "width", height: "height", darkTheme: "darkTheme", darkThemeBackground: "darkThemeBackground" }, outputs: { addPoint: "addPoint", chartHover: "chartHover" }, ngImport: i0, template: `
536
+ <div
537
+ kiwi-chart
538
+ [chart]="chart"
539
+ [width]="width"
540
+ [height]="height"
541
+ [darkTheme]="darkTheme"
542
+ [darkThemeBackground]="darkThemeBackground"
543
+ (addPoint)="addPoint.emit($event)"
544
+ (chartHover)="chartHover.emit($event)"
545
+ ></div>
546
+ `, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: KiwiChartDirective, selector: "div[kiwi-chart]", inputs: ["chart", "width", "height", "darkTheme", "darkThemeBackground"], outputs: ["chartInit", "addPoint", "chartHover"] }] }); }
547
+ }
548
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KiwiChartComponent, decorators: [{
549
+ type: Component,
550
+ args: [{ selector: 'kiwi-chart', template: `
551
+ <div
552
+ kiwi-chart
553
+ [chart]="chart"
554
+ [width]="width"
555
+ [height]="height"
556
+ [darkTheme]="darkTheme"
557
+ [darkThemeBackground]="darkThemeBackground"
558
+ (addPoint)="addPoint.emit($event)"
559
+ (chartHover)="chartHover.emit($event)"
560
+ ></div>
561
+ `, imports: [KiwiChartDirective] }]
562
+ }], propDecorators: { chart: [{
563
+ type: Input,
564
+ args: [{ required: true }]
565
+ }], width: [{
566
+ type: Input
567
+ }], height: [{
568
+ type: Input
569
+ }], darkTheme: [{
570
+ type: Input
571
+ }], darkThemeBackground: [{
572
+ type: Input
573
+ }], addPoint: [{
574
+ type: Output
575
+ }], chartHover: [{
576
+ type: Output
577
+ }] } });
578
+
579
+ /*
580
+ * Public API Surface of chart
581
+ */
582
+
583
+ /**
584
+ * Generated bundle index. Do not edit.
585
+ */
586
+
587
+ export { AxisType, KiwiChartComponent, PointSymbol, ShapeVariant, TraceStyle, TraceType };
588
+ //# sourceMappingURL=kiwibit-chart.mjs.map