fix loading error on chart rental-time
This commit is contained in:
parent
16468ba950
commit
bd21861368
@ -102,7 +102,7 @@ export class RentTimeChartComponent implements OnInit {
|
||||
},
|
||||
chart: {
|
||||
toolbar: {
|
||||
show: true
|
||||
show: false
|
||||
},
|
||||
type: 'line',
|
||||
height: '495',
|
||||
@ -119,20 +119,14 @@ export class RentTimeChartComponent implements OnInit {
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
offsetY: 8,
|
||||
itemMargin: {
|
||||
horizontal: 5
|
||||
}
|
||||
},
|
||||
xaxis: {
|
||||
title: {
|
||||
text: 'time of the day',
|
||||
offsetY: 17
|
||||
text: 'time of the day'
|
||||
},
|
||||
categories: source.map(value => value.timeFrame),
|
||||
tickAmount: 24,
|
||||
tickPlacement: 'between',
|
||||
type: 'category'
|
||||
tickPlacement: 'between'
|
||||
},
|
||||
yaxis: [{
|
||||
title: {
|
||||
@ -154,7 +148,7 @@ export class RentTimeChartComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
});
|
||||
await this.chart.updateOptions(this.chartOptions);
|
||||
|
||||
}
|
||||
|
||||
async onSubmit(actualStartDate: string, actualEndDate: string): Promise<void> {
|
||||
|
@ -36,7 +36,6 @@ export class TableComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.params.subscribe(params => {
|
||||
this.selectionModel.clear();
|
||||
this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red'];
|
||||
this.service.fetchDashboardInit(params.id).then(data => {
|
||||
this.bikePoint = data;
|
||||
@ -48,6 +47,8 @@ export class TableComponent implements OnInit {
|
||||
}
|
||||
|
||||
async initTable(): Promise<void> {
|
||||
this.selectionModel.clear();
|
||||
this.map.removeTableStationMarkerOnReload();
|
||||
const initDate = this.maxEndDate.toISOString().substring(0, 10);
|
||||
await this.service.fetchDashboardStationTo(this.bikePoint.id, initDate, initDate).then(source => {
|
||||
this.stationToSource = this.setBikePointColorToSource(source);
|
||||
@ -60,6 +61,8 @@ export class TableComponent implements OnInit {
|
||||
}
|
||||
|
||||
async onSubmit(actualStartDate: string, actualEndDate: string): Promise<void> {
|
||||
this.selectionModel.clear();
|
||||
this.map.removeTableStationMarkerOnReload();
|
||||
await this.service.fetchDashboardStationTo(this.bikePoint.id, actualStartDate, actualEndDate).then((source) => {
|
||||
this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red'];
|
||||
this.stationToSource = this.setBikePointColorToSource(source);
|
||||
|
Loading…
Reference in New Issue
Block a user