Skip to content
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

Add 2 charts to home screen #1096

Closed
marc-aurele-besner opened this issue Jan 26, 2025 · 5 comments · Fixed by #1112
Closed

Add 2 charts to home screen #1096

marc-aurele-besner opened this issue Jan 26, 2025 · 5 comments · Fixed by #1112
Assignees
Labels
help wanted Extra attention is needed ui/ux UI/UX

Comments

@marc-aurele-besner
Copy link
Member

Add 2 charts to home screen

  • Using @nivo/line create a chart section (same width proportion as last blocks section) that show the progression of accumulated on chain activity in size (aka the archived history size divided by 2 to account for erasure encoding) (ideally per hour, day, and month)

  • Using @nivo/bar create a chart section (same width proportion as last extrinsic section) that show the specific increase of on-chain activity (current block history size - 1 hour ago history size) divided by 2 to account for erasure encoding) (ideally per hour, day, and month)

This task is specific to the frontend, if someone else decides to pick up the task and don't want to deal with complex query, I don't mind taking care of the query part (then just use static or random mock data) as far as it's fitting theme wise and responsive.

@iamnamananand996
Copy link
Contributor

Hi @marc-aurele-besner, I have a draft version for the charts.

Image

I need your help to get some more details about the chart.

  • How query response looks likes, it will help to create a mockData response.
  • What is (ideally per hour, day, and month), Is this some kind of filter we need to add on chart, like dropdown, which render the chart according to selected option from per hour / day / month

@marc-aurele-besner
Copy link
Member Author

Hi @marc-aurele-besner, I have a draft version for the charts.

Image

I need your help to get some more details about the chart.

  • How query response looks likes, it will help to create a mockData response.
  • What is (ideally per hour, day, and month), Is this some kind of filter we need to add on chart, like dropdown, which render the chart according to selected option from per hour / day / month

I was planning to create a stats schema in our db with hourly, weekly and monthly stats tables, and a schedule task in the background that will generate the row. The tables will basically have cumulatedHistorySize, deltaHistorySize, startDate, endData, updatedAt (cumulated correspond to the chart on the left, and so the numbers will always be growing), (delta will be the chart on the right)

For the time frame selector, I had in mind something like a set of button like this, but I'm open to suggestion
Image

For the bar chart, I'll suggest not having the value directly on the graph but rather as tooltip on hover

@iamnamananand996
Copy link
Contributor

Hi @marc-aurele-besner, thanks for explaining things in detail, really appreciate it, I will come back with these changes, meanwhile if you want, we can create a branch named feat-home-screen-charts, to which I will create a PR for my frontend changes, and for query calls, you can takeover from their in the same branch.

Soon, I will add some more information for the data format which charts will take, which will help you create the API response.

@iamnamananand996
Copy link
Contributor

iamnamananand996 commented Jan 28, 2025

Hi @marc-aurele-besner, I have a draft PR with the implementation.
#1103

Image

I want to make these 2 charts as common component, so we can use it further, on other side of application if required, once done with, will open it for review.

Meanwhile if you have any suggestion to make for a draft PR, please do, it will help to improve it.

@marc-aurele-besner
Copy link
Member Author

The frontend part is done, thank you @iamnamananand996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed ui/ux UI/UX
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants