Creating stats page
This commit is contained in:
parent
57c039eac8
commit
4402011081
|
@ -13,9 +13,11 @@
|
|||
"@oceanprotocol/typographies": "^0.1.0",
|
||||
"@svgr/webpack": "^7.0.0",
|
||||
"axios": "^1.1.3",
|
||||
"chart.js": "^4.3.0",
|
||||
"dotenv": "^16.0.3",
|
||||
"next": "12.3.1",
|
||||
"react": "18.2.0",
|
||||
"react-chartjs-2": "^5.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"swr": "^1.3.0",
|
||||
"tiny-relative-date": "^1.3.0"
|
||||
|
@ -2603,6 +2605,11 @@
|
|||
"@jridgewell/sourcemap-codec": "1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@kurkle/color": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz",
|
||||
"integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw=="
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "12.3.1",
|
||||
"license": "MIT"
|
||||
|
@ -3676,6 +3683,17 @@
|
|||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/chart.js": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.3.0.tgz",
|
||||
"integrity": "sha512-ynG0E79xGfMaV2xAHdbhwiPLczxnNNnasrmPEXriXsPJGjmhOBYzFVEsB65w2qMDz+CaBJJuJD0inE/ab/h36g==",
|
||||
"dependencies": {
|
||||
"@kurkle/color": "^0.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"pnpm": ">=7"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"dev": true,
|
||||
|
@ -6051,6 +6069,15 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-chartjs-2": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-5.2.0.tgz",
|
||||
"integrity": "sha512-98iN5aguJyVSxp5U3CblRLH67J8gkfyGNbiK3c+l1QI/G4irHMPQw44aEPmjVag+YKTyQ260NcF82GTQ3bdscA==",
|
||||
"peerDependencies": {
|
||||
"chart.js": "^4.1.1",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-dom": {
|
||||
"version": "18.2.0",
|
||||
"license": "MIT",
|
||||
|
@ -8432,6 +8459,11 @@
|
|||
"@jridgewell/sourcemap-codec": "1.4.14"
|
||||
}
|
||||
},
|
||||
"@kurkle/color": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz",
|
||||
"integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw=="
|
||||
},
|
||||
"@next/env": {
|
||||
"version": "12.3.1"
|
||||
},
|
||||
|
@ -9050,6 +9082,14 @@
|
|||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"chart.js": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.3.0.tgz",
|
||||
"integrity": "sha512-ynG0E79xGfMaV2xAHdbhwiPLczxnNNnasrmPEXriXsPJGjmhOBYzFVEsB65w2qMDz+CaBJJuJD0inE/ab/h36g==",
|
||||
"requires": {
|
||||
"@kurkle/color": "^0.3.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"dev": true,
|
||||
|
@ -10611,6 +10651,12 @@
|
|||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"react-chartjs-2": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-5.2.0.tgz",
|
||||
"integrity": "sha512-98iN5aguJyVSxp5U3CblRLH67J8gkfyGNbiK3c+l1QI/G4irHMPQw44aEPmjVag+YKTyQ260NcF82GTQ3bdscA==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-dom": {
|
||||
"version": "18.2.0",
|
||||
"requires": {
|
||||
|
|
|
@ -16,9 +16,11 @@
|
|||
"@oceanprotocol/typographies": "^0.1.0",
|
||||
"@svgr/webpack": "^7.0.0",
|
||||
"axios": "^1.1.3",
|
||||
"chart.js": "^4.3.0",
|
||||
"dotenv": "^16.0.3",
|
||||
"next": "12.3.1",
|
||||
"react": "18.2.0",
|
||||
"react-chartjs-2": "^5.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"swr": "^1.3.0",
|
||||
"tiny-relative-date": "^1.3.0"
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
import React from 'react'
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
BarElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend
|
||||
} from 'chart.js'
|
||||
import { Bar } from 'react-chartjs-2'
|
||||
|
||||
ChartJS.register(CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend)
|
||||
|
||||
export const options = {
|
||||
responsive: true,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: 'top' as const
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Chart.js Bar Chart'
|
||||
}
|
||||
}
|
||||
}
|
||||
// const options = {
|
||||
// legend: { display: false },
|
||||
// title: {
|
||||
// fontFamily: 'sans-serif',
|
||||
// display: true,
|
||||
// text: 'NFTS Published per week'
|
||||
// }
|
||||
// }
|
||||
|
||||
// const labels = ['January', 'February', 'March', 'April', 'May', 'June', 'July']
|
||||
|
||||
export const data = {
|
||||
labels: [],
|
||||
datasets: [
|
||||
{
|
||||
label: 'NFTS Published',
|
||||
data: {
|
||||
'2022-45': 19,
|
||||
'2022-46': 45,
|
||||
'2022-47': 33,
|
||||
'2022-48': 286,
|
||||
'2022-49': 96,
|
||||
'2022-50': 224,
|
||||
'2022-51': 84,
|
||||
'2022-52': 35,
|
||||
'2023-1': 65,
|
||||
'2023-2': 82,
|
||||
'2023-3': 59,
|
||||
'2023-4': 110,
|
||||
'2023-5': 153,
|
||||
'2023-6': 117,
|
||||
'2023-7': 121,
|
||||
'2023-8': 23,
|
||||
'2023-9': 37,
|
||||
'2023-10': 21,
|
||||
'2023-11': 2,
|
||||
'2023-12': 10,
|
||||
'2023-13': 7,
|
||||
'2023-14': 13,
|
||||
'2023-15': 0,
|
||||
'2023-16': 8,
|
||||
'2023-17': 11,
|
||||
'2023-18': 11,
|
||||
'2023-19': 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
return <Bar options={options} data={data} />
|
||||
}
|
Loading…
Reference in New Issue