Skip to content

Commit f948c01

Browse files
committed
fix token distribution categories
1 parent b9f07e0 commit f948c01

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

src/lib/components/TokenDistributionChart.svelte

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,31 @@
2525
2626
// Token distribution data
2727
let data: ChartData<"doughnut"> = {
28-
labels: ["Ecosystem", "Team", "Treasury", "Advisors", "Private Sale"],
28+
labels: [
29+
"Validator Rewards",
30+
"Team",
31+
"Launchpad",
32+
"ISPO",
33+
"Ecosystem",
34+
"Foundation",
35+
"Yield Farm APY",
36+
"Promo Airdrop",
37+
"Advisors",
38+
],
2939
datasets: [
3040
{
31-
data: [40, 20, 20, 10, 10], // Percentages based on the chart
32-
backgroundColor: ["#3d615e", "#5a8a86", "#77b3ae", "#8fbcb8", "#A3C7C4"],
41+
data: [50, 15, 11, 10, 5, 5, 2, 1, 1], // Percentages based on the chart
42+
backgroundColor: [
43+
"#3d615e",
44+
"#4a726f",
45+
"#578380",
46+
"#649491",
47+
"#71a5a2",
48+
"#7eb6b3",
49+
"#8bc7c4",
50+
"#98d8d5",
51+
"#A3C7C4",
52+
],
3353
borderWidth: 4,
3454
hoverOffset: 15,
3555
},
@@ -39,9 +59,11 @@
3959
let options: ChartOptions<"doughnut"> = $derived.by(() => ({
4060
responsive: true,
4161
maintainAspectRatio: false,
62+
4263
plugins: {
4364
legend: {
4465
position: size === "sm" ? "bottom" : "right",
66+
align: "center",
4567
onClick: (e, legendItem, legend) => {},
4668
onHover: (e, legendItem, legend) => {
4769
const index = legendItem.index;
@@ -74,7 +96,9 @@
7496
size: 14,
7597
},
7698
color: "#EFF5F5",
77-
padding: 20,
99+
padding: 10,
100+
boxWidth: 12,
101+
boxHeight: 12,
78102
generateLabels: (chart) => {
79103
const data = chart.data;
80104
if (data.labels && data.datasets.length) {
@@ -111,9 +135,9 @@
111135
layout: {
112136
padding: {
113137
top: 0,
114-
right: 20,
138+
right: 0,
115139
bottom: 0,
116-
left: 20,
140+
left: 0,
117141
},
118142
},
119143
onHover: (event, elements, chart) => {

src/lib/components/Tokenomics.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
as follows:
4949
</p>
5050
<div
51-
class="max-w-[200px] h-[400px] xs:h-[400px] xs:w-[200px] sm:max-w-none sm:w-[300px] sm:h-[500px] md:w-[450px] md:h-[300px] relative self-center"
51+
class="max-w-[200px] h-[450px] max-h-[450px] xs:h-[450px] xs:w-[200px] sm:max-w-none sm:w-[300px] sm:h-[500px] md:w-[400px] md:h-[300px] lg:w-[450px] relative self-center"
5252
>
5353
<TokenDistributionChart />
5454
</div>

0 commit comments

Comments
 (0)