c3_chart_fn.zoom = function (domain) { var $$ = this.internal; if (domain) { if ($$.isTimeSeries()) { domain = domain.map(function (x) { return $$.parseDate(x); }); } $$.brush.extent(domain); $$.redraw({withUpdateXDomain: true}); } return $$.brush.extent(); }; c3_chart_fn.zoom.enable = function (enabled) { var $$ = this.internal; $$.config.zoom_enabled = enabled; $$.updateAndRedraw(); }; c3_chart_fn.unzoom = function () { var $$ = this.internal; $$.brush.clear().update(); $$.redraw({withUpdateXDomain: true}); };