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

Global 100% #3455

Merged
merged 2 commits into from
Jun 1, 2018
Merged

Global 100% #3455

merged 2 commits into from
Jun 1, 2018

Conversation

01painadam
Copy link
Contributor

Overview

Makes pie chart on global dashboard add to 100% by correctly removing plantations areas (not included in calc)

@01painadam 01painadam added the staging Any PR expected to be kept on staging label Jun 1, 2018
const { indicator } = settings;
const hasPlantations =
(currentLabel !== 'global' && isEmpty(whitelist)) ||
whitelist.indexOf('plantations') > -1;
const plantations = hasPlantations ? data.plantations : 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

why not get plantations from data still? If you are getting totalArea etc might as well do it the same way. Just being picky.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See update.

Copy link
Contributor

@edbrett edbrett left a comment

Choose a reason for hiding this comment

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

Great!

@edbrett edbrett merged commit 3e28964 into feature/global-dashboard Jun 1, 2018
@edbrett edbrett deleted the fix/global--one-hundred branch June 1, 2018 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staging Any PR expected to be kept on staging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants