3
3
<h1 >GitHub Copilot Business Metrics Viewer</h1 >
4
4
5
5
<h2 >Acceptance rate (%)</h2 >
6
- <Bar :data =" acceptanceRateChartData" :options =" totalActiveUsersChartOptions " />
6
+ <Bar :data =" acceptanceRateChartData" :options =" chartOptions " />
7
7
8
8
<h2 >Total Suggestions Count | Total Acceptances Count</h2 >
9
9
<Line :data =" totalSuggestionsAndAcceptanceChartData" :options =" chartOptions" />
14
14
<h2 >Total Active Users</h2 >
15
15
<Bar :data =" totalActiveUsersChartData" :options =" totalActiveUsersChartOptions" />
16
16
17
-
18
17
</div >
19
18
</template >
20
19
@@ -60,21 +59,26 @@ export default defineComponent({
60
59
// Acceptance Rate
61
60
const acceptanceRateChartData = ref <{ labels: string []; datasets: any [] }>({ labels: [], datasets: [] });
62
61
63
-
64
62
// Total Suggestions Count | Total Acceptance Counts
65
63
const totalSuggestionsAndAcceptanceChartData = ref <{ labels: string []; datasets: any [] }>({ labels: [], datasets: [] });
66
64
67
65
// Total Lines Suggested | Total Lines Accepted
68
66
const chartData = ref <{ labels: string []; datasets: any [] }>({ labels: [], datasets: [] });
69
67
70
68
// Total Active Users
71
- const totalActiveUsersChartData = ref <{ labels: string []; datasets: any [] }>({ labels: [], datasets: [] });
72
-
73
-
69
+ const totalActiveUsersChartData = ref <{ labels: string []; datasets: any [] }>({ labels: [], datasets: [] });
74
70
75
71
const chartOptions = {
76
72
responsive: true ,
77
- maintainAspectRatio: true
73
+ maintainAspectRatio: true ,
74
+ layout: {
75
+ padding: {
76
+ left: 40 ,
77
+ right: 40 ,
78
+ top: 20 ,
79
+ bottom: 40
80
+ }
81
+ },
78
82
};
79
83
80
84
const totalActiveUsersChartOptions = {
@@ -87,7 +91,15 @@ export default defineComponent({
87
91
stepSize: 1
88
92
}
89
93
}
90
- }
94
+ },
95
+ layout: {
96
+ padding: {
97
+ left: 50 ,
98
+ right: 50 ,
99
+ top: 50 ,
100
+ bottom: 50
101
+ }
102
+ },
91
103
};
92
104
93
105
getGitHubCopilotMetricsApi ().then (data => {
0 commit comments