Skip to content

Commit e80543d

Browse files
authored
Merge pull request #12952 from ethereum/performance-chartjs
performance: replace recharts charting lib with Chart.js
2 parents 2a1dec2 + 12ce1ac commit e80543d

File tree

13 files changed

+1627
-515
lines changed

13 files changed

+1627
-515
lines changed

.storybook/i18next.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const ns = [
1919
"page-learn",
2020
"page-upgrades",
2121
"page-developers-index",
22+
"page-what-is-ethereum",
2223
] as const
2324
const supportedLngs = Object.keys(baseLocales)
2425

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
"@emotion/styled": "^11.11.0",
3535
"@radix-ui/react-navigation-menu": "^1.1.4",
3636
"@socialgouv/matomo-next": "^1.8.0",
37+
"chart.js": "^4.4.2",
38+
"chartjs-plugin-datalabels": "^2.2.0",
3739
"embla-carousel-react": "^7.0.0",
3840
"ethereum-blockies-base64": "^1.0.2",
3941
"framer-motion": "^10.13.0",
@@ -50,14 +52,14 @@
5052
"prism-react-renderer": "1.1.0",
5153
"prismjs": "^1.27.0",
5254
"react": "^18.2.0",
55+
"react-chartjs-2": "^5.2.0",
5356
"react-dom": "^18.2.0",
5457
"react-emoji-render": "^2.0.1",
5558
"react-i18next": "^13.3.1",
5659
"react-icons": "^4.10.1",
5760
"react-lite-youtube-embed": "^2.4.0",
5861
"react-select": "5.8.0",
5962
"reading-time": "^1.5.0",
60-
"recharts": "^2.7.3",
6163
"remark-gfm": "^3.0.1",
6264
"yaml-loader": "^0.8.0"
6365
},

src/components/EnergyConsumptionChart.tsx

Lines changed: 0 additions & 244 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Meta, StoryObj } from "@storybook/react"
2+
3+
import ChartComponent from "."
4+
5+
const meta = {
6+
title: "Molecules / Display Content / Charts / Energy Consumption",
7+
component: ChartComponent,
8+
} satisfies Meta<typeof ChartComponent>
9+
10+
export default meta
11+
12+
const data = {}
13+
14+
export const Basic: StoryObj<typeof meta> = {
15+
args: {
16+
data,
17+
},
18+
}

0 commit comments

Comments
 (0)