Skip to content
Snippets Groups Projects
Commit 78d7e34c authored by Radek Puš's avatar Radek Puš
Browse files

reload & reflow graphs

parent bada150b
No related branches found
No related tags found
No related merge requests found
...@@ -39,6 +39,8 @@ export class HomeComponent implements OnInit { ...@@ -39,6 +39,8 @@ export class HomeComponent implements OnInit {
this.HistoryPieChart = this.HomeService.GetHistoryPie(); this.HistoryPieChart = this.HomeService.GetHistoryPie();
this.HistoryBarChart = this.HomeService.GetHistoryBar(); this.HistoryBarChart = this.HomeService.GetHistoryBar();
this.ForecastPieChart = this.HomeService.GetForecastPie(); this.ForecastPieChart = this.HomeService.GetForecastPie();
this.HomeService.ReloadData(); //after re-loggin fire up graphs
} }
   
onLogout() { onLogout() {
......
...@@ -59,11 +59,16 @@ export class HomeService { ...@@ -59,11 +59,16 @@ export class HomeService {
this.HistoryBarChart.addSeries({ name: 'Výdaje', data: this.Expenses } as Highcharts.SeriesColumnOptions, true, false); this.HistoryBarChart.addSeries({ name: 'Výdaje', data: this.Expenses } as Highcharts.SeriesColumnOptions, true, false);
this.HistoryPieChart.removeSeries(0); this.HistoryPieChart.removeSeries(0);
this.HistoryPieChart.addSeries({ name: 'Výdaje', data: this.TrasactionTypes } as Highcharts.SeriesColumnOptions, true, false); this.HistoryPieChart.addSeries({ name: 'Výdaje', data: this.TrasactionTypes } as Highcharts.SeriesColumnOptions, true, false);
this.HistoryPieChart.ref.reflow();
this.HistoryBarChart.ref.reflow();
} }
   
private ReloadForecastChartSeries() { private ReloadForecastChartSeries() {
this.ForecastPieChart.removeSeries(0); this.ForecastPieChart.removeSeries(0);
this.ForecastPieChart.addSeries({ name: 'Výdaje', data: this.ForecastTypes } as Highcharts.SeriesColumnOptions, true, false); this.ForecastPieChart.addSeries({ name: 'Výdaje', data: this.ForecastTypes } as Highcharts.SeriesColumnOptions, true, false);
this.ForecastPieChart.ref.reflow();
} }
   
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment