import { Component } from '@angular/core'; import { NgaThemeService } from '@akveo/nga-theme'; @Component({ selector: 'ngx-echarts-radar', template: `
`, }) export class EchartsRadarComponent { options: any; constructor(private theme: NgaThemeService) { this.theme.getJsTheme().subscribe(config => { this.options = { backgroundColor: config.echartsBackgroundColor, color: [config.echartsRadarColor1, config.echartsRadarColor2], tooltip: {}, legend: { data: ['Allocated Budget', 'Actual Spending'], textStyle: { color: config.echartsRadarLegendTextColor, }, }, radar: { name: { textStyle: { color: config.echartsRadarNameTextColor, }, }, 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 }, ], // axisLine: { // lineStyle: { // color: 'white', // }, // }, splitArea: { areaStyle: { color: config.echartsRadarSplitAreaStyleColor, }, }, }, 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', }, ], }, ], }; }); } }