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 PieWidget color assignment when using labels prop #218

Merged

Conversation

Clebal
Copy link
Contributor

@Clebal Clebal commented Oct 27, 2021

No description provided.

@Clebal Clebal requested a review from VictorVelarde October 27, 2021 15:42
@coveralls
Copy link
Collaborator

coveralls commented Oct 27, 2021

Pull Request Test Coverage Report for Build 1391255585

  • 14 of 15 (93.33%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.07%) to 69.578%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/react-ui/src/widgets/PieWidgetUI.js 14 15 93.33%
Files with Coverage Reduction New Missed Lines %
packages/react-ui/src/widgets/PieWidgetUI.js 1 60.16%
Totals Coverage Status
Change from base Build 1391196791: -0.07%
Covered Lines: 891
Relevant Lines: 1197

💛 - Coveralls

if (labels?.[item.name]) {
item.name = labels[item.name];
// Avoid modify data item
const clonedItem = { ...item };
Copy link
Contributor

Choose a reason for hiding this comment

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

Code looks good, I've just done a small renamed of the cloned item

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I usually use suffix Cp to indicate that's a copy. But I see your option also ok.

Copy link
Contributor

@VictorVelarde VictorVelarde left a comment

Choose a reason for hiding this comment

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

👍🏻

@VictorVelarde VictorVelarde merged commit da38b10 into master Oct 27, 2021
@Clebal Clebal deleted the bug/fix-pie-widget-color-assignment-when-using-labels branch October 27, 2021 17:47
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.

3 participants