diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cf093428..7bc516d0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ the detailed section referring to by linking pull requests or issues. #### Fixed +- Fix Dashboard chart colors based on theme + ## [v0.0.1-milestone-8-sovity8] 23.06.2023 ### Overview diff --git a/src/app/routes/connector-ui/dashboard-page/dashboard-page/dashboard-page-data.service.ts b/src/app/routes/connector-ui/dashboard-page/dashboard-page/dashboard-page-data.service.ts index d5d0a360f..9c39e9ccc 100644 --- a/src/app/routes/connector-ui/dashboard-page/dashboard-page/dashboard-page-data.service.ts +++ b/src/app/routes/connector-ui/dashboard-page/dashboard-page/dashboard-page-data.service.ts @@ -1,6 +1,7 @@ import {Injectable} from '@angular/core'; import {Observable, combineLatest, merge, of, scan} from 'rxjs'; import {map} from 'rxjs/operators'; +import {ActiveFeatureSet} from '../../../../core/config/active-feature-set'; import {CatalogApiUrlService} from '../../../../core/services/api/catalog-api-url.service'; import {ContractOfferService} from '../../../../core/services/api/contract-offer.service'; import { @@ -22,6 +23,7 @@ import {DashboardPageData, defaultDashboardData} from './dashboard-page-data'; @Injectable({providedIn: 'root'}) export class DashboardPageDataService { constructor( + private activeFeatureSet: ActiveFeatureSet, private catalogBrowserService: ContractOfferService, private contractDefinitionService: ContractDefinitionService, private contractAgreementService: ContractAgreementService, @@ -151,9 +153,15 @@ export class DashboardPageDataService { ); const colorsByState = new Map(); - colorsByState.set('IN_PROGRESS', '#7eb0d5'); - colorsByState.set('ERROR', '#fd7f6f'); - colorsByState.set('COMPLETED', '#b2e061'); + if (this.activeFeatureSet.hasMdsFields()) { + colorsByState.set('IN_PROGRESS', '#FFFF00'); + colorsByState.set('ERROR', '#FFA500'); + colorsByState.set('COMPLETED', '#9ACD32'); + } else { + colorsByState.set('IN_PROGRESS', '#7eb0d5'); + colorsByState.set('ERROR', '#fd7f6f'); + colorsByState.set('COMPLETED', '#b2e061'); + } const defaultColor = '#bd7ebe'; const amountsByState = states.map(