diff --git a/frontend/components/metrics/CategoryDistribution.vue b/frontend/components/metrics/CategoryDistribution.vue
deleted file mode 100644
index 36135399..00000000
--- a/frontend/components/metrics/CategoryDistribution.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
diff --git a/frontend/components/metrics/LabelDistribution.vue b/frontend/components/metrics/LabelDistribution.vue
index 855c5cf8..965a7217 100644
--- a/frontend/components/metrics/LabelDistribution.vue
+++ b/frontend/components/metrics/LabelDistribution.vue
@@ -28,6 +28,7 @@
import Vue, { PropType } from 'vue'
import BarChart from '@/components/metrics/ChartBar.vue'
import { Distribution } from '~/domain/models/metrics/metrics'
+import { LabelDTO } from '~/services/application/label/labelData'
export default Vue.extend({
components: {
@@ -44,13 +45,18 @@ export default Vue.extend({
type: Object as PropType,
required: true
},
- colorMapping: {
- type: Object,
- default: () => {},
- }
+ labelTypes: {
+ type: Array as PropType,
+ default: () => [],
+ required: true,
+ },
},
computed: {
+ colorMapping(): {[text: string]: string} {
+ return Object.fromEntries(this.labelTypes.map((labelType) => [labelType.text, labelType.backgroundColor]))
+ },
+
chartJSFormat(): any {
const data: {[user: string]: {labels: string[], datasets: any[]}} = {}
for (const user in this.distribution) {
diff --git a/frontend/components/metrics/RelationDistribution.vue b/frontend/components/metrics/RelationDistribution.vue
deleted file mode 100644
index c334b40e..00000000
--- a/frontend/components/metrics/RelationDistribution.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
diff --git a/frontend/components/metrics/SpanDistribution.vue b/frontend/components/metrics/SpanDistribution.vue
deleted file mode 100644
index ef34a328..00000000
--- a/frontend/components/metrics/SpanDistribution.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
diff --git a/frontend/pages/projects/_id/metrics/index.vue b/frontend/pages/projects/_id/metrics/index.vue
index 901d7a2c..3e5aaeff 100644
--- a/frontend/pages/projects/_id/metrics/index.vue
+++ b/frontend/pages/projects/_id/metrics/index.vue
@@ -4,29 +4,37 @@
-
+
-
+
-
+