Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

prevents division by zero when calculating y values#1

Merged
charleseidsness merged 1 commit into
maincharleseidsness/sparkline:mainfrom
fix-0-nancharleseidsness/sparkline:fix-0-nanCopy head branch name to clipboard
Oct 24, 2023
Merged

prevents division by zero when calculating y values#1
charleseidsness merged 1 commit into
maincharleseidsness/sparkline:mainfrom
fix-0-nancharleseidsness/sparkline:fix-0-nanCopy head branch name to clipboard

Conversation

@charleseidsness

Copy link
Copy Markdown
Owner

calling getY() with 0 value would produce NaN which are invalid in svg where those end up. in that case, the added condition returns the height in float to draw a data point at y=0.

releated fnando#13, closes fnando#24, fixes fnando#14

calling getY() with 0 value would produce NaN which are invalid in svg where those end up.
in that case, the added condition returns the height in float to draw a data point at y=0.

releated fnando#13, closes fnando#24, fixes fnando#14
@charleseidsness
charleseidsness merged commit 599bc68 into main Oct 24, 2023
@charleseidsness
charleseidsness deleted the fix-0-nan branch October 24, 2023 13:43
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.

potential divide by 0 error in getY() returns NaN Error when data are filled with zeros

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.