diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-06-30 20:15:14 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-06-30 20:15:14 +0900 |
| commit | ed41d542bb8894f2eaca42cd7cc08246089e0490 (patch) | |
| tree | 286c711b951d5a359e0938c84a9893a92e15be64 /packages/client/src/components | |
| parent | chore(client): tweak ui (diff) | |
| download | misskey-ed41d542bb8894f2eaca42cd7cc08246089e0490.tar.gz misskey-ed41d542bb8894f2eaca42cd7cc08246089e0490.tar.bz2 misskey-ed41d542bb8894f2eaca42cd7cc08246089e0490.zip | |
chore(client): tweak ui
Diffstat (limited to 'packages/client/src/components')
| -rw-r--r-- | packages/client/src/components/instance-stats.vue | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/client/src/components/instance-stats.vue b/packages/client/src/components/instance-stats.vue index 9a1769a3a1..1646a7e93e 100644 --- a/packages/client/src/components/instance-stats.vue +++ b/packages/client/src/components/instance-stats.vue @@ -112,21 +112,21 @@ function createDoughnut(chartEl, tooltip, data) { labels: data.map(x => x.name), datasets: [{ backgroundColor: data.map(x => x.color), + borderWidth: 0, + spacing: 4, + hoverOffset: 4, data: data.map(x => x.value), }], }, options: { layout: { padding: { - left: 8, - right: 8, - top: 8, - bottom: 8, + left: 16, + right: 16, + top: 16, + bottom: 16, }, }, - interaction: { - intersect: false, - }, plugins: { legend: { display: false, @@ -145,9 +145,9 @@ function createDoughnut(chartEl, tooltip, data) { } onMounted(() => { - os.apiGet('federation/stats').then(fedStats => { - createDoughnut(subDoughnutEl, externalTooltipHandler1, fedStats.topSubInstances.map(x => ({ name: x.host, color: x.themeColor, value: x.followersCount })).concat([{ name: '(other)', color: '#808080', value: fedStats.otherFollowersCount }])); - createDoughnut(pubDoughnutEl, externalTooltipHandler1, fedStats.topPubInstances.map(x => ({ name: x.host, color: x.themeColor, value: x.followingCount })).concat([{ name: '(other)', color: '#808080', value: fedStats.otherFollowingCount }])); + os.apiGet('federation/stats', { limit: 15 }).then(fedStats => { + createDoughnut(subDoughnutEl, externalTooltipHandler1, fedStats.topSubInstances.map(x => ({ name: x.host, color: x.themeColor, value: x.followersCount })).concat([{ name: '(other)', color: '#80808080', value: fedStats.otherFollowersCount }])); + createDoughnut(pubDoughnutEl, externalTooltipHandler1, fedStats.topPubInstances.map(x => ({ name: x.host, color: x.themeColor, value: x.followingCount })).concat([{ name: '(other)', color: '#80808080', value: fedStats.otherFollowingCount }])); }); }); </script> |