Skip to content

Commit

Permalink
Remove google charts dependency (#4)
Browse files Browse the repository at this point in the history
* Update gitignore

* Remove google dep and add chart svgs

* Update spacing
  • Loading branch information
isoscelesxyz authored Mar 3, 2025
1 parent 4f09d83 commit 79f8abe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.island/dist
.DS_Store
42 changes: 4 additions & 38 deletions content/emissions.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Chart } from "react-google-charts";
import SVG from "react-inlinesvg";

# Emissions

Expand All @@ -25,43 +25,9 @@ providers.

## Emission Schedule

<Chart
chartType="LineChart"
data={[
["Week", "LP Emissions", "veRebase (@50% locking rate)", "Total Supply"],
["1", 15, 0, 400],
["50", 9.1, 2, 1000],
["100", 5.5, 1.5, 1500],
["150", 3.3, 1, 1700],
["200", 2, 0.5, 1800],
]}
options={{
title: "$VELO Emissions (M)",
curveType: "function",
aggregationTarget: "series",
selectionMode: "multiple",
legend: { position: "top", textStyle: { color: "#666" } },
series: {
0: { targetAxisIndex: 0 },
1: { targetAxisIndex: 0 },
2: { targetAxisIndex: 1 },
},
vAxes: {
1: { title: "Total Supply", titleTextStyle: { color: "#666" } },
0: { title: "Epoch Distribution", titleTextStyle: { color: "#666" } },
},
hAxis: {
title: "Week",
titleTextStyle: { color: "#000" },
},
backgroundColor: "#ffffff",
lineWidth: 3,
colors: ["#79F8DB", "#2180DF", "#EA1000", "#59BFD8", "#0281FF"],
legend: { textStyle: { color: "#666" } },
titleTextStyle: { color: "#666" },
}}
width={"100%"}
height={"600px"}
<SVG
src="/svg/docs/chart-emissions.svg"
className="w-full max-w-full h-auto mt-4"
/>

## Emission Rewards
Expand Down
32 changes: 4 additions & 28 deletions content/feesandbribes.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Chart } from "react-google-charts";
import SVG from "react-inlinesvg";

# Rewards

Expand Down Expand Up @@ -35,31 +35,7 @@ An example of incentives, voting, and rewards claim timeline:
- Voters vote for their preferred pools
- Once the next epoch arrives (the following Thursday), users are able to claim rewards

<Chart
chartType="Timeline"
data={[
[
{ type: "string", id: "Voting Round" },
{ type: "string", id: "Action" },
{ type: "date", id: "Start" },
{ type: "date", id: "End" },
],
["Round #1", "Incentives Deposited, Votes Cast", new Date(2022, 5, 2), new Date(2022, 5, 8, 23, 59)],
["Round #1", "Rewards Claimable", new Date(2022, 5, 9), new Date(2022, 5, 30)],

["Round #2", "Incentives Deposited, Votes Cast", new Date(2022, 5, 9), new Date(2022, 5, 15, 23, 59)],
["Round #2", "Rewards Claimable", new Date(2022, 5, 16), new Date(2022, 5, 30)],

["Round #3", "Incentives Deposited, Votes Cast", new Date(2022, 5, 16), new Date(2022, 5, 22, 23, 59)],
["Round #3", "Rewards Claimable", new Date(2022, 5, 23), new Date(2022, 5, 30)],

]}
options={{
title: "Incentives, Voting and Rewards Timeline",
colors: [
'#79F8DB', '#2180DF', '#EA1000', '#871000', '#59BFD8', '#0281FF',
'#FBBF42', '#EDE7DB'
],
}}
width={"100%"}
<SVG
src="/svg/docs/chart-feesbribes.svg"
className="w-full max-w-full h-auto mt-4"
/>
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
},
"peerDependencies": {
"flowbite-react": "^0.4.11",
"react-google-charts": "^4.0.0",
"react-inlinesvg": "^4.1.3",
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react-dom": "^18.0.0",
"react-inlinesvg": "^4.1.3"
}
}
9 changes: 0 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2528,15 +2528,6 @@ micromark-extension-mdxjs@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/micromark-extension-mdxjs/-/micromark-extension-mdxjs-1.0.1.tgz#f78d4671678d16395efeda85170c520ee795ded8"
integrity sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q==
dependencies:
acorn "^8.0.0"
acorn-jsx "^5.0.0"
micromark-extension-mdx-expression "^1.0.0"
micromark-extension-mdx-jsx "^1.0.0"
micromark-extension-mdx-md "^1.0.0"
micromark-extension-mdxjs-esm "^1.0.0"
micromark-util-combine-extensions "^1.0.0"
micromark-util-types "^1.0.0"

micromark-factory-destination@^1.0.0:
version "1.1.0"
Expand Down

0 comments on commit 79f8abe

Please sign in to comment.