fix charts

This commit is contained in:
jejolare 2025-07-16 18:57:35 +07:00
parent c032f3e14f
commit 61f729928a
3 changed files with 23 additions and 24 deletions

38
package-lock.json generated
View file

@ -11,6 +11,7 @@
"@react-hook/window-size": "^3.1.1",
"@tanstack/react-table": "^8.21.3",
"antd": "^5.23.2",
"apexcharts": "^3.54.1",
"axios": "^1.4.0",
"decimal.js": "^10.4.3",
"echarts": "^5.5.1",
@ -23,7 +24,7 @@
"next-themes": "^0.2.1",
"node-fetch": "^3.3.1",
"react": "18.2.0",
"react-apexcharts": "^1.4.0",
"react-apexcharts": "^1.5.0",
"react-dom": "18.2.0",
"react-intersection-observer": "^9.10.3",
"sequelize": "^6.37.3",
@ -4958,6 +4959,11 @@
"license": "Apache-2.0",
"peer": true
},
"node_modules/@yr/monotone-cubic-spline": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@yr/monotone-cubic-spline/-/monotone-cubic-spline-1.0.3.tgz",
"integrity": "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA=="
},
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
@ -5199,12 +5205,11 @@
"license": "MIT"
},
"node_modules/apexcharts": {
"version": "3.41.0",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.41.0.tgz",
"integrity": "sha512-FJXA7NVjxs1q+ptR3b1I+pN8K/gWuXn+qLZjFz8EHvJOokdgcuwa/HSe5aC465HW/LWnrjWLSTsOQejQbQ42hQ==",
"license": "MIT",
"peer": true,
"version": "3.54.1",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.54.1.tgz",
"integrity": "sha512-E4et0h/J1U3r3EwS/WlqJCQIbepKbp6wGUmaAwJOMjHUP4Ci0gxanLa7FR3okx6p9coi4st6J853/Cb1NP0vpA==",
"dependencies": {
"@yr/monotone-cubic-spline": "^1.0.3",
"svg.draggable.js": "^2.2.2",
"svg.easing.js": "^2.0.0",
"svg.filter.js": "^2.0.2",
@ -11156,15 +11161,14 @@
}
},
"node_modules/react-apexcharts": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/react-apexcharts/-/react-apexcharts-1.4.0.tgz",
"integrity": "sha512-DrcMV4aAMrUG+n6412yzyATWEyCDWlpPBBhVbpzBC4PDeuYU6iF84SmExbck+jx5MUm4U5PM3/T307Mc3kzc9Q==",
"license": "MIT",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/react-apexcharts/-/react-apexcharts-1.5.0.tgz",
"integrity": "sha512-RwIqhYee8tT6WsDR9I15bhDuPitM+z/P092QPttFR5D57M21/WtYKHE9JQMbcz9bmF35rfDSym1SZuZ7AhidhQ==",
"dependencies": {
"prop-types": "^15.5.7"
"prop-types": "^15.8.1"
},
"peerDependencies": {
"apexcharts": "^3.18.0",
"apexcharts": "^3.41.0",
"react": ">=0.13"
}
},
@ -12578,7 +12582,6 @@
"resolved": "https://registry.npmjs.org/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz",
"integrity": "sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw==",
"license": "MIT",
"peer": true,
"dependencies": {
"svg.js": "^2.0.1"
},
@ -12591,7 +12594,6 @@
"resolved": "https://registry.npmjs.org/svg.easing.js/-/svg.easing.js-2.0.0.tgz",
"integrity": "sha512-//ctPdJMGy22YoYGV+3HEfHbm6/69LJUTAqI2/5qBvaNHZ9uUFVC82B0Pl299HzgH13rKrBgi4+XyXXyVWWthA==",
"license": "MIT",
"peer": true,
"dependencies": {
"svg.js": ">=2.3.x"
},
@ -12604,7 +12606,6 @@
"resolved": "https://registry.npmjs.org/svg.filter.js/-/svg.filter.js-2.0.2.tgz",
"integrity": "sha512-xkGBwU+dKBzqg5PtilaTb0EYPqPfJ9Q6saVldX+5vCRy31P6TlRCP3U9NxH3HEufkKkpNgdTLBJnmhDHeTqAkw==",
"license": "MIT",
"peer": true,
"dependencies": {
"svg.js": "^2.2.5"
},
@ -12616,15 +12617,13 @@
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/svg.js/-/svg.js-2.7.1.tgz",
"integrity": "sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA==",
"license": "MIT",
"peer": true
"license": "MIT"
},
"node_modules/svg.pathmorphing.js": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/svg.pathmorphing.js/-/svg.pathmorphing.js-0.1.3.tgz",
"integrity": "sha512-49HWI9X4XQR/JG1qXkSDV8xViuTLIWm/B/7YuQELV5KMOPtXjiwH4XPJvr/ghEDibmLQ9Oc22dpWpG0vUDDNww==",
"license": "MIT",
"peer": true,
"dependencies": {
"svg.js": "^2.4.0"
},
@ -12637,7 +12636,6 @@
"resolved": "https://registry.npmjs.org/svg.resize.js/-/svg.resize.js-1.4.3.tgz",
"integrity": "sha512-9k5sXJuPKp+mVzXNvxz7U0uC9oVMQrrf7cFsETznzUDDm0x8+77dtZkWdMfRlmbkEEYvUn9btKuZ3n41oNA+uw==",
"license": "MIT",
"peer": true,
"dependencies": {
"svg.js": "^2.6.5",
"svg.select.js": "^2.1.2"
@ -12651,7 +12649,6 @@
"resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-2.1.2.tgz",
"integrity": "sha512-tH6ABEyJsAOVAhwcCjF8mw4crjXSI1aa7j2VQR8ZuJ37H2MBUbyeqYr5nEO7sSN3cy9AR9DUwNg0t/962HlDbQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"svg.js": "^2.2.5"
},
@ -12664,7 +12661,6 @@
"resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-3.0.1.tgz",
"integrity": "sha512-h5IS/hKkuVCbKSieR9uQCj9w+zLHoPh+ce19bBYyqF53g6mnPB8sAtIbe1s9dh2S2fCmYX2xel1Ln3PJBbK4kw==",
"license": "MIT",
"peer": true,
"dependencies": {
"svg.js": "^2.6.5"
},

