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

Interactive views should use cursors to provide affordance #4155

Open
domoritz opened this issue Sep 11, 2018 · 10 comments · May be fixed by #9305 or #9328
Open

Interactive views should use cursors to provide affordance #4155

domoritz opened this issue Sep 11, 2018 · 10 comments · May be fixed by #9305 or #9328
Labels
Area - Interaction Enhancement 🎉 Help Wanted Good tasks for contributors (try https://github.com/vega/vega-lite/issues/1486 first) P2 Important Issues that should be fixed soon
Milestone

Comments

@domoritz
Copy link
Member

domoritz commented Sep 11, 2018

For example, when the user can create a brush, it would be nice to change the cursor accordingly.

An interactive mark with a point selection should use a "cursor": "pointer" (as we did manually in https://vega.github.io/editor/#/examples/vega-lite/interactive_bar_select_highlight).

@kanitw
Copy link
Member

kanitw commented Nov 14, 2018

When fixing this issue, please also update this example.

@kanitw
Copy link
Member

kanitw commented Dec 5, 2018

Single/Multi -- Use pointer

Brush use crosshair

Pan uses grab -- if there is a smart way to learn about this

@domoritz
Copy link
Member Author

domoritz commented Dec 5, 2018

Falcon uses pretty reasonable cursors.

@kanitw
Copy link
Member

kanitw commented Dec 5, 2018

To make it easy to follow, what’re the difference between suggested set above?

@domoritz
Copy link
Member Author

domoritz commented Dec 5, 2018

screen shot 2018-12-05 at 09 39 22

And you can give it a try at https://uwdata.github.io/falcon/flights/.

The difference is that resize has a cursor as well (which we don't support yet) and I use move instead of grab.

@kanitw kanitw added 🙏 Help wanted P2 Important Issues that should be fixed soon labels Feb 1, 2019
@kanitw kanitw added the Help Wanted Good tasks for contributors (try https://github.com/vega/vega-lite/issues/1486 first) label Feb 11, 2019
@kanitw kanitw removed the P2 Important Issues that should be fixed soon label Mar 22, 2019
@ajbouh
Copy link

ajbouh commented Jul 17, 2019

Can this be done today with the cursor signal?

@domoritz
Copy link
Member Author

Vega-Lite does not yet have support for signals. You can modify the Vega, yes.

domoritz added a commit that referenced this issue Jan 30, 2024
To create affordance for brush panning, switch the user's mouse cursor
to 'move' when dragging/hovering over a displayed interval selection.

<img width="232" alt="274331754-21cffb6f-09e4-479a-b69e-d8cc52297adb"
src="https://github.com/vega/vega-lite/assets/53187264/1059c619-cbf2-4b7c-ab44-095091935c95">


Contributes to #4155

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kanit Wongsuphasawat <kanitw@gmail.com>
Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
Co-authored-by: Dominik Moritz <domoritz@gmail.com>
Co-authored-by: Kanit Wongsuphasawat <kanit.w@databricks.com>
@domoritz
Copy link
Member Author

We now have move cursors over brushes for interval selections thanks to @alliefeldman in #9164.

@joelostblom
Copy link
Contributor

To add to the suggestions above, it would be great if binding a selection to the legend also automatically changes the cursor to indicate that the legend is clickable.

@joelostblom
Copy link
Contributor

I don't think it's even possible to do this for legends manually (such as with a mark's cursor property) at the moment. Open the Chart in the Vega Editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Interaction Enhancement 🎉 Help Wanted Good tasks for contributors (try https://github.com/vega/vega-lite/issues/1486 first) P2 Important Issues that should be fixed soon
Projects
None yet
5 participants