Skip to content

Fix: functionality issue for toggleFocusOnPress prop and incorrect color issue for focusOnPress prop in PieChart component #1072

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HASH-0021
Copy link

  1. toggleFocusOnPress functionality issue:
  • Issue: Focused pie section doesn't go out of focus when pressed again.
  • Reason: selectedIndex prop is used at few instances in PieChartMain component and getPieChartMainProps function (gifted-charts-core). One of these instances handles toggleFocusOnPress. But selectedIndex prop was never included in PieChartMain component call inside PieChart component.
  • Fix: Including the selectedIndex prop in PieChartMain component call inside PieChart component.
  1. Incorrect fill prop value for focused pie section at index 0:
  • Issue: If pie section at index 0 is focused, then the fill prop is set to none for the focused pie section.
  • Fix: Removing the selectedIndex === index condition where fill prop is set to "none".
  1. Incorrect color for focused pie sections at indices other than 0:
  • Issue: When data prop doesn't include color property for some values, then the color for the focused pie section belonging to those values is set to the color of pie section at index 0.
  • Fix: Including selectedIndex condition for fill prop where pie section color is not given.

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