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

codify interactions explicitly (either as @graph-paper/interactions or in already-existing packages) #71

Open
hamilton opened this issue Jul 23, 2020 · 0 comments
Labels
datagraphic issues directly relating to datagraphic/elements/guides/etc. proposal

Comments

@hamilton
Copy link
Collaborator

We have many patterns for capturing various user interactions in a DataGraphic component that we're copying around from project to project. Some of these patterns are beginning to coalesce into useful patterns. It's time to start thinking about how these interactions should be generalized and codified for others.

Interaction elements come in two flavors: windows that take in the dataset of interest and some data in the domain space, and returns a subset of the data set as a slot prop; and visual components that consume the window slot props in some way.

  • interaction windows: when a user interacts with a graph by mousing or touching over a plot range, it is useful to have utility components that do the work of returning the nearest data points. This is made substantially easier with pre-existing d3 functions. The idea is that something like e.g. a HorizontalWindow component would take in a data set and a target value, and output some semblance of matching points as slot props. Many of the interactions then become
  • visual components: we have a very flexible and performant StackedLabel implementation, which I find to be really useful for things like multi line chart mouseovers. There are other components that would be worthwhile (stsacked labels but off to a corner, for instance).

At a low-ish level, these might be the right components / parts, but they're still verbose and might still be too low-level for most casual users.

@hamilton hamilton added datagraphic issues directly relating to datagraphic/elements/guides/etc. proposal labels Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datagraphic issues directly relating to datagraphic/elements/guides/etc. proposal
Projects
None yet
Development

No branches or pull requests

1 participant