@unovis/angular 1.0.0-beta.2 → 1.0.0-beta.4
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 +64 -0
- package/dist/lib/README.md +64 -0
- package/dist/lib/bundles/unovis-angular.umd.js +6 -4
- package/dist/lib/bundles/unovis-angular.umd.js.map +1 -1
- package/dist/lib/components/donut/donut.component.d.ts +9 -3
- package/dist/lib/esm2015/components/donut/donut.component.js +7 -5
- package/dist/lib/fesm2015/unovis-angular.js +6 -4
- package/dist/lib/fesm2015/unovis-angular.js.map +1 -1
- package/dist/lib/package.json +5 -4
- package/package.json +5 -3
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
🟨 **Unovis** is a modular data visualization framework for React, Angular, Svelte, and vanilla TypeScript or JavaScript.
|
|
2
|
+
|
|
3
|
+
`@unovis/angular` provides Angular modules to `@unovis/ts`, which makes Unovis integration into an Angular
|
|
4
|
+
app much easier.
|
|
5
|
+
|
|
6
|
+
Learn more about **Unovis** on our website [unovis.dev](https://unovis.dev)
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
```bash
|
|
10
|
+
npm install -P @unovis/ts @unovis/angular
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
#### HTML
|
|
15
|
+
```html
|
|
16
|
+
<vis-xy-container [height]="500">
|
|
17
|
+
<vis-line [data]="data" [x]="x" [y]="y"></vis-line>
|
|
18
|
+
<vis-axis type="x"></vis-axis>
|
|
19
|
+
<vis-axis type="y"></vis-axis>
|
|
20
|
+
</vis-xy-container>
|
|
21
|
+
```
|
|
22
|
+
#### Component
|
|
23
|
+
```ts
|
|
24
|
+
import { Component } from '@angular/core'
|
|
25
|
+
|
|
26
|
+
type DataRecord = { x: number; y: number }
|
|
27
|
+
|
|
28
|
+
@Component({
|
|
29
|
+
selector: 'basic-line-chart',
|
|
30
|
+
templateUrl: './basic-line-chart.component.html'
|
|
31
|
+
})
|
|
32
|
+
export class BasicLineChartComponent {
|
|
33
|
+
x = (d: DataRecord): number => d.x
|
|
34
|
+
y = (d: DataRecord): number => d.y
|
|
35
|
+
data: DataRecord[] = [
|
|
36
|
+
{ x: 0, y: 0 },
|
|
37
|
+
{ x: 1, y: 2 },
|
|
38
|
+
{ x: 2, y: 1 },
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
#### Module
|
|
43
|
+
```ts
|
|
44
|
+
import { NgModule } from '@angular/core'
|
|
45
|
+
import { VisXYContainerModule, VisLineModule, VisAxisModule } from '@unovis/angular'
|
|
46
|
+
|
|
47
|
+
import { BasicLineChartComponent } from './basic-line-chart.component'
|
|
48
|
+
|
|
49
|
+
@NgModule({
|
|
50
|
+
imports: [VisXYContainerModule, VisLineModule, VisAxisModule],
|
|
51
|
+
declarations: [BasicLineChartComponent],
|
|
52
|
+
exports: [BasicLineChartComponent],
|
|
53
|
+
})
|
|
54
|
+
export class BasicLineChartModule { }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
https://unovis.dev/docs
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
https://unovis.dev/gallery
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
Apache-2.0
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
🟨 **Unovis** is a modular data visualization framework for React, Angular, Svelte, and vanilla TypeScript or JavaScript.
|
|
2
|
+
|
|
3
|
+
`@unovis/angular` provides Angular modules to `@unovis/ts`, which makes Unovis integration into an Angular
|
|
4
|
+
app much easier.
|
|
5
|
+
|
|
6
|
+
Learn more about **Unovis** on our website [unovis.dev](https://unovis.dev)
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
```bash
|
|
10
|
+
npm install -P @unovis/ts @unovis/angular
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
#### HTML
|
|
15
|
+
```html
|
|
16
|
+
<vis-xy-container [height]="500">
|
|
17
|
+
<vis-line [data]="data" [x]="x" [y]="y"></vis-line>
|
|
18
|
+
<vis-axis type="x"></vis-axis>
|
|
19
|
+
<vis-axis type="y"></vis-axis>
|
|
20
|
+
</vis-xy-container>
|
|
21
|
+
```
|
|
22
|
+
#### Component
|
|
23
|
+
```ts
|
|
24
|
+
import { Component } from '@angular/core'
|
|
25
|
+
|
|
26
|
+
type DataRecord = { x: number; y: number }
|
|
27
|
+
|
|
28
|
+
@Component({
|
|
29
|
+
selector: 'basic-line-chart',
|
|
30
|
+
templateUrl: './basic-line-chart.component.html'
|
|
31
|
+
})
|
|
32
|
+
export class BasicLineChartComponent {
|
|
33
|
+
x = (d: DataRecord): number => d.x
|
|
34
|
+
y = (d: DataRecord): number => d.y
|
|
35
|
+
data: DataRecord[] = [
|
|
36
|
+
{ x: 0, y: 0 },
|
|
37
|
+
{ x: 1, y: 2 },
|
|
38
|
+
{ x: 2, y: 1 },
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
#### Module
|
|
43
|
+
```ts
|
|
44
|
+
import { NgModule } from '@angular/core'
|
|
45
|
+
import { VisXYContainerModule, VisLineModule, VisAxisModule } from '@unovis/angular'
|
|
46
|
+
|
|
47
|
+
import { BasicLineChartComponent } from './basic-line-chart.component'
|
|
48
|
+
|
|
49
|
+
@NgModule({
|
|
50
|
+
imports: [VisXYContainerModule, VisLineModule, VisAxisModule],
|
|
51
|
+
declarations: [BasicLineChartComponent],
|
|
52
|
+
exports: [BasicLineChartComponent],
|
|
53
|
+
})
|
|
54
|
+
export class BasicLineChartModule { }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
https://unovis.dev/docs
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
https://unovis.dev/gallery
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
Apache-2.0
|
|
@@ -1305,8 +1305,8 @@
|
|
|
1305
1305
|
(_c = this.componentContainer) === null || _c === void 0 ? void 0 : _c.render();
|
|
1306
1306
|
};
|
|
1307
1307
|
VisDonutComponent.prototype.getConfig = function () {
|
|
1308
|
-
var _d = this, duration = _d.duration, events = _d.events, attributes = _d.attributes, id = _d.id, value = _d.value, angleRange = _d.angleRange, padAngle = _d.padAngle, sortFunction = _d.sortFunction, cornerRadius = _d.cornerRadius, color = _d.color, radius = _d.radius, arcWidth = _d.arcWidth, centralLabel = _d.centralLabel, centralSubLabel = _d.centralSubLabel, centralSubLabelWrap = _d.centralSubLabelWrap,
|
|
1309
|
-
var config = { duration: duration, events: events, attributes: attributes, id: id, value: value, angleRange: angleRange, padAngle: padAngle, sortFunction: sortFunction, cornerRadius: cornerRadius, color: color, radius: radius, arcWidth: arcWidth, centralLabel: centralLabel, centralSubLabel: centralSubLabel, centralSubLabelWrap: centralSubLabelWrap,
|
|
1308
|
+
var _d = this, duration = _d.duration, events = _d.events, attributes = _d.attributes, id = _d.id, value = _d.value, angleRange = _d.angleRange, padAngle = _d.padAngle, sortFunction = _d.sortFunction, cornerRadius = _d.cornerRadius, color = _d.color, radius = _d.radius, arcWidth = _d.arcWidth, centralLabel = _d.centralLabel, centralSubLabel = _d.centralSubLabel, centralSubLabelWrap = _d.centralSubLabelWrap, showEmptySegments = _d.showEmptySegments, showBackground = _d.showBackground;
|
|
1309
|
+
var config = { duration: duration, events: events, attributes: attributes, id: id, value: value, angleRange: angleRange, padAngle: padAngle, sortFunction: sortFunction, cornerRadius: cornerRadius, color: color, radius: radius, arcWidth: arcWidth, centralLabel: centralLabel, centralSubLabel: centralSubLabel, centralSubLabelWrap: centralSubLabelWrap, showEmptySegments: showEmptySegments, showBackground: showBackground };
|
|
1310
1310
|
var keys = Object.keys(config);
|
|
1311
1311
|
keys.forEach(function (key) {
|
|
1312
1312
|
if (config[key] === undefined)
|
|
@@ -1317,7 +1317,7 @@
|
|
|
1317
1317
|
return VisDonutComponent;
|
|
1318
1318
|
}());
|
|
1319
1319
|
VisDonutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VisDonutComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1320
|
-
VisDonutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VisDonutComponent, selector: "vis-donut", inputs: { duration: "duration", events: "events", attributes: "attributes", id: "id", value: "value", angleRange: "angleRange", padAngle: "padAngle", sortFunction: "sortFunction", cornerRadius: "cornerRadius", color: "color", radius: "radius", arcWidth: "arcWidth", centralLabel: "centralLabel", centralSubLabel: "centralSubLabel", centralSubLabelWrap: "centralSubLabelWrap",
|
|
1320
|
+
VisDonutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VisDonutComponent, selector: "vis-donut", inputs: { duration: "duration", events: "events", attributes: "attributes", id: "id", value: "value", angleRange: "angleRange", padAngle: "padAngle", sortFunction: "sortFunction", cornerRadius: "cornerRadius", color: "color", radius: "radius", arcWidth: "arcWidth", centralLabel: "centralLabel", centralSubLabel: "centralSubLabel", centralSubLabelWrap: "centralSubLabelWrap", showEmptySegments: "showEmptySegments", showBackground: "showBackground", data: "data" }, providers: [{ provide: VisCoreComponent, useExisting: VisDonutComponent }], usesOnChanges: true, ngImport: i0__namespace, template: '', isInline: true });
|
|
1321
1321
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VisDonutComponent, decorators: [{
|
|
1322
1322
|
type: i0.Component,
|
|
1323
1323
|
args: [{
|
|
@@ -1356,7 +1356,9 @@
|
|
|
1356
1356
|
type: i0.Input
|
|
1357
1357
|
}], centralSubLabelWrap: [{
|
|
1358
1358
|
type: i0.Input
|
|
1359
|
-
}],
|
|
1359
|
+
}], showEmptySegments: [{
|
|
1360
|
+
type: i0.Input
|
|
1361
|
+
}], showBackground: [{
|
|
1360
1362
|
type: i0.Input
|
|
1361
1363
|
}], data: [{
|
|
1362
1364
|
type: i0.Input
|