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

cast to number before summing values #284

Merged
merged 1 commit into from
Apr 28, 2023
Merged

cast to number before summing values #284

merged 1 commit into from
Apr 28, 2023

Conversation

vijithassar
Copy link
Owner

Cast to numbers before summing to ensure that + always means addition and does not mean concatenation.

This is similar to the change in pull request #283, but the same mechanism is required in both places because some chart types may never hit the code path to apply the earlier upstream version of the fix.

Loading data from CSV files can result in fields intended for quantitative use coming in as strings. Casting prevents them from being concatenated instead of summed.
@vijithassar vijithassar merged commit 8ebe695 into main Apr 28, 2023
@vijithassar vijithassar deleted the sum-cast branch April 28, 2023 18:44
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.

1 participant