-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daily transactions chart #195
Conversation
895b85f
to
c9ff474
Compare
Deploying with
|
Latest commit: |
c400d5b
|
Status: | ✅ Deploy successful! |
Preview URL: | https://84d8000f.oasis-explorer.pages.dev |
Branch Preview URL: | https://ml-daily-transactions-chart.oasis-explorer.pages.dev |
src/app/utils/chart-utils.ts
Outdated
|
||
const chunkArray = buckets.reduce( | ||
(accArray, item, index) => { | ||
const chunkIndex = Math.floor(index / numOfChunks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we group by hour, something like isSameHour ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking into active accounts chart, which has the "offset" as well. It would make more sense. Should I add it to Active accounts chart as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the same. In active accounts we show every 12th items and we do not group/sum them as windows overlaps for 5 minutes buckets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, after talking with Don, summing by hour makes the most sense.
c9ff474
to
ba090c1
Compare
const totalTransactions = data?.data.buckets.reduce((acc, curr) => acc + curr.tx_volume, 0) ?? 0 | ||
|
||
const lineChartData = isDailyChart | ||
? sumBucketsByChucks(buckets, 'volume_per_second', 'bucket_start', 12) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing the reasoning for this PR and #193 is #193 (comment):
hourly buckets won't be added to API
but is that just in MVP - and these are temporary workarounds, or actually won't be? Sounds like misaligned product/mocks/backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently backend will not support hours buckets. We can discuss in more detail today.
14432c9
to
8469fb1
Compare
8469fb1
to
93788fc
Compare
93788fc
to
c400d5b
Compare
Problem
Daily duration changes in #193
Solution
Group buckets by hour