fix error with color for polyline after change of date-span
This commit is contained in:
parent
89d4738da5
commit
210061442f
@ -79,13 +79,19 @@ export class TableComponent implements OnInit {
|
|||||||
await this.service.fetchDashboardStationTo(this.bikePoint.id, actualStartDate, actualEndDate).then((source) => {
|
await this.service.fetchDashboardStationTo(this.bikePoint.id, actualStartDate, actualEndDate).then((source) => {
|
||||||
this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red'];
|
this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red'];
|
||||||
this.isLoadingToSource = false;
|
this.isLoadingToSource = false;
|
||||||
this.stationToSource = source;
|
this.stationToSource = this.setBikePointColorFromSource(source);
|
||||||
this.iterableToSource = this.setBikePointColorToSource(source);
|
this.iterableToSource = source;
|
||||||
|
this.iterableToSource.forEach(bikePoint => {
|
||||||
|
bikePoint.polyLineColor = 'green';
|
||||||
|
});
|
||||||
});
|
});
|
||||||
this.service.fetchDashboardStationFrom(this.bikePoint.id, actualStartDate, actualEndDate).then((source) => {
|
this.service.fetchDashboardStationFrom(this.bikePoint.id, actualStartDate, actualEndDate).then((source) => {
|
||||||
this.isLoadingFromSource = false;
|
this.isLoadingFromSource = false;
|
||||||
this.stationFromSource = source;
|
this.stationFromSource = this.setBikePointColorFromSource(source);
|
||||||
this.iterableFromSource = this.setBikePointColorFromSource(source);
|
this.iterableFromSource = source;
|
||||||
|
this.iterableFromSource.forEach(bikePoint => {
|
||||||
|
bikePoint.polyLineColor = 'red';
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ export class MapService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
drawLegend(): void {
|
drawLegend(): void {
|
||||||
this.legend.onAdd = map => {
|
this.legend.onAdd = () => {
|
||||||
const div = L.DomUtil.create('div', 'legend');
|
const div = L.DomUtil.create('div', 'legend');
|
||||||
div.innerHTML += `<h4>trips from/to bike station</h4>`;
|
div.innerHTML += `<h4>trips from/to bike station</h4>`;
|
||||||
div.innerHTML += `<i style="background: red"></i><span>rents with ${this.dashBoardBikePoint.commonName} as destination</span><br>`;
|
div.innerHTML += `<i style="background: red"></i><span>rents with ${this.dashBoardBikePoint.commonName} as destination</span><br>`;
|
||||||
|
Loading…
Reference in New Issue
Block a user