C3: zoom extent not working in latest versions of c3 & d3

Created on 24 Apr 2018  路  8Comments  路  Source: c3js/c3

Like already postet on Stack, there occures a bug in the zoom extent option by using versions above 0.5.x.

Working example with lower versions of c3 & d3 (c3: 0.4.11 ,d3: 3.5.6) CodePen
Bug example with latest versions of c3 & d3 (versions mentioned below) CodePen

Description: There seems to be no zoom limit.

  • C3 version: 0.5.1
  • D3 version: 4.13.0
  • Browser: Chrome Version 65.0.3325.181
  • OS: Windows 10
C-bug

Most helpful comment

Same problem with x.extent as well
"c3": "^0.5.4",
"d3": "^4.13.0",

still exists with
"c3": "^0.6.0",
"d3": "^5.4.0",

All 8 comments

Same problem with x.extent as well
"c3": "^0.5.4",
"d3": "^4.13.0",

still exists with
"c3": "^0.6.0",
"d3": "^5.4.0",

Check out: https://github.com/c3js/c3/blob/master/htdocs/samples/api_zoom.html

Seems like the api changed so you should use initialRange instead

Also https://github.com/c3js/c3/blob/master/src/api.zoom.js

Seems to suggest that you should use zoom.x.max and zoom.x.min instead of extent.

But it's not documented, and I can't tell whether it works or not ...

There's also axis.x.selection which kinda seems to work like zoom.initialRange, and can be an interval (of the form [min_index, max_index]). However, both seem to be buggy if max_index is the biggest index in a category bar chart (will open an issue for this).

Any progress on this? Any documentation? If nothing else it would be nice for the default to have some limit for the zoom rather than allowing infinite zooming (or at least zooming until there's nothing there).

+1 (it would be nice to get back the zoom_extent as it is still in the docs)

+1 unfixed in the latest versions with lack of correct documentation

+1 still not fixed and/or documented in 0.7.8

"initialRange", "selection" not working as expected and undocumented, too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DieterSpringer picture DieterSpringer  路  4Comments

ivarkallejarv picture ivarkallejarv  路  3Comments

snkashis picture snkashis  路  4Comments

MarcusJT picture MarcusJT  路  4Comments

Saikat-Sinha picture Saikat-Sinha  路  3Comments