View file

@ -23,6 +23,7 @@
"@react-hook/window-size": "^3.1.1",
"@tanstack/react-table": "^8.21.3",
"antd": "^5.23.2",
"apexcharts": "^3.54.1",
"axios": "^1.4.0",
"decimal.js": "^10.4.3",
"echarts": "^5.5.1",
@ -35,7 +36,7 @@
"next-themes": "^0.2.1",
"node-fetch": "^3.3.1",
"react": "18.2.0",
"react-apexcharts": "^1.4.0",
"react-apexcharts": "^1.5.0",
"react-dom": "18.2.0",
"react-intersection-observer": "^9.10.3",
"sequelize": "^6.37.3",

View file

@ -135,7 +135,7 @@ function CandleChart(props: CandleChartProps) {
xAxis: {
type: 'category',
data: data0.categoryData,
// data: data0.categoryData,
boundaryGap: true,
axisLine: { onZero: false },
splitLine: {
@ -191,7 +191,7 @@ function CandleChart(props: CandleChartProps) {
{
name: 'Candle Chart',
type: 'candlestick',
data: data0.values,
data: candles,
itemStyle: {
color: upColor,
color0: downColor,
@ -211,6 +211,8 @@ function CandleChart(props: CandleChartProps) {
};
}, [candles, theme]);
console.log('option', option);
return (
<div className={styles.candle__chart__wrapper}>
<ReactECharts