From de1c75e6ee5f9f32385aa3d2d53f3d05c2f3b7e5 Mon Sep 17 00:00:00 2001 From: Sayak Mukhopadhyay Date: Sun, 20 Jan 2019 11:16:34 +0530 Subject: [PATCH] Hid typing issues --- src/app/charts/faction-influence-chart.component.ts | 6 +++--- src/app/charts/station-economies-chart.component.ts | 6 +++--- src/app/charts/system-influence-chart.component.ts | 6 +++--- src/app/charts/tick-chart.component.ts | 6 +++--- src/app/services/theme.service.ts | 3 ++- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/app/charts/faction-influence-chart.component.ts b/src/app/charts/faction-influence-chart.component.ts index a6b650be..29f12104 100644 --- a/src/app/charts/faction-influence-chart.component.ts +++ b/src/app/charts/faction-influence-chart.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core'; import { EBGSFactionSchema } from '../typings'; -import { Options, LineChartSeriesOptions } from 'highcharts'; +// import { Options, LineChartSeriesOptions } from 'highcharts'; import { Chart } from 'angular-highcharts'; import { ThemeService } from '../services/theme.service'; @@ -11,7 +11,7 @@ import { ThemeService } from '../services/theme.service'; export class FactionInfluenceChartComponent implements OnInit, OnChanges { @Input() factionData: EBGSFactionSchema; - options: Options; + options: any; chart: Chart; constructor(private themeService: ThemeService) { } @@ -28,7 +28,7 @@ export class FactionInfluenceChartComponent implements OnInit, OnChanges { allSystems.push(element.system); } }); - const series: LineChartSeriesOptions[] = []; + const series: any[] = []; history.sort((a, b) => { if (a.updated_at < b.updated_at) { return -1; diff --git a/src/app/charts/station-economies-chart.component.ts b/src/app/charts/station-economies-chart.component.ts index 381c787a..efeea509 100644 --- a/src/app/charts/station-economies-chart.component.ts +++ b/src/app/charts/station-economies-chart.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core'; import { EBGSStationSchema } from '../typings'; -import { Options, PieChartSeriesOptions } from 'highcharts'; +// import { Options, PieChartSeriesOptions } from 'highcharts'; import { Chart } from 'angular-highcharts'; import { ThemeService } from '../services/theme.service'; @@ -11,7 +11,7 @@ import { ThemeService } from '../services/theme.service'; export class StationEconomiesChartComponent implements OnInit, OnChanges { @Input() stationData: EBGSStationSchema; - options: Options; + options: any; chart: Chart; constructor(private themeService: ThemeService) { } @@ -29,7 +29,7 @@ export class StationEconomiesChartComponent implements OnInit, OnChanges { y: element.proportion }) }); - let series: PieChartSeriesOptions[] = []; + let series: any[] = []; series = [{ name: 'Economies', data: data diff --git a/src/app/charts/system-influence-chart.component.ts b/src/app/charts/system-influence-chart.component.ts index ec23170c..4c85fec4 100644 --- a/src/app/charts/system-influence-chart.component.ts +++ b/src/app/charts/system-influence-chart.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core'; import { EBGSSystemChart } from '../typings'; -import { Options, LineChartSeriesOptions } from 'highcharts'; +// import { Options, LineChartSeriesOptions } from 'highcharts'; import { Chart } from 'angular-highcharts'; import { ThemeService } from '../services/theme.service'; @@ -11,7 +11,7 @@ import { ThemeService } from '../services/theme.service'; export class SystemInfluenceChartComponent implements OnInit, OnChanges { @Input() systemData: EBGSSystemChart; - options: Options; + options: any; chart: Chart; constructor(private themeService: ThemeService) { } @@ -36,7 +36,7 @@ export class SystemInfluenceChartComponent implements OnInit, OnChanges { return 0; } }); - const series: LineChartSeriesOptions[] = []; + const series: any[] = []; allTimeFactions.forEach(faction => { const data: [number, number][] = []; this.systemData.faction_history.forEach(record => { diff --git a/src/app/charts/tick-chart.component.ts b/src/app/charts/tick-chart.component.ts index 84b9e529..ae6db1e8 100644 --- a/src/app/charts/tick-chart.component.ts +++ b/src/app/charts/tick-chart.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core'; import { Tick } from '../typings'; -import { Options, LineChartSeriesOptions } from 'highcharts'; +// import { Options, LineChartSeriesOptions } from 'highcharts'; import { Chart } from 'angular-highcharts'; import { ThemeService } from '../services/theme.service'; import * as moment from 'moment'; @@ -11,7 +11,7 @@ import * as moment from 'moment'; }) export class TickChartComponent implements OnInit, OnChanges { @Input() tickData: Tick; - options: Options; + options: any; chart: Chart; constructor(private themeService: ThemeService) { } @@ -22,7 +22,7 @@ export class TickChartComponent implements OnInit, OnChanges { createChart(): void { // Copied over to server\routes\chart_generator.js const data: [number, number][] = []; - const series: LineChartSeriesOptions[] = []; + const series: any[] = []; const firstTick = this.tickData[this.tickData.length - 1]; this.tickData.forEach(tick => { const tickMoment = moment(tick.time); diff --git a/src/app/services/theme.service.ts b/src/app/services/theme.service.ts index 7fa7e01d..1fc66238 100644 --- a/src/app/services/theme.service.ts +++ b/src/app/services/theme.service.ts @@ -1,7 +1,8 @@ import { Injectable } from '@angular/core'; import { HighchartsDarkTheme, HighchartsLightTheme } from './highChartsTheme'; import { BehaviorSubject } from 'rxjs'; -import { Highcharts } from 'angular-highcharts'; +import * as Highcharts from 'highcharts'; +// import { Highcharts } from 'angular-highcharts'; import cloneDeep from 'lodash-es/cloneDeep' @Injectable()