@revolist/angular-charts 4.0.0-rc → 4.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/README.md +14 -4
- package/dist/README.md +14 -4
- package/dist/fesm2022/revolist-angular-charts.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -50,20 +50,30 @@ wrapper trial package is published.
|
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
52
|
import { Component } from '@angular/core';
|
|
53
|
-
import {
|
|
53
|
+
import {
|
|
54
|
+
RevoChart,
|
|
55
|
+
type ChartComponentOptions,
|
|
56
|
+
type ChartRef,
|
|
57
|
+
} from '@revolist/angular-charts';
|
|
54
58
|
@Component({
|
|
55
59
|
selector: 'sales-chart',
|
|
56
60
|
standalone: true,
|
|
57
61
|
imports: [RevoChart],
|
|
58
|
-
template:
|
|
62
|
+
template:
|
|
63
|
+
'<revo-chart [options]="options" (ready)="onReady($event)" style="height:400px" />',
|
|
59
64
|
})
|
|
60
65
|
export class SalesChart {
|
|
61
66
|
options: ChartComponentOptions = {
|
|
62
67
|
chartType: 'line',
|
|
63
|
-
data: [
|
|
68
|
+
data: [
|
|
69
|
+
{ month: 'Jan', revenue: 120 },
|
|
70
|
+
{ month: 'Feb', revenue: 180 },
|
|
71
|
+
],
|
|
64
72
|
mapping: { category: { field: 'month' }, series: [{ field: 'revenue' }] },
|
|
65
73
|
};
|
|
66
|
-
onReady(chart: ChartRef) {
|
|
74
|
+
onReady(chart: ChartRef) {
|
|
75
|
+
console.log(chart.model);
|
|
76
|
+
}
|
|
67
77
|
}
|
|
68
78
|
```
|
|
69
79
|
|
package/dist/README.md
CHANGED
|
@@ -50,20 +50,30 @@ wrapper trial package is published.
|
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
52
|
import { Component } from '@angular/core';
|
|
53
|
-
import {
|
|
53
|
+
import {
|
|
54
|
+
RevoChart,
|
|
55
|
+
type ChartComponentOptions,
|
|
56
|
+
type ChartRef,
|
|
57
|
+
} from '@revolist/angular-charts';
|
|
54
58
|
@Component({
|
|
55
59
|
selector: 'sales-chart',
|
|
56
60
|
standalone: true,
|
|
57
61
|
imports: [RevoChart],
|
|
58
|
-
template:
|
|
62
|
+
template:
|
|
63
|
+
'<revo-chart [options]="options" (ready)="onReady($event)" style="height:400px" />',
|
|
59
64
|
})
|
|
60
65
|
export class SalesChart {
|
|
61
66
|
options: ChartComponentOptions = {
|
|
62
67
|
chartType: 'line',
|
|
63
|
-
data: [
|
|
68
|
+
data: [
|
|
69
|
+
{ month: 'Jan', revenue: 120 },
|
|
70
|
+
{ month: 'Feb', revenue: 180 },
|
|
71
|
+
],
|
|
64
72
|
mapping: { category: { field: 'month' }, series: [{ field: 'revenue' }] },
|
|
65
73
|
};
|
|
66
|
-
onReady(chart: ChartRef) {
|
|
74
|
+
onReady(chart: ChartRef) {
|
|
75
|
+
console.log(chart.model);
|
|
76
|
+
}
|
|
67
77
|
}
|
|
68
78
|
```
|
|
69
79
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revolist-angular-charts.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {
|
|
1
|
+
{"version":3,"file":"revolist-angular-charts.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n PLATFORM_ID,\n inject,\n} from '@angular/core';\nimport type { AfterViewInit, OnChanges, OnDestroy } from '@angular/core';\nimport { createChartComponentController } from '@revolist/charts/framework';\nimport type {\n ChartComponentController,\n ChartComponentOptions,\n} from '@revolist/charts/framework';\nimport type { ChartRef } from '@revolist/charts';\n\nexport type { ChartComponentOptions, ChartRef };\n@Component({\n selector: 'revo-chart',\n standalone: true,\n template: '',\n host: { style: 'display:block;width:100%;height:300px' },\n})\nexport class RevoChart implements AfterViewInit, OnChanges, OnDestroy {\n @Input({ required: true }) options!: ChartComponentOptions;\n @Output() readonly ready = new EventEmitter<ChartRef>();\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly platform = inject(PLATFORM_ID);\n private controller?: ChartComponentController;\n\n ngAfterViewInit() {\n if (!isPlatformBrowser(this.platform)) return;\n this.controller = createChartComponentController(\n this.host.nativeElement,\n (chart) => this.ready.emit(chart),\n );\n void this.controller.setOptions(this.options);\n }\n ngOnChanges() {\n void this.controller?.setOptions(this.options);\n }\n ngOnDestroy() {\n this.controller?.destroy();\n }\n}\n"],"mappings":";;;;AAyBA,IAAa,YAAb,MAAa,UAAS;CACO;CACR,QAAQ,IAAI,aAAY;CAC1B,OAAO,OAAgC,UAAU;CACjD,WAAW,OAAO,WAAW;CACtC;CAER,kBAAe;EACb,IAAI,CAAC,kBAAkB,KAAK,QAAQ,GAAG;EACvC,KAAK,aAAa,+BAChB,KAAK,KAAK,gBACT,UAAU,KAAK,MAAM,KAAK,KAAK,CAAC;EAEnC,AAAK,KAAK,WAAW,WAAW,KAAK,OAAO;CAC9C;CACA,cAAW;EACT,AAAK,KAAK,YAAY,WAAW,KAAK,OAAO;CAC/C;CACA,cAAW;EACT,KAAK,YAAY,QAAO;CAC1B;CApBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAS,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAT,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAS,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,SAAA,UAAA;EAAA,SAAA,EAAA,OAAA,QAAA;EAAA,MAAA,EAAA,gBAAA,wCAAA;EAAA,eAAA;EAAA,UAAA;EAAA,UAHV;EAAE,UAAA;CAAA,CAAA;;AAGD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EANrB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,YAAY;GACZ,UAAU;GACV,MAAM,EAAE,OAAO,wCAAuC;EACvD,CAAA;;;;GAEE,MAAA;GAAM,MAAA,CAAA,EAAE,UAAU,KAAI,CAAE;;E,UACxB,MAAA,O"}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revolist/angular-charts",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Angular components for RevoGrid Charts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Commercial",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@revolist/charts": "4.0.0
|
|
21
|
+
"@revolist/charts": "4.0.0",
|
|
22
22
|
"tslib": "^2.8.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|