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

fix: always convert nodes stats to Number #4650

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

aghArdeshir
Copy link
Contributor

@aghArdeshir aghArdeshir commented Dec 5, 2021

Description

When switching between 30 Days and 90 Days with specific data, the chart becomes unreadable.

Related Issue

#4651

Copy link
Contributor

@minimalsm minimalsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @aghArdeshir!

I've tested the deploy preview and this definitely looks like it solves the problem 💪

For my own curiosity: I don't really understand why casting TotalNodeCount as a number fixes this. Could you explain?

@aghArdeshir
Copy link
Contributor Author

Thanks @minimalsm for your comment. Actually to be honest, I don't know either. First, I thought the problem is with recharts. I tried the mock data on a pure react-recharts codesandbox: https://codesandbox.io/s/elegant-varahamihira-q1jou?file=/src/App.js:6050-6118

But noted that just giving numbers to recharts seems to make the chart readable. And I couldn't convince myself that this is a bug of recharts. So I just mapped our strings to numbers.

Copy link
Member

@corwintines corwintines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aghArdeshir!

@corwintines
Copy link
Member

@all-contributors can you add @aghArdeshir for code

@allcontributors
Copy link
Contributor

@corwintines

I've put up a pull request to add @aghArdeshir! 🎉

@corwintines corwintines merged commit 2a931e3 into ethereum:dev Dec 7, 2021
@wackerow wackerow mentioned this pull request Dec 8, 2021
@samajammin samajammin mentioned this pull request Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants