neu-charts
Version:
neu-charts is a ngx-charts wrapper and charting framework for Angular 2 and beyond!.
883 lines (882 loc) • 83.2 kB
JavaScript
import { __extends, __spread, __values } from 'tslib';
import { Component, Input, Output, EventEmitter, ViewEncapsulation, ViewChild, HostListener, ContentChild, ChangeDetectionStrategy, NgModule } from '@angular/core';
import { BaseChartComponent, LineSeriesComponent, calculateViewDimensions, ColorHelper, formatLabel, NgxChartsModule } from '@swimlane/ngx-charts';
import { curveLinear, curveBundle } from 'd3-shape';
import { scaleBand, scaleLinear, scalePoint, scaleTime } from 'd3-scale';
import { trigger, style, animate, transition } from '@angular/animations';
import { CommonModule } from '@angular/common';
import { NgxGraphModule } from '@swimlane/ngx-graph';
var NeuChartsComponent = /** @class */ (function () {
function NeuChartsComponent() {
}
NeuChartsComponent.prototype.ngOnInit = function () { };
return NeuChartsComponent;
}());
NeuChartsComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts',
template: "<h3>Neu-charts works!</h3>\n",
styles: [""]
},] },
];
NeuChartsComponent.ctorParameters = function () { return []; };
var Options = /** @class */ (function () {
function Options(showLegend) {
if (showLegend === void 0) { showLegend = true; }
this.showLegend = showLegend;
}
return Options;
}());
var PieOptions = /** @class */ (function (_super) {
__extends(PieOptions, _super);
function PieOptions(showLegend, showLabels, explodeSlices) {
if (showLegend === void 0) { showLegend = true; }
if (showLabels === void 0) { showLabels = true; }
if (explodeSlices === void 0) { explodeSlices = false; }
var _this = _super.call(this, showLegend) || this;
_this.showLabels = showLabels;
_this.explodeSlices = explodeSlices;
_this.doughnut = false;
return _this;
}
return PieOptions;
}(Options));
var customColorSets = [
{
name: 'palatte',
domain: ['#9896F8', '#55efc4', '#76B3F9', '#81DD98', '#b867d3', '#f26f96', '#ffeaa7', '#FDBD2D', '#FC8A25', '#4d488c', '#FA4F1E', '#BDC3C7']
}
];
var PieChartComponent = /** @class */ (function () {
function PieChartComponent() {
this.data = [];
this.onSelect = new EventEmitter();
this.options = new PieOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
PieChartComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
PieChartComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return PieChartComponent;
}());
PieChartComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-pie',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-pie-chart\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [legend]=\"options.showLegend\"\n [explodeSlices]=\"options.explodeSlices\"\n [labels]=\"options.showLabels\"\n [doughnut]=\"options.doughnut\"\n [gradient]=\"gradient\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-pie-chart>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
PieChartComponent.ctorParameters = function () { return []; };
PieChartComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var DonutOptions = /** @class */ (function (_super) {
__extends(DonutOptions, _super);
function DonutOptions(showLegend, showLabels, arcWidth) {
if (showLegend === void 0) { showLegend = true; }
if (showLabels === void 0) { showLabels = true; }
if (arcWidth === void 0) { arcWidth = 0.3; }
var _this = _super.call(this, showLegend, showLabels, false) || this;
_this.doughnut = true;
_this.arcWidth = arcWidth;
return _this;
}
return DonutOptions;
}(PieOptions));
var DonutChartComponent = /** @class */ (function () {
function DonutChartComponent() {
this.data = [];
this.onSelect = new EventEmitter();
this.options = new DonutOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
DonutChartComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.cutomOptions);
};
DonutChartComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return DonutChartComponent;
}());
DonutChartComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-donut',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-pie-chart\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [legend]=\"options.showLegend\"\n [explodeSlices]=\"options.explodeSlices\"\n [labels]=\"options.showLabels\"\n [doughnut]=\"options.doughnut\"\n [arcWidth]=\"options.arcWidth\"\n [gradient]=\"gradient\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-pie-chart>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
DonutChartComponent.ctorParameters = function () { return []; };
DonutChartComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"cutomOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var NoDataComponent = /** @class */ (function () {
function NoDataComponent() {
}
NoDataComponent.prototype.ngOnInit = function () { };
return NoDataComponent;
}());
NoDataComponent.decorators = [
{ type: Component, args: [{
selector: 'no-data',
template: "<div class=\"no-data-container\">No data found (or) Wrong data format</div>",
styles: ["\n .no-data-container {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n color: lightslategray;\n font-size: 1.2rem;\n }"]
},] },
];
NoDataComponent.ctorParameters = function () { return []; };
var DonutAdvancedComponent = /** @class */ (function () {
function DonutAdvancedComponent() {
this.data = [];
this.onSelect = new EventEmitter();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
DonutAdvancedComponent.prototype.ngOnInit = function () { };
DonutAdvancedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return DonutAdvancedComponent;
}());
DonutAdvancedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-donut-advanced',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-advanced-pie-chart\n [view]=\"view\"\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-advanced-pie-chart>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}.chart-container /deep/ .total-value{font-size:1.4rem}.chart-container /deep/ .total-label{font-size:1.2rem}.chart-container /deep/ .legend-items{padding-top:10px}.chart-container /deep/ .legend-items .legend-item{line-height:1.4}.chart-container /deep/ .legend-items .legend-item:hover{opacity:.75}.chart-container /deep/ .legend-items .legend-item .item-value{font-size:1.2rem!important}.chart-container /deep/ .legend-items .legend-item .item-percent{font-size:1.1rem!important}"]
},] },
];
DonutAdvancedComponent.ctorParameters = function () { return []; };
DonutAdvancedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"onSelect": [{ type: Output },],
};
var DonutGridComponent = /** @class */ (function () {
function DonutGridComponent() {
this.data = [];
this.onSelect = new EventEmitter();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
DonutGridComponent.prototype.ngOnInit = function () { };
DonutGridComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return DonutGridComponent;
}());
DonutGridComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-donut-grid',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-pie-grid\n [view]=\"view\"\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-pie-grid>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
DonutGridComponent.ctorParameters = function () { return []; };
DonutGridComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"onSelect": [{ type: Output },],
};
var BarOptions = /** @class */ (function (_super) {
__extends(BarOptions, _super);
function BarOptions(showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel) {
if (showLegend === void 0) { showLegend = true; }
if (showXAxis === void 0) { showXAxis = true; }
if (showYAxis === void 0) { showYAxis = true; }
if (showXAxisLabel === void 0) { showXAxisLabel = true; }
if (showYAxisLabel === void 0) { showYAxisLabel = true; }
if (xAxisLabel === void 0) { xAxisLabel = ''; }
if (yAxisLabel === void 0) { yAxisLabel = ''; }
var _this = _super.call(this, showLegend) || this;
_this.showXAxis = showXAxis;
_this.showYAxis = showYAxis;
_this.showXAxisLabel = showXAxisLabel;
_this.showYAxisLabel = showYAxisLabel;
_this.xAxisLabel = xAxisLabel.toUpperCase();
_this.yAxisLabel = yAxisLabel.toUpperCase();
_this.barPadding = 3;
return _this;
}
return BarOptions;
}(Options));
var BarVerticalComponent = /** @class */ (function () {
function BarVerticalComponent() {
this.onSelect = new EventEmitter();
this.options = new BarOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarVerticalComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
BarVerticalComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return BarVerticalComponent;
}());
BarVerticalComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-bar-vertical',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-bar-vertical\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [legend]=\"options.showLegend\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [barPadding]=\"options.barPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-bar-vertical>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
BarVerticalComponent.ctorParameters = function () { return []; };
BarVerticalComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var BarHorizontalComponent = /** @class */ (function () {
function BarHorizontalComponent() {
this.onSelect = new EventEmitter();
this.options = new BarOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarHorizontalComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
BarHorizontalComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return BarHorizontalComponent;
}());
BarHorizontalComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-bar-horizontal',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-bar-horizontal\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [legend]=\"options.showLegend\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [barPadding]=\"options.barPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-bar-horizontal>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
BarHorizontalComponent.ctorParameters = function () { return []; };
BarHorizontalComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var BarGroupedOptions = /** @class */ (function (_super) {
__extends(BarGroupedOptions, _super);
function BarGroupedOptions(showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel) {
if (showLegend === void 0) { showLegend = true; }
if (showXAxis === void 0) { showXAxis = true; }
if (showYAxis === void 0) { showYAxis = true; }
if (showXAxisLabel === void 0) { showXAxisLabel = true; }
if (showYAxisLabel === void 0) { showYAxisLabel = true; }
if (xAxisLabel === void 0) { xAxisLabel = ''; }
if (yAxisLabel === void 0) { yAxisLabel = ''; }
var _this = _super.call(this, showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel) || this;
_this.groupPadding = 6;
return _this;
}
return BarGroupedOptions;
}(BarOptions));
var BarVerticalGroupedComponent = /** @class */ (function () {
function BarVerticalGroupedComponent() {
this.onSelect = new EventEmitter();
this.options = new BarGroupedOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarVerticalGroupedComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
BarVerticalGroupedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return BarVerticalGroupedComponent;
}());
BarVerticalGroupedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-bar-vertical-grouped',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-bar-vertical-2d\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [legend]=\"options.showLegend\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [barPadding]=\"options.barPadding\"\n [groupPadding]=\"options.groupPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-bar-vertical-2d>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
BarVerticalGroupedComponent.ctorParameters = function () { return []; };
BarVerticalGroupedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var BarHorizontalGroupedComponent = /** @class */ (function () {
function BarHorizontalGroupedComponent() {
this.onSelect = new EventEmitter();
this.options = new BarGroupedOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarHorizontalGroupedComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
BarHorizontalGroupedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return BarHorizontalGroupedComponent;
}());
BarHorizontalGroupedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-bar-horizontal-grouped',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-bar-horizontal-2d\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [legend]=\"options.showLegend\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [barPadding]=\"options.barPadding\"\n [groupPadding]=\"options.groupPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-bar-horizontal-2d>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
BarHorizontalGroupedComponent.ctorParameters = function () { return []; };
BarHorizontalGroupedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var BarHorizontalStackedComponent = /** @class */ (function () {
function BarHorizontalStackedComponent() {
this.onSelect = new EventEmitter();
this.options = new BarOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarHorizontalStackedComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
BarHorizontalStackedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return BarHorizontalStackedComponent;
}());
BarHorizontalStackedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-bar-horizontal-stacked',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-bar-horizontal-stacked\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [legend]=\"options.showLegend\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [barPadding]=\"options.barPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-bar-horizontal-stacked>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
BarHorizontalStackedComponent.ctorParameters = function () { return []; };
BarHorizontalStackedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var BarVerticalStackedComponent = /** @class */ (function () {
function BarVerticalStackedComponent() {
this.onSelect = new EventEmitter();
this.options = new BarOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarVerticalStackedComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
BarVerticalStackedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return BarVerticalStackedComponent;
}());
BarVerticalStackedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-bar-vertical-stacked',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-bar-vertical-stacked\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [legend]=\"options.showLegend\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [barPadding]=\"options.barPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-bar-vertical-stacked>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
BarVerticalStackedComponent.ctorParameters = function () { return []; };
BarVerticalStackedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var BarVerticalNormalizedComponent = /** @class */ (function () {
function BarVerticalNormalizedComponent() {
this.onSelect = new EventEmitter();
this.options = new BarOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarVerticalNormalizedComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
BarVerticalNormalizedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return BarVerticalNormalizedComponent;
}());
BarVerticalNormalizedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-bar-vertical-normalized',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-bar-vertical-normalized\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [legend]=\"options.showLegend\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [barPadding]=\"options.barPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-bar-vertical-normalized>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
BarVerticalNormalizedComponent.ctorParameters = function () { return []; };
BarVerticalNormalizedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var BarHorizontalNormalizedComponent = /** @class */ (function () {
function BarHorizontalNormalizedComponent() {
this.onSelect = new EventEmitter();
this.options = new BarOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarHorizontalNormalizedComponent.prototype.ngOnInit = function () {
Object.assign(this.options, this.customOptions);
};
BarHorizontalNormalizedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return BarHorizontalNormalizedComponent;
}());
BarHorizontalNormalizedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-bar-horizontal-normalized',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-bar-horizontal-normalized\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [legend]=\"options.showLegend\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [barPadding]=\"options.barPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-bar-horizontal-normalized>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
BarHorizontalNormalizedComponent.ctorParameters = function () { return []; };
BarHorizontalNormalizedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var LineOptions = /** @class */ (function (_super) {
__extends(LineOptions, _super);
function LineOptions(showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel, timeline, isXAxisDate, referenceLines) {
if (showLegend === void 0) { showLegend = true; }
if (showXAxis === void 0) { showXAxis = true; }
if (showYAxis === void 0) { showYAxis = true; }
if (showXAxisLabel === void 0) { showXAxisLabel = true; }
if (showYAxisLabel === void 0) { showYAxisLabel = true; }
if (xAxisLabel === void 0) { xAxisLabel = ''; }
if (yAxisLabel === void 0) { yAxisLabel = ''; }
if (timeline === void 0) { timeline = false; }
if (isXAxisDate === void 0) { isXAxisDate = false; }
if (referenceLines === void 0) { referenceLines = []; }
var _this = _super.call(this, showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel) || this;
_this.autoScale = true;
_this.roundDomains = true;
_this.timeline = timeline;
_this.isXAxisDate = isXAxisDate;
if (referenceLines.length == 0) {
_this.showRefLines = true;
}
_this.referenceLines = referenceLines;
return _this;
}
return LineOptions;
}(BarOptions));
var LineComponent = /** @class */ (function () {
function LineComponent() {
this.onSelect = new EventEmitter();
this.options = new LineOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
LineComponent.prototype.ngOnInit = function () { };
LineComponent.prototype.ngOnChanges = function (changes) {
Object.assign(this.options, this.customOptions);
if ((this.data && (changes["data"].previousValue != changes["data"].currentValue)) ||
(this.options.isXAxisDate && (changes["customOptions"].previousValue != changes["customOptions"].currentValue))) {
this.data.forEach(function (element) {
element.series.forEach(function (seriesData) {
seriesData.name = new Date(seriesData.name);
});
});
}
};
LineComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return LineComponent;
}());
LineComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-line',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-line-chart\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [legend]=\"options.showLegend\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [autoScale]=\"options.autoScale\"\n [roundDomains]=\"options.roundDomains\"\n [timeline]=\"options.timeline\"\n (select)=\"mSelectedEvent($event)\"\n [showRefLines]=\"options.showRefLines\"\n [referenceLines]=\"options.referenceLines\">\n </ngx-charts-line-chart>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
LineComponent.ctorParameters = function () { return []; };
LineComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var AreaComponent = /** @class */ (function () {
function AreaComponent() {
this.onSelect = new EventEmitter();
this.options = new LineOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
AreaComponent.prototype.ngOnInit = function () { };
AreaComponent.prototype.ngOnChanges = function (changes) {
Object.assign(this.options, this.customOptions);
if ((this.data && (changes["data"].previousValue != changes["data"].currentValue)) ||
(this.options.isXAxisDate && (changes["customOptions"].previousValue != changes["customOptions"].currentValue))) {
this.data.forEach(function (element) {
element.series.forEach(function (seriesData) {
seriesData.name = new Date(seriesData.name);
});
});
}
};
AreaComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return AreaComponent;
}());
AreaComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-area',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-area-chart\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [legend]=\"options.showLegend\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [autoScale]=\"options.autoScale\"\n [timeline]=\"options.timeline\"\n (select)=\"mSelectedEvent($event)\">\n <!-- [roundDomains]=\"options.roundDomains\"> -->\n </ngx-charts-area-chart>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
AreaComponent.ctorParameters = function () { return []; };
AreaComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var AreaStackedComponent = /** @class */ (function () {
function AreaStackedComponent() {
this.onSelect = new EventEmitter();
this.options = new LineOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
AreaStackedComponent.prototype.ngOnInit = function () { };
AreaStackedComponent.prototype.ngOnChanges = function (changes) {
Object.assign(this.options, this.customOptions);
if ((this.data && (changes["data"].previousValue != changes["data"].currentValue)) ||
(this.options.isXAxisDate && (changes["customOptions"].previousValue != changes["customOptions"].currentValue))) {
this.data.forEach(function (element) {
element.series.forEach(function (seriesData) {
seriesData.name = new Date(seriesData.name);
});
});
}
};
AreaStackedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return AreaStackedComponent;
}());
AreaStackedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-area-stacked',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-area-chart-stacked\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [legend]=\"options.showLegend\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [timeline]=\"options.timeline\"\n (select)=\"mSelectedEvent($event)\">\n <!-- [autoScale]=\"options.autoScale\"\n [roundDomains]=\"options.roundDomains\"> -->\n </ngx-charts-area-chart-stacked>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
AreaStackedComponent.ctorParameters = function () { return []; };
AreaStackedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var AreaNormalizedComponent = /** @class */ (function () {
function AreaNormalizedComponent() {
this.onSelect = new EventEmitter();
this.options = new LineOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
AreaNormalizedComponent.prototype.ngOnInit = function () { };
AreaNormalizedComponent.prototype.ngOnChanges = function (changes) {
Object.assign(this.options, this.customOptions);
if ((this.data && (changes["data"].previousValue != changes["data"].currentValue)) ||
(this.options.isXAxisDate && (changes["customOptions"].previousValue != changes["customOptions"].currentValue))) {
this.data.forEach(function (element) {
element.series.forEach(function (seriesData) {
seriesData.name = new Date(seriesData.name);
});
});
}
};
AreaNormalizedComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return AreaNormalizedComponent;
}());
AreaNormalizedComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-area-normalized',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-area-chart-normalized\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [legend]=\"options.showLegend\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [timeline]=\"options.timeline\"\n (select)=\"mSelectedEvent($event)\">\n <!-- [autoScale]=\"options.autoScale\"\n [roundDomains]=\"options.roundDomains\"> -->\n </ngx-charts-area-chart-normalized>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [".chart-container{width:100%;height:100%}"]
},] },
];
AreaNormalizedComponent.ctorParameters = function () { return []; };
AreaNormalizedComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var MapOptions = /** @class */ (function (_super) {
__extends(MapOptions, _super);
function MapOptions(showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel, timeline, isXAxisDate, innerPadding, showSkew, colorScheme) {
if (showLegend === void 0) { showLegend = true; }
if (showXAxis === void 0) { showXAxis = true; }
if (showYAxis === void 0) { showYAxis = true; }
if (showXAxisLabel === void 0) { showXAxisLabel = true; }
if (showYAxisLabel === void 0) { showYAxisLabel = true; }
if (xAxisLabel === void 0) { xAxisLabel = ''; }
if (yAxisLabel === void 0) { yAxisLabel = ''; }
if (timeline === void 0) { timeline = false; }
if (isXAxisDate === void 0) { isXAxisDate = false; }
if (innerPadding === void 0) { innerPadding = 5; }
if (showSkew === void 0) { showSkew = false; }
if (colorScheme === void 0) { colorScheme = null; }
var _this = _super.call(this, showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel) || this;
_this.innerPadding = innerPadding;
_this.showSkew = showSkew;
_this.colorScheme = colorScheme;
return _this;
}
return MapOptions;
}(BarOptions));
var HeatComponent = /** @class */ (function () {
function HeatComponent() {
this.onSelect = new EventEmitter();
this.options = new MapOptions();
}
HeatComponent.prototype.ngOnInit = function () { };
HeatComponent.prototype.ngOnChanges = function (changes) {
Object.assign(this.options, this.customOptions);
if (this.options.colorScheme != null) {
this.colorScheme = {};
this.colorScheme['domain'] = this.options.colorScheme;
}
else {
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
if (this.options.showSkew && (changes["customOptions"].previousValue != changes["customOptions"].currentValue)) {
this.data.sort(function (current, next) {
if (current.series.length > next.series.length) {
return -1;
}
else if (current.series.length < next.series.length) {
return 1;
}
return 0;
});
}
};
HeatComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return HeatComponent;
}());
HeatComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-heat',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-heat-map\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n [legend]=\"options.showLegend\"\n [gradient]=\"gradient\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [innerPadding]=\"options.innerPadding\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-heat-map>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [""]
},] },
];
HeatComponent.ctorParameters = function () { return []; };
HeatComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var TreeComponent = /** @class */ (function () {
function TreeComponent() {
this.onSelect = new EventEmitter();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
TreeComponent.prototype.ngOnInit = function () { };
TreeComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
return TreeComponent;
}());
TreeComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-tree',
template: "<div class=\"chart-container\" *ngIf=\"data && (data.length > 0)\">\n <ngx-charts-tree-map\n [scheme]=\"colorScheme\"\n [results]=\"data\"\n (select)=\"mSelectedEvent($event)\">\n </ngx-charts-tree-map>\n</div>\n<no-data *ngIf=\"(!data) || (data.length <= 0)\"></no-data>",
styles: [""]
},] },
];
TreeComponent.ctorParameters = function () { return []; };
TreeComponent.propDecorators = {
"data": [{ type: Input, args: ['data',] },],
"onSelect": [{ type: Output },],
};
var BarLineComboOptions = /** @class */ (function (_super) {
__extends(BarLineComboOptions, _super);
function BarLineComboOptions(showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel) {
if (showLegend === void 0) { showLegend = true; }
if (showXAxis === void 0) { showXAxis = true; }
if (showYAxis === void 0) { showYAxis = true; }
if (showXAxisLabel === void 0) { showXAxisLabel = true; }
if (showYAxisLabel === void 0) { showYAxisLabel = true; }
if (xAxisLabel === void 0) { xAxisLabel = ''; }
if (yAxisLabel === void 0) { yAxisLabel = ''; }
var _this = _super.call(this, showLegend, showXAxis, showYAxis, showXAxisLabel, showYAxisLabel, xAxisLabel, yAxisLabel) || this;
_this.showRightYAxisLabel = false;
return _this;
}
return BarLineComboOptions;
}(BarOptions));
var BarLineWrapperComponent = /** @class */ (function () {
function BarLineWrapperComponent() {
this.dataBar = [];
this.dataLine = [];
this.onSelect = new EventEmitter();
this.options = new BarLineComboOptions();
this.colorScheme = customColorSets.find(function (s) { return s.name == 'palatte'; });
}
BarLineWrapperComponent.prototype.ngOnInit = function () {
console.log(this.dataBar, this.dataLine);
Object.assign(this.options, this.customOptions);
};
BarLineWrapperComponent.prototype.mSelectedEvent = function (event) {
this.onSelect.emit(event);
};
BarLineWrapperComponent.prototype.yLeftAxisScale = function (min, max) {
return { min: "" + min, max: "" + max };
};
BarLineWrapperComponent.prototype.yRightAxisScale = function (min, max) {
return { min: "" + min, max: "" + max };
};
BarLineWrapperComponent.prototype.yLeftTickFormat = function (data) {
return "" + data.toLocaleString();
};
BarLineWrapperComponent.prototype.yRightTickFormat = function (data) {
return data + "%";
};
return BarLineWrapperComponent;
}());
BarLineWrapperComponent.decorators = [
{ type: Component, args: [{
selector: 'neu-charts-combo-bar-line',
template: "\n<div class=\"chart-container\" *ngIf=\"(dataBar && (dataBar.length > 0)) && (dataLine && (dataLine.length > 0))\">\n <neu-charts-combo-bar-line-raw\n [scheme]=\"colorScheme\"\n [colorSchemeLine]=\"lineChartScheme\"\n [results]=\"dataBar\"\n [lineChart]=\"dataLine\"\n [legend]=\"options.showLegend\"\n [xAxis]=\"options.showXAxis\"\n [yAxis]=\"options.showYAxis\"\n [showXAxisLabel]=\"options.showXAxisLabel\"\n [showYAxisLabel]=\"options.showYAxisLabel\"\n [xAxisLabel]=\"options.xAxisLabel\"\n [yAxisLabel]=\"options.yAxisLabel\"\n [showRightYAxisLabel]=\"options.showRightYAxisLabel\"\n [yAxisLabelRight]=\"options.yAxisLabelRight\"\n [yLeftAxisScaleFactor]=\"yLeftAxisScale\"\n [yRightAxisScaleFactor]=\"yRightAxisScale\"\n [yAxisTickFormatting]=\"yLeftTickFormat\"\n [yRightAxisTickFormatting]=\"yRightTickFormat\"\n (select)=\"mSelectedEvent($event)\">\n </neu-charts-combo-bar-line-raw>\n</div>\n<no-data *ngIf=\"(!dataBar) || (dataBar.length <= 0) || (!dataLine) || (dataLine.length <= 0)\"></no-data>"
},] },
];
BarLineWrapperComponent.ctorParameters = function () { return []; };
BarLineWrapperComponent.propDecorators = {
"dataBar": [{ type: Input, args: ['dataBar',] },],
"dataLine": [{ type: Input, args: ['dataLine',] },],
"customOptions": [{ type: Input, args: ['options',] },],
"onSelect": [{ type: Output },],
};
var BarLineComponent = /** @class */ (function (_super) {
__extends(BarLineComponent, _super);
function BarLineComponent() {
var _this = _super.apply(this, __spread(arguments)) || this;
_this.curve = curveLinear;
_this.legend = false;
_this.legendTitle = 'Legend';
_this.tooltipDisabled = false;
_this.showGridLines = true;
_this.activeEntries = [];
_this.schemeType = 'ordinal';
_this.roundDomains = false;
_this.animations = true;
_this.activate = new EventEmitter();
_this.deactivate = new EventEmitter();
_this.margin = [10, 20, 10, 20];
_this.xAxisHeight = 0;
_this.yAxisWidth = 0;
_this.scaleType = 'linear';
_this.yOrientLeft = 'left';
_this.yOrientRight = 'right';
_this.legendSpacing = 0;
_this.barPadding = 8;
return _this;
}
BarLineComponent.prototype.trackBy = function (index, item) {
return item.name;
};
BarLineComponent.prototype.update = function () {
_super.prototype.update.call(this);
this.dims = calculateViewDimensions({
width: this.width,
height: this.height,
margins: this.margin,
showXAxis: this.xAxis,
showYAxis: this.yAxis,
xAxisHeight: this.xAxisHeight,
yAxisWidth: this.yAxisWidth,
showXLabel: this.showXAxisLabel,
showYLabel: this.showYAxisLabel,
showLegend: this.legend,
legendType: this.schemeType
});
if (!this.yAxis) {
this.legendSpacing = 0;
}
else if (this.showYAxisLabel && this.yAxis) {
this.legendSpacing = 100;
}
else {
this.legendSpacing = 40;
}
this.xScale = this.getXScale();
this.yScale = this.getYScale();
this.xDomainLine = this.getXDomainLine();
if (this.filteredDomain) {
this.xDomainLine = this.filteredDomain;
}
this.yDomainLine = this.getYDomainLine();
this.seriesDomain = this.getSeriesDomain();
this.xScaleLine = this.getXScaleLine(this.xDomainLine, this.dims.width);
this.yScaleLine = this.getYScaleLine(this.yDomainLine, this.dims.height);
this.setColors();
this.legendOptions = this.getLegendOptions();
this.transform = "translate(" + this.dims.xOffset + " , " + this.margin[0] + ")";
};
BarLineComponent.prototype.deactivateAll = function () {
this.activeEntries = __spread(this.activeEntries);
try {
for (var _a = __values(this.activeEntries), _b = _a.next(); !_b.done; _b = _a.next()) {
var entry = _b.value;
this.deactivate.emit({ value: entry, entries: [] });
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_1) throw e_1.error; }
}
this.activeEntries = [];
var e_1, _c;
};
BarLineComponent.prototype.hideCircles = function () {
this.hoveredVertical = null;
this.deactivateAll();
};
BarLineComponent.prototype.updateHoveredVertical = function (item) {
this.hoveredVertical = item.value;
this.deactivateAll();
};
BarLineComponent.prototype.updateDomain = function (domain) {
this.filteredDomain = domain;
this.xDomainLine = this.filteredDomain;
this.xScaleLine = this.getXScaleLine(this.xDomainLine, this.dims.width);
};
BarLineComponent.prototype.getSeriesDomain = function () {
this.combinedSeries = this.lineChart.slice(0);
this.combinedSeries.push({
name: this.yAxisLabel,
series: this.results
});
return this.combinedSeries.map(function (d) { return d.name; });
};
BarLineComponent.prototype.isDate = function (value) {
if (value instanceof Date) {
return true;
}
return false;
};
BarLineComponent.prototype.getScaleType = function (values) {
var date = true;
var num = true;
try {
for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {
var value = values_1_1.value;
if (!this.isDate(value)) {
date = false;
}
if (typeof value !== 'number') {
num = false;
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (values_1_1 && !va