Skip to content

Add events to polar plots #1

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add events to polar plots #1

wants to merge 4 commits into from

Conversation

waegen
Copy link
Owner

@waegen waegen commented Aug 9, 2017

This PR adds following events to Polar Plots in plot_api. See plotly#1463

  • plotly_hover
  • plotly_unhover
  • plotly_click

The arguments contain followin data.
{ event: d3.event points: [], traceIdx: number, valueIdx: number }

@waegen waegen changed the title Feature/polar plot Add events to polar plots Aug 9, 2017
@etpinard
Copy link

Thanks for giving this a shot!

In all honesty, although this is a major improvement over the current state of affair, it would be nice to make hover for polar charts behave a little more like on cartesian charts.

For example, hover is triggered not just when the cursor is on physically top of a marker points. Instead, we compute the distance between the cursor and marker points to determine which point is closest. Ideally, we should try to reuse Fx.hover, but formatting polar data to accordingly.

Moreover, to be more aligned with other event data object, traceIdx should be curveNumber and valueIdx should be pointNumber.

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

Successfully merging this pull request may close these issues.

2 participants