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

Bug: LinePath doesn't connect if value is 0 #99

Closed
thienanle opened this issue Jul 17, 2017 · 3 comments
Closed

Bug: LinePath doesn't connect if value is 0 #99

thienanle opened this issue Jul 17, 2017 · 3 comments

Comments

@thienanle
Copy link

image

@hshoff
Copy link
Member

hshoff commented Jul 17, 2017

Hi @thienanle thanks for checking out vx!

<LinePath /> accepts a defined prop which is a function which defaults to d => y(d) && x(d): https://github.com/hshoff/vx/blob/master/packages/vx-shape/src/shapes/LinePath.js#L27 in this case y(d) returns 0 which evaluates to false in javascript

If you pass in defined={d => true} it should work.

Maybe this is a bad default and we should match the d3 default of () => true: https://github.com/d3/d3-shape#line_defined

@thienanle
Copy link
Author

thienanle commented Jul 17, 2017

@hshoff thanks for making VX!

Yes I'd agree matching D3's default would be better, but this works for me for now. Thanks for the fast response.

@hshoff
Copy link
Member

hshoff commented Jul 17, 2017

Will update it in the v0.0.131 release. Tracking here #100

@hshoff hshoff closed this as completed Jul 17, 2017
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

No branches or pull requests

2 participants