add chart with the features done
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
withDefaults(defineProps<{ color: string }>(), {
|
withDefaults(defineProps<{ color?: string }>(), {
|
||||||
color: 'var(--primary-color)'
|
color: 'var(--primary-color)'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import BaseIcon from './BaseIcon.vue'
|
import BaseIcon from './BaseIcon.vue'
|
||||||
|
|
||||||
withDefaults(defineProps<{ color: string }>(), {
|
withDefaults(defineProps<{ color?: string }>(), {
|
||||||
color: 'var(--primary-color)'
|
color: 'var(--primary-color)'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import BaseIcon from './BaseIcon.vue'
|
import BaseIcon from './BaseIcon.vue'
|
||||||
|
|
||||||
withDefaults(defineProps<{ color: string }>(), {
|
withDefaults(defineProps<{ color?: string }>(), {
|
||||||
color: 'var(--primary-color)'
|
color: 'var(--primary-color)'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import BaseIcon from './BaseIcon.vue'
|
import BaseIcon from './BaseIcon.vue'
|
||||||
|
|
||||||
withDefaults(defineProps<{ color: string }>(), {
|
withDefaults(defineProps<{ color?: string }>(), {
|
||||||
color: 'var(--primary-color)'
|
color: 'var(--primary-color)'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import BaseIcon from './BaseIcon.vue'
|
import BaseIcon from './BaseIcon.vue'
|
||||||
|
|
||||||
withDefaults(defineProps<{ color: string }>(), {
|
withDefaults(defineProps<{ color?: string }>(), {
|
||||||
color: 'var(--primary-color)'
|
color: 'var(--primary-color)'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import FlowHypothesis from '@/modules/article/FlowHypothesis.vue'
|
|||||||
import FlowIntro from '@/modules/article/FlowIntro.vue'
|
import FlowIntro from '@/modules/article/FlowIntro.vue'
|
||||||
import FeatureSteps from '@/modules/feature/FeatureSteps.vue'
|
import FeatureSteps from '@/modules/feature/FeatureSteps.vue'
|
||||||
import FlowDashboard from '@/modules/feature/FlowDashboard.vue'
|
import FlowDashboard from '@/modules/feature/FlowDashboard.vue'
|
||||||
|
import SimulationChart from '@/modules/simulation/SimulationChart.vue'
|
||||||
import SimulationControls from '@/modules/simulation/SimulationControls.vue'
|
import SimulationControls from '@/modules/simulation/SimulationControls.vue'
|
||||||
import SimulationDashboard from '@/modules/simulation/SimulationDashboard.vue'
|
import SimulationDashboard from '@/modules/simulation/SimulationDashboard.vue'
|
||||||
</script>
|
</script>
|
||||||
@@ -21,6 +22,7 @@ import SimulationDashboard from '@/modules/simulation/SimulationDashboard.vue'
|
|||||||
<SeparatorIcon />
|
<SeparatorIcon />
|
||||||
<SimulationControls />
|
<SimulationControls />
|
||||||
<SimulationDashboard />
|
<SimulationDashboard />
|
||||||
|
<SimulationChart />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ onMounted(() => featureStore.initBoard(NUMBER_OF_FEATURES))
|
|||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -169,21 +169,21 @@ const getOverburdenMultiplicator = (tasksInParallel: number) => {
|
|||||||
case 1:
|
case 1:
|
||||||
return 1
|
return 1
|
||||||
case 2:
|
case 2:
|
||||||
return 1.2
|
|
||||||
case 3:
|
|
||||||
return 1.5
|
return 1.5
|
||||||
|
case 3:
|
||||||
|
return 5
|
||||||
case 4:
|
case 4:
|
||||||
return 1.8
|
return 8
|
||||||
case 5:
|
case 5:
|
||||||
return 2.6
|
return 13
|
||||||
case 6:
|
// case 6:
|
||||||
return 4
|
// return 4
|
||||||
case 7:
|
// case 7:
|
||||||
return 5.5
|
// return 5.5
|
||||||
case 8:
|
// case 8:
|
||||||
return 7
|
// return 7
|
||||||
default:
|
default:
|
||||||
return 10
|
return 25
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
59
src/modules/simulation/SimulationChart.vue
Normal file
59
src/modules/simulation/SimulationChart.vue
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { useSimulationStore } from '@/modules/simulation/simulation-store'
|
||||||
|
import chartXkcd from 'chart.xkcd'
|
||||||
|
import { onMounted } from 'vue'
|
||||||
|
|
||||||
|
const simulationStore = useSimulationStore()
|
||||||
|
|
||||||
|
const reloadGraph = () => {
|
||||||
|
if (
|
||||||
|
simulationStore.dashboards.length === 0 ||
|
||||||
|
simulationStore.dashboards.length > 15
|
||||||
|
) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const svg = document.querySelector('.chart')
|
||||||
|
const config = {
|
||||||
|
title: 'Features done per day',
|
||||||
|
xLabel: 'days',
|
||||||
|
yLabel: 'features done',
|
||||||
|
data: {
|
||||||
|
labels: Array.from(
|
||||||
|
{
|
||||||
|
length: Math.max(
|
||||||
|
...simulationStore.dashboards.map(
|
||||||
|
(dashboard) => dashboard.meta.totalDays
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
(_, index) => index + 1
|
||||||
|
),
|
||||||
|
datasets: simulationStore.dashboards.map((dashboard, index) => ({
|
||||||
|
label: `${dashboard.analysis.strategy} ${index + 1}`,
|
||||||
|
data: dashboard.meta.featuresDonePerDay
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
showLegend: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new chartXkcd.Line(svg, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
// watch(simulationStore.dashboards, reloadGraph)
|
||||||
|
onMounted(reloadGraph)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="simulation-chart">
|
||||||
|
<svg class="chart"></svg>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.chart {
|
||||||
|
width: 80vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,7 +9,7 @@ const strategies: Strategy[] = ['push', 'pull', 'push-dps', 'pull-dps']
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="simulation-dashboard">
|
<div class="simulation-dashboard">
|
||||||
<h3>Simulation dashboard</h3>
|
<h3>Dashboard</h3>
|
||||||
<h4>
|
<h4>
|
||||||
{{ simulationStore.simulationsDone }}/{{
|
{{ simulationStore.simulationsDone }}/{{
|
||||||
simulationStore.requestedSimulation
|
simulationStore.requestedSimulation
|
||||||
@@ -19,7 +19,7 @@ const strategies: Strategy[] = ['push', 'pull', 'push-dps', 'pull-dps']
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th>mean values</th>
|
||||||
<th class="numeric">push</th>
|
<th class="numeric">push</th>
|
||||||
<th class="numeric">pull</th>
|
<th class="numeric">pull</th>
|
||||||
<th class="numeric">push and DPS</th>
|
<th class="numeric">push and DPS</th>
|
||||||
@@ -28,13 +28,19 @@ const strategies: Strategy[] = ['push', 'pull', 'push-dps', 'pull-dps']
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>lead time</td>
|
<td>Total days</td>
|
||||||
|
<td class="numeric" v-for="strategy in strategies" :key="strategy">
|
||||||
|
{{ simulationStore.meanTotalDays(strategy) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Lead time</td>
|
||||||
<td class="numeric" v-for="strategy in strategies" :key="strategy">
|
<td class="numeric" v-for="strategy in strategies" :key="strategy">
|
||||||
{{ simulationStore.meanLeadTime(strategy) }}
|
{{ simulationStore.meanLeadTime(strategy) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>takt time</td>
|
<td>Takt time</td>
|
||||||
<td class="numeric" v-for="strategy in strategies" :key="strategy">
|
<td class="numeric" v-for="strategy in strategies" :key="strategy">
|
||||||
{{ simulationStore.meanTaktTime(strategy) }}
|
{{ simulationStore.meanTaktTime(strategy) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -51,6 +57,12 @@ const strategies: Strategy[] = ['push', 'pull', 'push-dps', 'pull-dps']
|
|||||||
{{ simulationStore.meanQuality(strategy) }}
|
{{ simulationStore.meanQuality(strategy) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Team work exp.</td>
|
||||||
|
<td class="numeric" v-for="strategy in strategies" :key="strategy">
|
||||||
|
{{ simulationStore.meanTeamWorkExperience(strategy) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import { Dashboard, Meta } from '@/store-type'
|
|||||||
import { getRound } from '@/utils'
|
import { getRound } from '@/utils'
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
// Get features done per day to plot it
|
|
||||||
|
|
||||||
type Mean = {
|
type Mean = {
|
||||||
leadTimeSum: number
|
leadTimeSum: number
|
||||||
taktTimeSum: number
|
taktTimeSum: number
|
||||||
complexitySum: number
|
complexitySum: number
|
||||||
qualityIssueSum: number
|
qualityIssueSum: number
|
||||||
|
teamWorkExperienceSum: number
|
||||||
|
totalDaysSum: number
|
||||||
simulations: number
|
simulations: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,6 +26,8 @@ const newMean = (): Mean => ({
|
|||||||
taktTimeSum: 0,
|
taktTimeSum: 0,
|
||||||
complexitySum: 0,
|
complexitySum: 0,
|
||||||
qualityIssueSum: 0,
|
qualityIssueSum: 0,
|
||||||
|
teamWorkExperienceSum: 0,
|
||||||
|
totalDaysSum: 0,
|
||||||
simulations: 0
|
simulations: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -102,6 +104,9 @@ export const useSimulationStore = defineStore('dashboard', {
|
|||||||
dashboard.meta.totalDays / newState.features.length
|
dashboard.meta.totalDays / newState.features.length
|
||||||
this.mean[strategy].complexitySum += dashboard.analysis.meanComplexity
|
this.mean[strategy].complexitySum += dashboard.analysis.meanComplexity
|
||||||
this.mean[strategy].qualityIssueSum += dashboard.analysis.meanQualityIssue
|
this.mean[strategy].qualityIssueSum += dashboard.analysis.meanQualityIssue
|
||||||
|
this.mean[strategy].teamWorkExperienceSum +=
|
||||||
|
dashboard.meta.teamWorkExperience
|
||||||
|
this.mean[strategy].totalDaysSum += dashboard.meta.totalDays
|
||||||
this.mean[strategy].simulations++
|
this.mean[strategy].simulations++
|
||||||
},
|
},
|
||||||
async multiSimulation(simulations: number, strategy: Strategy) {
|
async multiSimulation(simulations: number, strategy: Strategy) {
|
||||||
@@ -139,6 +144,16 @@ export const useSimulationStore = defineStore('dashboard', {
|
|||||||
getRound(
|
getRound(
|
||||||
state.mean[strategy].qualityIssueSum,
|
state.mean[strategy].qualityIssueSum,
|
||||||
state.mean[strategy].simulations
|
state.mean[strategy].simulations
|
||||||
|
),
|
||||||
|
meanTeamWorkExperience: (state) => (strategy: Strategy) =>
|
||||||
|
getRound(
|
||||||
|
state.mean[strategy].teamWorkExperienceSum,
|
||||||
|
state.mean[strategy].simulations
|
||||||
|
),
|
||||||
|
meanTotalDays: (state) => (strategy: Strategy) =>
|
||||||
|
getRound(
|
||||||
|
state.mean[strategy].totalDaysSum,
|
||||||
|
state.mean[strategy].simulations
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user