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

Zoom with grid lines have areas preventing zoom #2717

Closed
Venefilyn opened this issue Oct 17, 2019 · 3 comments
Closed

Zoom with grid lines have areas preventing zoom #2717

Venefilyn opened this issue Oct 17, 2019 · 3 comments

Comments

@Venefilyn
Copy link

Venefilyn commented Oct 17, 2019

  • C3 version: 0.7.2
  • D3 version: 5.9.7
  • Browser: Firefox 69
  • OS: Fedora 30

Adding grid.x.lines to a chart with zoom.enabled=true will create lines and labels on the chart that prevent zooming. It also prevents hovercard info on the dots if the label or line is in the way

Sandbox: https://codesandbox.io/s/modest-cherry-t6p6o?fontsize=14

Expected results

  1. Hover over 1px vertical grid line or label
  2. Zoom in with mouse scroll
  3. Graph zooms in

Actual results

  1. Hover over 1px vertical grid line or label
  2. Zoom in with mouse scroll
  3. Graph does not change
@Venefilyn
Copy link
Author

Venefilyn commented Jan 13, 2020

Any updates on this?

My guess would be that the zoom is only applied to <g> elements, which means it stops when hovering over <line> or <text>.

Though I'm not sure where this happens

@Venefilyn
Copy link
Author

Moving c3-event-rects above c3-chart seems to work when testing in browser. Though editing locally and doing tests seems to break when I try to do prepend instead of append

@Venefilyn
Copy link
Author

There's an undocumented grid.lines.front which is defaulted to true. Turning this false made zoom to work.

Why is it undocumented? Why is it default true?

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

1 participant