text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  var tslib_1 = require("tslib");
  var core_1 = require("@angular/core");
  var theme_1 = require("@nebular/theme");
  var EchartsRadarComponent = /** @class */ (function () {
      function EchartsRadarComponent(theme) {
          this.theme = theme;
          this.options = {};
      }
      EchartsRadarComponent.prototype.ngAfterViewInit = function () {
          var _this = this;
          this.themeSubscription = this.theme.getJsTheme().subscribe(function (config) {
              var colors = config.variables;
              var echarts = config.variables.echarts;
              _this.options = {
                  backgroundColor: echarts.bg,
                  color: [colors.danger, colors.warning],
                  tooltip: {},
                  legend: {
                      data: ['Allocated Budget', 'Actual Spending'],
                      textStyle: {
                          color: echarts.textColor,
                      },
                  },
                  radar: {
                      name: {
                          textStyle: {
                              color: echarts.textColor,
                          },
                      },
                      indicator: [
                          { name: 'Sales', max: 6500 },
                          { name: 'Administration', max: 16000 },
                          { name: 'Information Techology', max: 30000 },
                          { name: 'Customer Support', max: 38000 },
                          { name: 'Development', max: 52000 },
                          { name: 'Marketing', max: 25000 },
                      ],
                      splitArea: {
                          areaStyle: {
                              color: 'transparent',
                          },
                      },
                  },
                  series: [
                      {
                          name: 'Budget vs Spending',
                          type: 'radar',
                          data: [
                              {
                                  value: [4300, 10000, 28000, 35000, 50000, 19000],
                                  name: 'Allocated Budget',
                              },
                              {
                                  value: [5000, 14000, 28000, 31000, 42000, 21000],
                                  name: 'Actual Spending',
                              },
                          ],
                      },
                  ],
              };
          });
      };
      EchartsRadarComponent.prototype.ngOnDestroy = function () {
          this.themeSubscription.unsubscribe();
      };
      EchartsRadarComponent = tslib_1.__decorate([
          core_1.Component({
              selector: 'ngx-echarts-radar',
              template: "\n    <div echarts [options]=\"options\" class=\"echart\"></div>\n  ",
          }),
          tslib_1.__metadata("design:paramtypes", [theme_1.NbThemeService])
      ], EchartsRadarComponent);
      return EchartsRadarComponent;
  }());
  exports.EchartsRadarComponent = EchartsRadarComponent;
  //# sourceMappingURL=echarts-radar.component.js.map