c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.34k stars 1.39k forks source link

zoom: cannot drag along entire x axis when y axis disabled, y2 axis enabled #2661

Open mwhitworth opened 5 years ago

mwhitworth commented 5 years ago

JSFiddle, using C3 master

Try selecting the zoomable region as the entire x axis, from right to left.

Expected behaviour: we can select from the end to the start of the x-axis. Actual behaviour: the draggable region stops shortly before the start of the x axis.

The drag zoom appears to assume that a y-axis exists, but where we use the y2 axis instead the drag area should handle this scenario.