Class: c3.Plot.Zoomable
Defined in: | js/c3-plot.coffee |
Inherits: | c3.Plot |
Overview
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:
- focus() - Zoom the chart to the specified domain. Will not fire zoom events.
Events
- zoom - Triggered when the user starts to zoom or pan. Passed with the current focus domain.
- zoomend - Triggered when the user finishes zooming or panning. Passed with the focus domain.
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.
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
- # (void) _init() Bound
- # (void) _size() Bound
- # (void) focus(extent) Bound Zoom to a specified focus domain, but only if the domain actually changes
- # (void) _draw(origin) Bound
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
#
(void)
_draw(origin)
Bound