@revivejs/angular-infinity-charts 2.0.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alexandro Marques
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,272 @@
1
+ # @revivejs/angular-infinity-charts
2
+
3
+ > A maintained Angular wrapper for **@revivejs/infinity-charts** with a declarative component, a host directive for existing chart slots, and a service for programmatic chart creation.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@revivejs/angular-infinity-charts.svg?style=flat-square)](https://www.npmjs.com/package/@revivejs/angular-infinity-charts)
6
+ [![npm downloads](https://img.shields.io/npm/dt/@revivejs/angular-infinity-charts.svg?style=flat-square)](https://www.npmjs.com/package/@revivejs/angular-infinity-charts)
7
+ [![license](https://img.shields.io/npm/l/@revivejs/angular-infinity-charts.svg?style=flat-square)](https://github.com/alexandroit/angular-infinity-charts/blob/main/LICENSE)
8
+ [![Angular 21](https://img.shields.io/badge/Angular-21-red?style=flat-square&logo=angular)](https://angular.dev)
9
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org)
10
+
11
+ **[Documentation & Live Demos](https://alexandroit.github.io/angular-infinity-charts/)** | **[npm](https://www.npmjs.com/package/@revivejs/angular-infinity-charts)** | **[Issues](https://github.com/alexandroit/angular-infinity-charts/issues)** | **[Repository](https://github.com/alexandroit/angular-infinity-charts)**
12
+
13
+ **Latest version:** `21.0.0`
14
+
15
+ ## Why this library?
16
+
17
+ `@revivejs/angular-infinity-charts` brings the full Infinity Charts engine into Angular apps without hiding the core API behind a framework-specific abstraction wall.
18
+
19
+ It gives Angular teams three practical integration paths:
20
+
21
+ - `<revive-infinity-chart>` when the chart block should be rendered declaratively
22
+ - `[reviveInfinityChart]` when an existing slot, card, or dashboard panel should become a chart host
23
+ - `InfinityChartService` when charts need to be mounted programmatically in modal bodies, detached panels, or service-driven flows
24
+
25
+ The wrapper stays intentionally thin so the real power remains in the core package:
26
+
27
+ - line, area, bar, combo, scatter, donut, pie, gauge, radial-progress, thermometer, battery, and sparkline charts
28
+ - theming, tooltip behavior, responsive resizing, and live-update methods
29
+ - chart instance methods like `appendData`, `replaceData`, `updateSeries`, `resize`, and `setTheme`
30
+ - a versioned docs history from `angular-2` through `angular-21`
31
+
32
+ ## Features
33
+
34
+ | Feature | Supported |
35
+ | :--- | :---: |
36
+ | Angular wrapper component | ✅ |
37
+ | Angular host directive | ✅ |
38
+ | Angular service for imperative charts | ✅ |
39
+ | Access to the same Infinity Charts engine as the core package | ✅ |
40
+ | Line, area, bar, combo, scatter, donut, pie, gauge, and widget charts | ✅ |
41
+ | Theme switching and responsive resize support | ✅ |
42
+ | Realtime append/update workflows | ✅ |
43
+ | Rich versioned docs history | ✅ |
44
+ | Angular 2 historical docs line | ✅ |
45
+ | Angular 4 through Angular 21 docs lines | ✅ |
46
+
47
+ ## Table of Contents
48
+
49
+ 1. [Angular Version Compatibility](#angular-version-compatibility)
50
+ 2. [Installation](#installation)
51
+ 3. [Setup](#setup)
52
+ 4. [Usage Patterns](#usage-patterns)
53
+ 5. [API Overview](#api-overview)
54
+ 6. [Run Locally](#run-locally)
55
+ 7. [License](#license)
56
+
57
+ ## Angular Version Compatibility
58
+
59
+ | Package version | Angular version | TypeScript version | Demo link |
60
+ | :---: | :---: | :---: | :--- |
61
+ | **21.0.0** | **21.2.x** | **5.9.x** | [Angular 21 demo](https://alexandroit.github.io/angular-infinity-charts/angular-21/) |
62
+ | **20.0.0** | **20.3.x** | **5.9.x** | [Angular 20 demo](https://alexandroit.github.io/angular-infinity-charts/angular-20/) |
63
+ | **19.0.0** | **19.2.x** | **5.8.x** | [Angular 19 demo](https://alexandroit.github.io/angular-infinity-charts/angular-19/) |
64
+ | **18.0.0** | **18.2.x** | **5.5.x** | [Angular 18 demo](https://alexandroit.github.io/angular-infinity-charts/angular-18/) |
65
+ | **17.0.0** | **17.3.x** | **5.4.x** | [Angular 17 demo](https://alexandroit.github.io/angular-infinity-charts/angular-17/) |
66
+ | **16.0.0** | **16.2.x** | **5.1.x** | [Angular 16 demo](https://alexandroit.github.io/angular-infinity-charts/angular-16/) |
67
+ | **15.0.0** | **15.2.x** | **4.9.x** | [Angular 15 demo](https://alexandroit.github.io/angular-infinity-charts/angular-15/) |
68
+ | **14.0.0** | **14.3.x** | **4.8.x** | [Angular 14 demo](https://alexandroit.github.io/angular-infinity-charts/angular-14/) |
69
+ | **13.0.0** | **13.4.x** | **4.6.x** | [Angular 13 demo](https://alexandroit.github.io/angular-infinity-charts/angular-13/) |
70
+ | **12.0.0** | **12.2.x** | **4.3.x** | [Angular 12 demo](https://alexandroit.github.io/angular-infinity-charts/angular-12/) |
71
+ | **11.0.0** | **11.2.x** | **4.1.x** | [Angular 11 demo](https://alexandroit.github.io/angular-infinity-charts/angular-11/) |
72
+ | **10.0.0** | **10.2.x** | **3.9.x** | [Angular 10 demo](https://alexandroit.github.io/angular-infinity-charts/angular-10/) |
73
+ | **9.0.0** | **9.1.x** | **3.8.x** | [Angular 9 demo](https://alexandroit.github.io/angular-infinity-charts/angular-9/) |
74
+ | **8.0.0** | **8.2.x** | **3.5.x** | [Angular 8 demo](https://alexandroit.github.io/angular-infinity-charts/angular-8/) |
75
+ | **7.0.0** | **7.2.x** | **3.2.x** | [Angular 7 demo](https://alexandroit.github.io/angular-infinity-charts/angular-7/) |
76
+ | **6.0.0** | **6.1.x** | **2.7.x** | [Angular 6 demo](https://alexandroit.github.io/angular-infinity-charts/angular-6/) |
77
+ | **5.0.0** | **5.2.x** | **2.6.x** | [Angular 5 demo](https://alexandroit.github.io/angular-infinity-charts/angular-5/) |
78
+ | **4.0.0** | **4.4.x** | **2.4.x** | [Angular 4 demo](https://alexandroit.github.io/angular-infinity-charts/angular-4/) |
79
+ | **2.0.0** | **2.4.x** | **2.4.x** | [Angular 2 demo](https://alexandroit.github.io/angular-infinity-charts/angular-2/) |
80
+
81
+ ## Installation
82
+
83
+ ```bash
84
+ npm install @revivejs/angular-infinity-charts
85
+ ```
86
+
87
+ ## Setup
88
+
89
+ ### 1. Import the module
90
+
91
+ ```ts
92
+ import { BrowserModule } from '@angular/platform-browser';
93
+ import { NgModule } from '@angular/core';
94
+ import { InfinityChartsModule } from '@revivejs/angular-infinity-charts';
95
+
96
+ import { AppComponent } from './app.component';
97
+
98
+ @NgModule({
99
+ declarations: [AppComponent],
100
+ imports: [
101
+ BrowserModule,
102
+ InfinityChartsModule.forRoot()
103
+ ],
104
+ bootstrap: [AppComponent]
105
+ })
106
+ export class AppModule {}
107
+ ```
108
+
109
+ ### 2. Use the component directly
110
+
111
+ ```html
112
+ <revive-infinity-chart
113
+ [config]="{
114
+ type: 'line',
115
+ title: 'Monthly revenue',
116
+ labels: ['Jan', 'Feb', 'Mar', 'Apr'],
117
+ data: [12, 18, 15, 24],
118
+ theme: 'dark'
119
+ }"
120
+ style="display:block;height:320px;">
121
+ </revive-infinity-chart>
122
+ ```
123
+
124
+ ### 3. Or turn an existing slot into a chart host
125
+
126
+ ```html
127
+ <section class="sales-card">
128
+ <header>Quarterly pipeline</header>
129
+ <div
130
+ class="chart-slot"
131
+ [reviveInfinityChart]="{
132
+ type: 'bar',
133
+ labels: ['North', 'South', 'West'],
134
+ series: [{ name: 'Revenue', data: [28, 34, 31] }],
135
+ theme: 'light'
136
+ }"
137
+ style="height:320px;">
138
+ </div>
139
+ </section>
140
+ ```
141
+
142
+ ## Usage Patterns
143
+
144
+ ### Component
145
+
146
+ Use `<revive-infinity-chart>` when the chart itself is the main content block in the template.
147
+
148
+ ### Directive
149
+
150
+ Use `[reviveInfinityChart]` for:
151
+
152
+ - dashboard cards
153
+ - analytics panels
154
+ - widget slots
155
+ - modal chart areas
156
+ - report sections
157
+
158
+ ### Service
159
+
160
+ Use `InfinityChartService` when charts need to be mounted from code:
161
+
162
+ ```ts
163
+ import { Component } from '@angular/core';
164
+ import { InfinityChartService } from '@revivejs/angular-infinity-charts';
165
+
166
+ @Component({
167
+ selector: 'app-root',
168
+ template: `<button (click)="mountChart()">Mount chart</button>`
169
+ })
170
+ export class AppComponent {
171
+ constructor(private chartService: InfinityChartService) {}
172
+
173
+ mountChart(): void {
174
+ const slot = document.getElementById('chart-slot');
175
+
176
+ if (!slot) {
177
+ return;
178
+ }
179
+
180
+ const chart = this.chartService.create(slot, {
181
+ type: 'donut',
182
+ title: 'Revenue mix',
183
+ data: [
184
+ { label: 'New', value: 42 },
185
+ { label: 'Expansion', value: 28 },
186
+ { label: 'Renewal', value: 19 }
187
+ ],
188
+ theme: 'light'
189
+ });
190
+
191
+ chart.ready().then(() => console.log('Chart ready'));
192
+ }
193
+ }
194
+ ```
195
+
196
+ ## API Overview
197
+
198
+ ### `InfinityChartsModule.forRoot()`
199
+
200
+ Registers the wrapper service for the Angular app.
201
+
202
+ ### `InfinityChartComponent`
203
+
204
+ Inputs:
205
+
206
+ - `config`
207
+
208
+ Methods:
209
+
210
+ - `update(config)`
211
+ - `resize(width?, height?)`
212
+ - `updateSeries(series)`
213
+ - `appendData(point)`
214
+ - `appendBatch(points)`
215
+ - `replaceData(data)`
216
+ - `setTheme(theme)`
217
+ - `getChart()`
218
+
219
+ ### `InfinityChartDirective`
220
+
221
+ Inputs:
222
+
223
+ - `reviveInfinityChart`
224
+
225
+ Outputs:
226
+
227
+ - `create`
228
+ - `ready`
229
+ - `updated`
230
+ - `resized`
231
+ - `destroyed`
232
+
233
+ ### `InfinityChartService`
234
+
235
+ Methods:
236
+
237
+ - `create(target, config)`
238
+ - `load(type)`
239
+ - `preload(types)`
240
+ - `loadAll()`
241
+ - `registerPlugin(plugin)`
242
+ - `registerPack(pack)`
243
+ - `destroy(chart)`
244
+
245
+ ## Run Locally
246
+
247
+ ```bash
248
+ npm install
249
+ npm run docs:generate
250
+ npm run build
251
+ npm run build:docs:angular-2
252
+ npm run docs:install:angular-21
253
+ npm run build:docs:angular-21
254
+ node scripts/write-docs-root.js
255
+ npm run serve:docs
256
+ ```
257
+
258
+ Then open:
259
+
260
+ ```text
261
+ http://127.0.0.1:8081/angular-21/
262
+ ```
263
+
264
+ Angular 2 remains available at:
265
+
266
+ ```text
267
+ http://127.0.0.1:8081/angular-2/
268
+ ```
269
+
270
+ ## License
271
+
272
+ MIT
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './src/public_api';
package/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./src/public_api"), exports);
18
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@revivejs/angular-infinity-charts",
3
+ "version": "2.0.0",
4
+ "description": "Maintained Angular wrapper components, directives, and service helpers for @revivejs/infinity-charts.",
5
+ "main": "./index.js",
6
+ "module": "./index.js",
7
+ "types": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/alexandroit/angular-infinity-charts.git"
15
+ },
16
+ "homepage": "https://alexandroit.github.io/angular-infinity-charts/",
17
+ "bugs": {
18
+ "url": "https://github.com/alexandroit/angular-infinity-charts/issues"
19
+ },
20
+ "peerDependencies": {
21
+ "@angular/common": ">=2.0.0 <4.0.0",
22
+ "@angular/core": ">=2.0.0 <4.0.0",
23
+ "@angular/platform-browser": ">=2.0.0 <4.0.0"
24
+ },
25
+ "keywords": [
26
+ "angular",
27
+ "angular2",
28
+ "angular-chart",
29
+ "angular-charting",
30
+ "angular-data-visualization",
31
+ "angular-dashboard",
32
+ "charts",
33
+ "charting",
34
+ "svg",
35
+ "data-viz",
36
+ "revivejs"
37
+ ],
38
+ "author": "Alexandro Marques",
39
+ "license": "MIT"
40
+ }
@@ -0,0 +1,30 @@
1
+ import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import { AngularInfinityChartConfig, AngularInfinityChartDataInput, AngularInfinityChartEvent, AngularInfinityChartPlugin, AngularInfinityChartPublicApi, AngularInfinityThemeInput, AngularInfinitySeriesCollectionInput } from './types';
3
+ export declare class InfinityChartComponent implements AfterViewInit, OnChanges, OnDestroy {
4
+ private static nextHostId;
5
+ config: AngularInfinityChartConfig;
6
+ create: EventEmitter<AngularInfinityChartEvent>;
7
+ ready: EventEmitter<AngularInfinityChartEvent>;
8
+ updated: EventEmitter<AngularInfinityChartEvent>;
9
+ resized: EventEmitter<AngularInfinityChartEvent>;
10
+ destroyed: EventEmitter<AngularInfinityChartEvent>;
11
+ hostId: string;
12
+ private controller;
13
+ private initialized;
14
+ private hooks;
15
+ constructor();
16
+ ngAfterViewInit(): void;
17
+ ngOnChanges(changes: SimpleChanges): void;
18
+ ngOnDestroy(): void;
19
+ update(config: AngularInfinityChartConfig): Promise<void>;
20
+ resize(width?: number, height?: number): void;
21
+ updateSeries(series: AngularInfinitySeriesCollectionInput): void;
22
+ appendData(point: any): void;
23
+ appendBatch(points: any[]): void;
24
+ replaceData(data: AngularInfinityChartDataInput): void;
25
+ setTheme(theme: AngularInfinityThemeInput): void;
26
+ registerPlugin(plugin: AngularInfinityChartPlugin): void;
27
+ getChart(): AngularInfinityChartPublicApi | null;
28
+ private ensureController;
29
+ private resolveHostElement;
30
+ }
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.InfinityChartComponent = void 0;
13
+ var core_1 = require("@angular/core");
14
+ var InfinityChartController_1 = require("./InfinityChartController");
15
+ var InfinityChartComponent = /** @class */ (function () {
16
+ function InfinityChartComponent() {
17
+ var _this = this;
18
+ this.config = {};
19
+ this.create = new core_1.EventEmitter();
20
+ this.ready = new core_1.EventEmitter();
21
+ this.updated = new core_1.EventEmitter();
22
+ this.resized = new core_1.EventEmitter();
23
+ this.destroyed = new core_1.EventEmitter();
24
+ this.hostId = 'rvl-chart-component-' + (++InfinityChartComponent_1.nextHostId);
25
+ this.initialized = false;
26
+ this.controller = null;
27
+ this.hooks = {
28
+ onCreate: function (event) { return _this.create.emit(event); },
29
+ onReady: function (event) { return _this.ready.emit(event); },
30
+ onUpdated: function (event) { return _this.updated.emit(event); },
31
+ onResized: function (event) { return _this.resized.emit(event); },
32
+ onDestroyed: function (event) { return _this.destroyed.emit(event); }
33
+ };
34
+ }
35
+ InfinityChartComponent_1 = InfinityChartComponent;
36
+ InfinityChartComponent.prototype.ngAfterViewInit = function () {
37
+ var _this = this;
38
+ setTimeout(function () {
39
+ var controller = _this.ensureController(false);
40
+ if (!controller) {
41
+ return;
42
+ }
43
+ _this.initialized = true;
44
+ controller.initialize(_this.config);
45
+ }, 0);
46
+ };
47
+ InfinityChartComponent.prototype.ngOnChanges = function (changes) {
48
+ if (!this.initialized || !this.controller) {
49
+ return;
50
+ }
51
+ if (changes.config) {
52
+ this.controller.update(this.config);
53
+ }
54
+ };
55
+ InfinityChartComponent.prototype.ngOnDestroy = function () {
56
+ if (this.controller) {
57
+ this.controller.destroy();
58
+ }
59
+ };
60
+ InfinityChartComponent.prototype.update = function (config) {
61
+ this.config = config;
62
+ return this.ensureController(true).update(this.config);
63
+ };
64
+ InfinityChartComponent.prototype.resize = function (width, height) {
65
+ if (!this.controller) {
66
+ return;
67
+ }
68
+ this.controller.resize(width, height);
69
+ };
70
+ InfinityChartComponent.prototype.updateSeries = function (series) {
71
+ if (!this.controller) {
72
+ return;
73
+ }
74
+ this.controller.updateSeries(series);
75
+ };
76
+ InfinityChartComponent.prototype.appendData = function (point) {
77
+ if (!this.controller) {
78
+ return;
79
+ }
80
+ this.controller.appendData(point);
81
+ };
82
+ InfinityChartComponent.prototype.appendBatch = function (points) {
83
+ if (!this.controller) {
84
+ return;
85
+ }
86
+ this.controller.appendBatch(points);
87
+ };
88
+ InfinityChartComponent.prototype.replaceData = function (data) {
89
+ if (!this.controller) {
90
+ return;
91
+ }
92
+ this.controller.replaceData(data);
93
+ };
94
+ InfinityChartComponent.prototype.setTheme = function (theme) {
95
+ if (!this.controller) {
96
+ return;
97
+ }
98
+ this.controller.setTheme(theme);
99
+ };
100
+ InfinityChartComponent.prototype.registerPlugin = function (plugin) {
101
+ if (!this.controller) {
102
+ return;
103
+ }
104
+ this.controller.registerPlugin(plugin);
105
+ };
106
+ InfinityChartComponent.prototype.getChart = function () {
107
+ return this.controller ? this.controller.getChart() : null;
108
+ };
109
+ InfinityChartComponent.prototype.ensureController = function (required) {
110
+ if (this.controller) {
111
+ return this.controller;
112
+ }
113
+ var host = this.resolveHostElement();
114
+ if (!host) {
115
+ if (required) {
116
+ throw new Error('Unable to resolve revive-infinity-chart host element.');
117
+ }
118
+ return null;
119
+ }
120
+ this.controller = new InfinityChartController_1.InfinityChartController(host, this.hooks);
121
+ return this.controller;
122
+ };
123
+ InfinityChartComponent.prototype.resolveHostElement = function () {
124
+ if (typeof document !== 'undefined') {
125
+ return document.querySelector('[data-rvl-chart-component-host="' + this.hostId + '"]');
126
+ }
127
+ return null;
128
+ };
129
+ var InfinityChartComponent_1;
130
+ InfinityChartComponent.nextHostId = 0;
131
+ __decorate([
132
+ (0, core_1.Input)(),
133
+ __metadata("design:type", Object)
134
+ ], InfinityChartComponent.prototype, "config", void 0);
135
+ __decorate([
136
+ (0, core_1.Output)(),
137
+ __metadata("design:type", Object)
138
+ ], InfinityChartComponent.prototype, "create", void 0);
139
+ __decorate([
140
+ (0, core_1.Output)(),
141
+ __metadata("design:type", Object)
142
+ ], InfinityChartComponent.prototype, "ready", void 0);
143
+ __decorate([
144
+ (0, core_1.Output)(),
145
+ __metadata("design:type", Object)
146
+ ], InfinityChartComponent.prototype, "updated", void 0);
147
+ __decorate([
148
+ (0, core_1.Output)(),
149
+ __metadata("design:type", Object)
150
+ ], InfinityChartComponent.prototype, "resized", void 0);
151
+ __decorate([
152
+ (0, core_1.Output)(),
153
+ __metadata("design:type", Object)
154
+ ], InfinityChartComponent.prototype, "destroyed", void 0);
155
+ __decorate([
156
+ (0, core_1.HostBinding)('attr.data-rvl-chart-component-host'),
157
+ __metadata("design:type", String)
158
+ ], InfinityChartComponent.prototype, "hostId", void 0);
159
+ InfinityChartComponent = InfinityChartComponent_1 = __decorate([
160
+ (0, core_1.Component)({
161
+ selector: 'revive-infinity-chart',
162
+ standalone: false,
163
+ template: ''
164
+ }),
165
+ __metadata("design:paramtypes", [])
166
+ ], InfinityChartComponent);
167
+ return InfinityChartComponent;
168
+ }());
169
+ exports.InfinityChartComponent = InfinityChartComponent;
170
+ //# sourceMappingURL=InfinityChartComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfinityChartComponent.js","sourceRoot":"","sources":["../../src/InfinityChartComponent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAUuB;AAEvB,qEAAoE;AAgBpE;IAkBE;QAAA,iBAUC;QAzBQ,WAAM,GAA+B,EAAE,CAAC;QAEvC,WAAM,GAAG,IAAI,mBAAY,EAA6B,CAAC;QACvD,UAAK,GAAG,IAAI,mBAAY,EAA6B,CAAC;QACtD,YAAO,GAAG,IAAI,mBAAY,EAA6B,CAAC;QACxD,YAAO,GAAG,IAAI,mBAAY,EAA6B,CAAC;QACxD,cAAS,GAAG,IAAI,mBAAY,EAA6B,CAAC;QAGpE,WAAM,GAAW,sBAAsB,G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AAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;;IApJc,iCAAU,GAAW,CAAC,AAAZ,CAAa;IAE7B;QAAR,IAAA,YAAK,GAAE;;0DAAyC;IAEvC;QAAT,IAAA,aAAM,GAAE;;0DAAwD;IACvD;QAAT,IAAA,aAAM,GAAE;;yDAAuD;IACtD;QAAT,IAAA,aAAM,GAAE;;2DAAyD;IACxD;QAAT,IAAA,aAAM,GAAE;;2DAAyD;IACxD;QAAT,IAAA,aAAM,GAAE;;6DAA2D;IAGpE;QADC,IAAA,kBAAW,EAAC,oCAAoC,CAAC;;0DAC8B;IAZrE,sBAAsB;QALlC,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,uBAAuB;YACjC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,EAAE;SACb,CAAC;;OACW,sBAAsB,CAsJlC;IAAD,6BAAC;CAAA,AA3JD,IA2JC;AAtJY,wDAAsB"}
@@ -0,0 +1,25 @@
1
+ import { AngularInfinityChartConfig, AngularInfinityChartPublicApi, AngularInfinityChartPlugin, AngularInfinityThemeInput, AngularInfinityChartDataInput, AngularInfinitySeriesCollectionInput, InfinityChartLifecycleHooks } from './types';
2
+ export declare class InfinityChartController {
3
+ private host;
4
+ private hooks;
5
+ private chart;
6
+ private lastConfig;
7
+ constructor(host: HTMLElement, hooks: InfinityChartLifecycleHooks);
8
+ initialize(config?: AngularInfinityChartConfig): Promise<void>;
9
+ update(config?: AngularInfinityChartConfig): Promise<void>;
10
+ resize(width?: number, height?: number): void;
11
+ updateSeries(series: AngularInfinitySeriesCollectionInput): void;
12
+ appendData(point: any): void;
13
+ appendBatch(points: any[]): void;
14
+ replaceData(data: AngularInfinityChartDataInput): void;
15
+ setTheme(theme: AngularInfinityThemeInput): void;
16
+ registerPlugin(plugin: AngularInfinityChartPlugin): void;
17
+ getChart(): AngularInfinityChartPublicApi | null;
18
+ destroy(): void;
19
+ private toCreateConfig;
20
+ private toUpdateConfig;
21
+ private toEvent;
22
+ private cloneConfig;
23
+ private cloneArray;
24
+ private cloneValue;
25
+ }