Compare commits

...

2 Commits

Author SHA1 Message Date
Kakabay 4b46113da6 built 2023-04-26 11:41:40 +05:00
Kakabay 6c6b1d91cc line chart data order reverse 2023-04-26 11:41:11 +05:00
3 changed files with 12 additions and 9 deletions

File diff suppressed because one or more lines are too long

2
dist/index.html vendored
View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Exchange</title>
<script type="module" crossorigin src="/assets/index.98fd6d54.js"></script>
<script type="module" crossorigin src="/assets/index.fedd8d87.js"></script>
<link rel="stylesheet" href="/assets/index.9661e2a1.css">
</head>
<body>

View File

@ -28,6 +28,7 @@ const LineChart = ({ activeRow, tabIndex }) => {
}, [tabIndex]);
let delayed;
console.log(dataLineChart.data[0].all_prices.reverse());
const data = {
labels: dataLineChart
@ -37,13 +38,15 @@ const LineChart = ({ activeRow, tabIndex }) => {
datasets: [
{
data: dataLineChart
? dataLineChart.data[activeRow].all_prices.map((price, index) => {
if (index <= 9) {
return price.price;
} else {
return '';
}
})
? dataLineChart.data[activeRow].all_prices
.map((price, index) => {
if (index <= 9) {
return price.price;
} else {
return '';
}
})
.reverse()
: [''],
borderColor: '#4b8dff',
pointBorderWidth: 2,