-
Notifications
You must be signed in to change notification settings - Fork 834
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
Add the new animations #126
Conversation
@@ -61,7 +70,7 @@ const defaultProps = { | |||
orientation: BOTTOM | |||
}; | |||
|
|||
class Axis extends PureRenderComponent { | |||
class Axis extends React.Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come this needs to be changed from PureRenderComponent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisirhc You are right. It is still in progress, testing this out.
- Make LineSeries render using React. - Added the animation to the lines. - Added shouldComponentUpdate for the Animation (should be changed to PureRenderComponent later).
…aster); made the source code more readable.
…eries, fixed the event listeners
const defaultStyle = {i: 0}; | ||
const style = {i: spring(1)}; | ||
return ( | ||
<Motion {...{defaultStyle, style, key: Math.random()}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's key: Math.random()
for? If it's a required hack, there should be a comment here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spring is animated only at the time when motion renders. This means that it requires to be reinitialized somehow to make the next animation.
- Remove the unused function.
* @private | ||
*/ | ||
_mouseOverHandler(useValue, d) { | ||
_mouseOverHandler(useValue, d, event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is event
passed to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisirhc Event is passed from inside of each of the series. I made the change to make it more transparent.
Add the new animations
Add the new animations
This PR changes the way how the components are animated:
These changes are made for
XYPlot
,RadialChart
andTreemap
(and all their subcomponents)This issue addresses #55, #91, #114 and #123