uv-charts-dashboard
Version:
A dashboard for uvCharts examples
66 lines • 2.58 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require('@angular/core');
var common_service_1 = require('../../shared/common.service');
var WaterfallChartComponent = (function () {
function WaterfallChartComponent(commonService) {
this.uv = commonService.uv;
this.data = commonService.getData();
}
WaterfallChartComponent.prototype.ngOnInit = function () {
this.makeChart();
};
WaterfallChartComponent.prototype.makeChart = function () {
this.metaData = {
meta: {
position: '#waterfall-div'
},
dimension: {
height: 200,
width: 400
}
};
if (this.compress) {
this.metaData = {
margin: {
left: 10,
right: 10,
bottom: 10
},
dimension: {
height: 200,
width: 200
},
meta: {
position: '#waterfall-div',
},
axis: {
showtext: false
}
};
}
this.uv.chart('Waterfall', this.data, this.metaData);
};
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], WaterfallChartComponent.prototype, "compress", void 0);
WaterfallChartComponent = __decorate([
core_1.Component({
selector: 'waterfall-chart',
templateUrl: './waterfall-chart.component.html'
}),
__metadata('design:paramtypes', [common_service_1.CommonService])
], WaterfallChartComponent);
return WaterfallChartComponent;
}());
exports.WaterfallChartComponent = WaterfallChartComponent;
//# sourceMappingURL=waterfall-chart.component.js.map