/**
 * @fileoverview added by tsickle
 * Generated from: business-component/chart/line/big-data-line-chart/big-data-line-chart.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input } from "@angular/core";
import { fromEvent } from "rxjs";
import { debounceTime } from "rxjs/operators";
import { CommonService } from "../../service/common.service";
import { BigDataLineChartService } from './big-data-line-chart.service';
import { initOpts } from '../../config/initOpts';
var BigDataLineChartComponent = /** @class */ (function () {
    function BigDataLineChartComponent(commonService, bigDataLineChartService) {
        this.commonService = commonService;
        this.bigDataLineChartService = bigDataLineChartService;
        this.chartTitle = {
            show: true,
            label: "图表名称"
        };
        this.defaultEchartOption = this.bigDataLineChartService.getDefaultOption();
    }
    /**
     * @return {?}
     */
    BigDataLineChartComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.initOpts = initOpts;
        this.initEchart();
        fromEvent(window, "resize")
            .pipe(debounceTime(200))
            .subscribe((/**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var style = _this.commonService.changeFontSize();
            _this.optionInit.setOption({
                legend: {
                    itemWidth: style.fontSize,
                    textStyle: {
                        fontSize: style.fontSize - 1
                    },
                    itemHeight: style.fontSize,
                },
                toolbox: {
                    itemSize: style.toolboxSize,
                },
                grid: style.interval,
                xAxis: {
                    axisLabel: {
                        fontSize: style.fontSize - 1
                    },
                    nameTextStyle: {
                        fontSize: style.fontSize
                    }
                },
                yAxis: {
                    axisLabel: {
                        fontSize: style.fontSize - 1
                    },
                    nameTextStyle: {
                        fontSize: style.fontSize
                    }
                },
            });
        }));
    };
    /**
     * @param {?} ec
     * @return {?}
     */
    BigDataLineChartComponent.prototype.onOptionInit = /**
     * @param {?} ec
     * @return {?}
     */
    function (ec) {
        this.optionInit = ec;
    };
    Object.defineProperty(BigDataLineChartComponent.prototype, "bcacTitle", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.chartTitle.show = true,
                this.chartTitle.label = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BigDataLineChartComponent.prototype, "bcacCloseTitle", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.chartTitle.show = false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BigDataLineChartComponent.prototype, "bcacYaxisName", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.bigDataLineChartService.setyAxisName(this.defaultEchartOption, value);
            this.updateOption();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BigDataLineChartComponent.prototype, "bcacYNameGap", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.bigDataLineChartService.setYNameGap(this.defaultEchartOption, value);
            this.updateOption();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BigDataLineChartComponent.prototype, "bcacDatas", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.bigDataLineChartService.setDatas(this.defaultEchartOption, value);
            this.updateOption();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BigDataLineChartComponent.prototype, "bcacUnit", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.bigDataLineChartService.setUnit(this.defaultEchartOption, value);
            this.updateOption();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BigDataLineChartComponent.prototype, "bcacXAxisName", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.bigDataLineChartService.setXAxisName(this.defaultEchartOption, value);
            this.updateOption();
        },
        enumerable: true,
        configurable: true
    });
    // echart配置项
    // echart配置项
    /**
     * @return {?}
     */
    BigDataLineChartComponent.prototype.initEchart = 
    // echart配置项
    /**
     * @return {?}
     */
    function () {
        this.options = this.defaultEchartOption;
    };
    /**
     * @return {?}
     */
    BigDataLineChartComponent.prototype.updateOption = /**
     * @return {?}
     */
    function () {
        if (this.optionInit) {
            this.optionInit.setOption(this.options, true);
        }
    };
    BigDataLineChartComponent.decorators = [
        { type: Component, args: [{
                    selector: 'bcac-big-data-line-chart',
                    template: "<!-- <div class=\"chart-card\">\r\n    <div nz-row class=\"chart-title\">\r\n        <div nz-col nzSpan=\"10\">\r\n            {{chartName}}\r\n        </div>\r\n    </div>\r\n    <div class=\"bodys\">\r\n        <div class=\"echart-menu-panel\" style=\"display: none;\" (mouseleave)=\"closePanel($event)\">\r\n            <div class=\"echart-menu-panel-border\">\r\n                <div class=\"echart-menu-panel-box above\">\r\n                    <div (click)=\"fullScreen($event)\">\u5168\u5C4F\u67E5\u770B</div>\r\n                    <div (click)=\"customPrint()\">\u6253\u5370\u56FE\u8868</div>\r\n                </div>\r\n                <div class=\"echart-menu-panel-box bottom\">\r\n                    <div (click)=\"downloadImage('.png', '\u6708\u5E73\u5747\u6C14\u6E29')\">\u4E0B\u8F7DPNG\u6587\u4EF6</div>\r\n                    <div (click)=\"downloadImage('.jpeg', '\u6708\u5E73\u5747\u6C14\u6E29')\">\u4E0B\u8F7DJPEG\u6587\u4EF6</div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <div echarts [options]=\"echartOption\" class=\"chart-body\" [loading]=\"maploading\" [autoResize]=\"true\"\r\n            [initOpts]=\"{renderer:'canvas'}\" (chartInit)=\"onOptionInit($event)\">\r\n            <e-ngx-print #print1\r\n                           [showBtn]=\"false\"\r\n                           [printStyle]=\"printStyle\"\r\n                           [printCSS]=\"printCSS\"\r\n                           (printComplete)=\"printComplete()\">\r\n            </e-ngx-print>\r\n        </div>\r\n    </div>\r\n</div> -->\r\n\r\n<div\u00A0class=\"chart-card\">\r\n    <div\u00A0nz-row\u00A0class=\"chart-title\"\u00A0*ngIf=\"chartTitle.show\">\r\n        <div\u00A0nz-col\u00A0nzSpan=\"10\">\r\n            {{chartTitle.label}}\r\n        </div>\r\n    </div>\r\n    <div\u00A0class=\"chart-body\" [ngClass]=\"{'chart-body-full': !chartTitle.show}\">\r\n        <bcac-toolbox\u00A0[fileName]=\"chartTitle.label\"\u00A0[chartInstance]=\"optionInit\"></bcac-toolbox>\r\n        <div\u00A0echarts\u00A0[options]=\"options\"\u00A0class=\"echarts echartfontsize\"\u00A0[loading]=\"false\" \u00A0[autoResize]=\"true\"\r\n            [initOpts]=\"initOpts\" \u00A0(chartInit)=\"onOptionInit($event)\">\r\n        </div>\r\n    </div>\r\n</div>",
                    styles: ["@font-face{font-family:notoSans;src:url(/assets/font/SourceHanSansCN-Regular.ttf) format(\"opentype\")}@font-face{font-family:roboto;src:url(/assets/font/Roboto-Regular.ttf) format(\"opentype\")}body,html{font-family:roboto,notoSans}.chart-card{padding:1rem;background:#fff;height:100%}.chart-card .chart-title{font-size:1.4rem;color:#101010;line-height:1.5em;padding:.4rem}.chart-card .chart-body{position:relative;height:calc(100% - 2.9rem)}.chart-card .chart-body.chart-body-full{height:100%}.chart-card .echarts{width:100%;height:100%!important}.chart-card .echartfontsize{font-size:1.2rem}"]
                }] }
    ];
    /** @nocollapse */
    BigDataLineChartComponent.ctorParameters = function () { return [
        { type: CommonService },
        { type: BigDataLineChartService }
    ]; };
    BigDataLineChartComponent.propDecorators = {
        bcacTitle: [{ type: Input }],
        bcacCloseTitle: [{ type: Input }],
        bcacYaxisName: [{ type: Input }],
        bcacYNameGap: [{ type: Input }],
        bcacDatas: [{ type: Input }],
        bcacUnit: [{ type: Input }],
        bcacXAxisName: [{ type: Input }]
    };
    return BigDataLineChartComponent;
}());
export { BigDataLineChartComponent };
if (false) {
    /** @type {?} */
    BigDataLineChartComponent.prototype.initOpts;
    /** @type {?} */
    BigDataLineChartComponent.prototype.optionInit;
    /** @type {?} */
    BigDataLineChartComponent.prototype.chartTitle;
    /** @type {?} */
    BigDataLineChartComponent.prototype.defaultEchartOption;
    /** @type {?} */
    BigDataLineChartComponent.prototype.options;
    /**
     * @type {?}
     * @private
     */
    BigDataLineChartComponent.prototype.commonService;
    /**
     * @type {?}
     * @private
     */
    BigDataLineChartComponent.prototype.bigDataLineChartService;
}
//# sourceMappingURL=data:application/json;base64, 