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

Prop for XLine and YLine to have a prop to set height and width #149

Closed
krissalvador27 opened this issue Apr 4, 2019 · 4 comments
Closed

Comments

@krissalvador27
Copy link
Contributor

Currently XLine/YLine span the full height/width of the chart. Would be nice to declare a stopping point for height/width based on a value in the xaxis/yaxis domain. This can set up visualizations such as intersection points on a LineChart.

@tanayv
Copy link
Contributor

tanayv commented May 20, 2019

Hi @krissalvador27,

Just wanted to make sure I understand the expected behavior for the chart from the new prop that you are talking about. So this "stopper" prop would just take in a value that lies within the xDomain/yDomain, and cut the line short at the value provided right?

I've implemented it for the YLine by using the xScale function, but this is all based on my understanding (screenshot below):

Screen Shot 2019-05-20 at 9 33 36 AM

Let me know if this is what you had in mind!

@krissalvador27
Copy link
Contributor Author

Hey @tanayv

Yes! Your definition of the stopper prop is what I was envisioning and looks good based on the screenshot. I'm not sold on the prop name "stopper", but also can't think of anything better. Naming things is hard. 😅

@tanayv
Copy link
Contributor

tanayv commented May 23, 2019

Sounds good!

Yes, I agree. "stopper" doesn't exactly convey what the prop is doing very well. What are your thoughts on something along the lines of xLimit for YLine and yLimit for XLine, or using just limit to keep it consistent across the two?

Something simple like height or width could also potentially work but I can see that being slightly confusing because it could mean the stroke width?

@krissalvador27
Copy link
Contributor Author

Yeah, height/width would be misleading for both the stroke and the value i.e. does 10 mean 10px or the value 10?

I think xLimit for YLine and yLimit for xLine would work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants