feat(pie): added more event listener on bar and arc #2635
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requirement:
We need to pass down more event handlers such as onMouse down and sometimes deal with keyboard event such as onFocus on varies charts.
PR content:
This PR adds more event handlers to nivo pie chart. This includes onMouseDown, onMouseUp, onFocus, onBlur. We followed other onMouse events to add them.
We also included a isFocusable similar to barChart with tabIndex. The current structure is a bit different. In BarItem, isFocusable and isInteractive is passed down. While in arc, isInteractive is not passed. So we followed the design, not passing down isFocusable and only to use both onFocus and onBlur function to determine tabIndex
Let us know what else we missing or need for this PR to merge.
Thanks
Jing