Skip to content

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

Merge remote-tracking branch 'origin/release/10.6' into dev

ulfertsc7d1218762e3
diff --cc frontend/src/app/modules/work-package-graphs/embedded/wp-embedded-graph.component.ts
index fdb5e80a60e,005263dcf4f..52f4252c11c
--- a/frontend/src/app/modules/work-package-graphs/embedded/wp-embedded-graph.component.ts
+++ b/frontend/src/app/modules/work-package-graphs/embedded/wp-embedded-graph.component.ts
@@@ -96,12 -96,36 +96,17 @@@ export class WorkPackageEmbeddedGraphCo
legend: {
// Only display legends if more than one dataset is provided.
display: this.datasets.length > 1
+ },
+ plugins: {
+ datalabels: {
- align :this.chartType === 'bar' ? 'top' :'center',
++ align: this.chartType === 'bar' ? 'top' : 'center',
+ }
- }
- };
- let chartTypeDefaults:ChartOptions = {};
-
- if (this.chartType === 'horizontalBar') {
- chartTypeDefaults = {
- scales: {
- xAxes: [{
- stacked: true,
- ticks: {
- callback: (value:number) => {
- if (Math.floor(value) === value) {
- return value;
- } else {
- return 0;
- }
- }
- }
- }],
- yAxes:
- [{
- stacked: true
- }]
- }
- };
+ }
+ };
+
+ let chartTypeDefaults:ChartOptions = {scales:{}};
+ if (this.chartType === 'horizontalBar' || this.chartType === 'bar' ) {
+ this.setChartAxesValues(chartTypeDefaults);
}
this.chartOptions = Object.assign({}, defaults, chartTypeDefaults, this.inputChartOptions);