Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ERROR in Failed to find exported name of node (PieGridSeriesComponent = /** @class */ (function () {
- function PieGridSeriesComponent(element) {
- this.innerRadius = 70;
- this.outerRadius = 80;
- this.animations = true;
- this.select = new EventEmitter();
- this.element = element.nativeElement;
- }
- PieGridSeriesComponent.prototype.ngOnChanges = function (changes) {
- this.update();
- };
- PieGridSeriesComponent.prototype.update = function () {
- this.layout = pie()
- .value(function (d) { return d.data.value; }).sort(null);
- this.arcs = this.getArcs();
- };
- PieGridSeriesComponent.prototype.getArcs = function () {
- var _this = this;
- return this.layout(this.data).map(function (arc$$1, index) {
- var label = arc$$1.data.data.name;
- var other = arc$$1.data.data.other;
- if (index === 0) {
- arc$$1.startAngle = 0;
- }
- var color = _this.colors(label);
- return {
- data: arc$$1.data.data,
- class: 'arc ' + 'arc' + index,
- fill: color,
- startAngle: other ? 0 : arc$$1.startAngle,
- endAngle: arc$$1.endAngle,
- animate: _this.animations && !other,
- pointerEvents: !other
- };
- });
- };
- PieGridSeriesComponent.prototype.onClick = function (data) {
- this.select.emit({
- name: this.data[0].data.name,
- value: this.data[0].data.value
- });
- };
- PieGridSeriesComponent.prototype.trackBy = function (index, item) {
- return item.data.name;
- };
- PieGridSeriesComponent.prototype.label = function (arc$$1) {
- return arc$$1.data.name;
- };
- PieGridSeriesComponent.prototype.color = function (arc$$1) {
- return this.colors(this.label(arc$$1));
- };
- var _a;
- __decorate([
- Input(),
- __metadata("design:type", Object)
- ], PieGridSeriesComponent.prototype, "colors", void 0);
- __decorate([
- Input(),
- __metadata("design:type", Object)
- ], PieGridSeriesComponent.prototype, "data", void 0);
- __decorate([
- Input(),
- __metadata("design:type", Object)
- ], PieGridSeriesComponent.prototype, "innerRadius", void 0);
- __decorate([
- Input(),
- __metadata("design:type", Object)
- ], PieGridSeriesComponent.prototype, "outerRadius", void 0);
- __decorate([
- Input(),
- __metadata("design:type", Boolean)
- ], PieGridSeriesComponent.prototype, "animations", void 0);
- __decorate([
- Output(),
- __metadata("design:type", Object)
- ], PieGridSeriesComponent.prototype, "select", void 0);
- PieGridSeriesComponent = __decorate([
- Component({
- selector: 'g[ngx-charts-pie-grid-series]',
- template: "\n <svg:g class=\"pie-grid-arcs\">\n <svg:g ngx-charts-pie-arc *ngFor=\"let arc of arcs; trackBy:trackBy\"\n [attr.class]=\"arc.class\"\n [startAngle]=\"arc.startAngle\"\n [endAngle]=\"arc.endAngle\"\n [innerRadius]=\"innerRadius\"\n [outerRadius]=\"outerRadius\"\n [fill]=\"color(arc)\"\n [value]=\"arc.data.value\"\n [data]=\"arc.data\"\n [gradient]=\"false\"\n [pointerEvents]=\"arc.pointerEvents\"\n [animate]=\"arc.animate\"\n (select)=\"onClick($event)\">\n </svg:g>\n </svg:g>\n ",
- changeDetection: ChangeDetectionStrategy.OnPush,
- }),
- __metadata("design:paramtypes", [typeof (_a = typeof ElementRef !== "undefined" && ElementRef) === "function" ? _a : Object])
- ], PieGridSeriesComponent);
- return PieGridSeriesComponent;
- }())) in '/home/xxx/projects/apprc4/node_modules/@swimlane/ngx-charts/release/esm.js'.
Advertisement
Add Comment
Please, Sign In to add comment