Skip to content

Commit dcdaf17

Browse files
committed
Update chart options in MetricsViewer.vue
1 parent 0ef6ac3 commit dcdaf17

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

src/components/MetricsViewer.vue

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h1>GitHub Copilot Business Metrics Viewer</h1>
44

55
<h2>Acceptance rate (%)</h2>
6-
<Bar :data="acceptanceRateChartData" :options="totalActiveUsersChartOptions" />
6+
<Bar :data="acceptanceRateChartData" :options="chartOptions" />
77

88
<h2>Total Suggestions Count | Total Acceptances Count</h2>
99
<Line :data="totalSuggestionsAndAcceptanceChartData" :options="chartOptions" />
@@ -14,7 +14,6 @@
1414
<h2>Total Active Users</h2>
1515
<Bar :data="totalActiveUsersChartData" :options="totalActiveUsersChartOptions" />
1616

17-
1817
</div>
1918
</template>
2019

@@ -60,21 +59,26 @@ export default defineComponent({
6059
//Acceptance Rate
6160
const acceptanceRateChartData = ref<{ labels: string[]; datasets: any[] }>({ labels: [], datasets: [] });
6261
63-
6462
//Total Suggestions Count | Total Acceptance Counts
6563
const totalSuggestionsAndAcceptanceChartData = ref<{ labels: string[]; datasets: any[] }>({ labels: [], datasets: [] });
6664
6765
//Total Lines Suggested | Total Lines Accepted
6866
const chartData = ref<{ labels: string[]; datasets: any[] }>({ labels: [], datasets: [] });
6967
7068
//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: [] });
7470
7571
const chartOptions = {
7672
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+
},
7882
};
7983
8084
const totalActiveUsersChartOptions = {
@@ -87,7 +91,15 @@ export default defineComponent({
8791
stepSize: 1
8892
}
8993
}
90-
}
94+
},
95+
layout: {
96+
padding: {
97+
left: 50,
98+
right: 50,
99+
top: 50,
100+
bottom: 50
101+
}
102+
},
91103
};
92104
93105
getGitHubCopilotMetricsApi().then(data => {

0 commit comments

Comments
 (0)