OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
fix colors on different graphs
Behrokh Satarnejad7d3d584257bf
diff --git a/frontend/src/app/shared/components/work-package-graphs/embedded/wp-embedded-graph.component.ts b/frontend/src/app/shared/components/work-package-graphs/embedded/wp-embedded-graph.component.tsindex 280cdbf36bf..2c177a0cd60 100644--- a/frontend/src/app/shared/components/work-package-graphs/embedded/wp-embedded-graph.component.ts+++ b/frontend/src/app/shared/components/work-package-graphs/embedded/wp-embedded-graph.component.ts@@ -100,6 +100,7 @@ export class WorkPackageEmbeddedGraphComponent {protected setChartOptions() {const bodyFontColor= getComputedStyle(document.body).getPropertyValue('--body-font-color');const gridLineColor= getComputedStyle(document.body).getPropertyValue('--borderColor-default');+ const backdropColor= getComputedStyle(document.body).getPropertyValue('--overlay-backdrop-bgColor');const defaults:ChartOptions = {color: bodyFontColor,@@ -107,6 +108,21 @@ export class WorkPackageEmbeddedGraphComponent {maintainAspectRatio: false,indexAxis: this.chartType === 'horizontalBar' ? 'y' : 'x',scales: {+ r: {+ angleLines: {+ color: this.isRadarChart() ? gridLineColor : 'transparent',+ },+ grid: {+ color: this.isRadarChart() ? gridLineColor : 'transparent',+ },+ pointLabels: {+ color: this.isRadarChart() ? bodyFontColor : 'transparent',+ },+ ticks: {+ color: this.isRadarChart() ? bodyFontColor : 'transparent',+ backdropColor: this.isRadarChart() ? backdropColor : 'transparent',+ },+ },y: {ticks: {color: this.isBarChart() ? bodyFontColor : 'transparent',@@ -114,6 +130,9 @@ export class WorkPackageEmbeddedGraphComponent {grid: {color: this.isBarChart() ? gridLineColor : 'transparent',},+ border: {+ color: this.isBarChart() ? bodyFontColor : 'transparent',+ },},x: {ticks: {@@ -122,6 +141,9 @@ export class WorkPackageEmbeddedGraphComponent {grid: {color: this.isBarChart() ? gridLineColor : 'transparent',},+ border: {+ color: this.isBarChart() ? bodyFontColor : 'transparent',+ },},},plugins: {@@ -191,4 +213,8 @@ export class WorkPackageEmbeddedGraphComponent {private isBarChart() {return this.chartType === 'bar' || this.chartType === 'horizontalBar' || this.chartType === 'line';}++ private isRadarChart() {+ return this.chartType === 'radar' || this.chartType === 'polarArea';+ }}