Class: c3.Plot.Zoomable

Defined in: js/c3-plot.coffee
Inherits: c3.Plot

Overview

TODO: Normalize zoom functionality better (horiz and vert) (for both plot and axis, maybe chart)
TODO: Support zooming with layers or axes that don't share the chart's horizontal scale

A type of plot that allows panning and zooming.

You cannot currently zoom with an ordinal scale.

External Interface

In addition to the standard {c3.base c3 interface}, this chart adds:

Events

Extensibility

The h scale will adjust it's domain based on the current focus of the chart. The original domain can be retreived using the _origh scale.

Author:

Variables Summary

version =
0.0
type =
'zoomable'
snap_to_all =
0.01

[Number] A ratio threshold. If the focus domain is within this threshold near both edges, then the chart will snap to the full domain.

zoom_extent =
undefined

[Number, String] The maximum zoom factor the user is allowed to zoom in If set to integer then allow zooming only until pixels are integer values.

Variable inherited from c3.Plot

version type layers axes data h v x y h_domain v_domain margins crop_margins layer_options axis_options class options content_options anchor height width anchor_styles handlers

Instance Method Summary

Inherited Method Summary

Methods inherited from c3.Plot

#_init #_size #_update #_draw #_style #scale #rescale #min_x #max_x #min_y #max_y #init #style #render #resize #redraw #restyle #_prep #size #update #draw

Instance Method Details

# (void) _init() Bound

# (void) _size() Bound

# (void) focus(extent) Bound

Zoom to a specified focus domain, but only if the domain actually changes

Parameters:

  • extent ( Array<Number> ) The domain to set the focus to.

# (void) _draw(origin) Bound

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: