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

Make a new component for a draggable line chart #1155

Open
AndreEPaul opened this issue Jul 10, 2020 · 2 comments
Open

Make a new component for a draggable line chart #1155

AndreEPaul opened this issue Jul 10, 2020 · 2 comments

Comments

@AndreEPaul
Copy link
Collaborator

Utilize some d3 functionality to have a line chart where the points are draggable and the lines will update in real-time.

@jondlm
Copy link
Contributor

jondlm commented Jul 10, 2020

This seems good to me. Are you planning on making a variant of the LineChart? I'd be curious to see how you're thinking of designing the props roughly. Would a callback fire when the user moves the data?

I also threw this together a few weeks back that should help you see how it could be done: https://codesandbox.io/s/example-line-chart-with-mouse-handler-h70hy

@AndreEPaul
Copy link
Collaborator Author

AndreEPaul commented Jul 10, 2020

@jondlm we had talked about using a variant of LineChart but I believe Lance recommended a completely new component, I will confirm with him, however. A callback would fire to adjust the d3 data object/path svg object, yeah. (I should be a bit more explicit here. I am not sure that it's a callback exactly, right now what I have is .join and .call methods from d3 which are providing the functionality). I have a little thing working now but am curious to see what the best approach will be.

Yeah definitely, I did take a look at that actually a few weeks back, thanks. I think our use case requires a bit different functionality, but it's helpful to see a working example with pre-existing lucid components.

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