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

new(xychart): add AnimatedLineSeries + tests #874

Merged
merged 5 commits into from
Oct 22, 2020

Conversation

williaster
Copy link
Collaborator

@williaster williaster commented Oct 14, 2020

TODO

🚀 Enhancements

This PR adds an AnimatedLineSeries component. It factors out the previous LineSeries => BaseLineSeries to power both LineSeries and the AnimatedLineSeries.

🏠 Internal

Adds tests for Animated(LineSeries,BarSeries,BarStack,BarGroup) components

@kristw @techniq

{...lineProps}
>
{({ path }) => (
<PathComponent stroke={color} strokeWidth={2} {...lineProps} d={path(data) || ''} />
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

everything is the same in this file except we use the child render function here.

sorry I tried to git mv and it didn't work in this UI view 💔

@@ -16,6 +16,6 @@ export default function getScaledValueFactory<Scale extends AxisScale, Datum>(
(align === 'start' ? 0 : getScaleBandwidth(scale)) / (align === 'center' ? 2 : 1);
return scaledValue + bandwidthOffset;
}
return NaN;
return null;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this one is tricky. react-spring barfs on NaN, but all of the types expect number not number | null 🤔

@coveralls
Copy link

coveralls commented Oct 16, 2020

Pull Request Test Coverage Report for Build 256

  • 19 of 19 (100.0%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.0%) to 60.058%

Files with Coverage Reduction New Missed Lines %
packages/visx-xychart/src/utils/getScaledValueFactory.ts 1 69.23%
Totals Coverage Status
Change from base Build 322821632: 1.0%
Covered Lines: 1476
Relevant Lines: 2360

💛 - Coveralls

@williaster williaster added this to the 1.1.1 milestone Oct 22, 2020
Base automatically changed from chris--xychart-animated-bar to master October 22, 2020 20:14
@williaster williaster merged commit 48c4a34 into master Oct 22, 2020
@williaster williaster deleted the chris--xychart-animated-line branch October 22, 2020 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants