public final class ZoomPlugin extends AbstractExtensionPlugin<ZoomOptions>
Modifier and Type | Field and Description |
---|---|
static ZoomOptionsFactory |
FACTORY
Zoom options factory
|
static String |
ID
Plugin ID "zoom".
|
static TransitionKey |
ZOOM_TRANSITION_MODE
Custom transition mode to update the chart by API, "zoom".
|
Modifier and Type | Method and Description |
---|---|
static void |
enable()
Inject the plugin but disables in the all charts waiting for the specific statement for each chart.
|
static void |
enable(boolean enableToAllCharts)
Inject the plugin and by the argument decides to enable the plugin to all charts or not.
|
static void |
enable(boolean enableToAllCharts,
boolean enableHammerInjection)
Inject the plugin and by the argument decides to enable the plugin to all charts or not.
|
static double |
getZoomLevel(IsChart chart)
Returns the zoom level when
ZoomPlugin is activated. |
static void |
pan(IsChart chart,
Amount amount)
Pans the chart on demand, programmatically.
|
static void |
pan(IsChart chart,
Amount amount,
TransitionKey transition)
Pans the chart on demand, programmatically.
|
static void |
pan(IsChart chart,
double amount)
Pans the chart on demand, programmatically.
|
static void |
pan(IsChart chart,
double amount,
TransitionKey transition)
Pans the chart on demand, programmatically.
|
static void |
reset(IsChart chart)
Reset the zoom of chart when
ZoomPlugin is activated. |
static void |
reset(IsChart chart,
TransitionKey transition)
Reset the zoom of chart when
ZoomPlugin is activated. |
static void |
zoom(IsChart chart,
Amount amount)
Zooms the chart on demand, programmatically.
|
static void |
zoom(IsChart chart,
Amount amount,
TransitionKey transition)
Zooms the chart on demand, programmatically.
|
static void |
zoom(IsChart chart,
double amount)
Zooms the chart on demand, programmatically.
|
static void |
zoom(IsChart chart,
double amount,
TransitionKey transition)
Zooms the chart on demand, programmatically.
|
static void |
zoomScale(IsChart chart,
ScaleId scaleId,
ScaleRange range)
Zooms the chart scale on demand, programmatically.
|
static void |
zoomScale(IsChart chart,
ScaleId scaleId,
ScaleRange range,
TransitionKey transition)
Zooms the chart scale on demand, programmatically.
|
applyingDefaults, getDefaults, isRegistered, loadDefaults
public static final String ID
public static final ZoomOptionsFactory FACTORY
public static final TransitionKey ZOOM_TRANSITION_MODE
public static void enable()
public static void enable(boolean enableToAllCharts)
enableToAllCharts
- by true
the plugin will be enabled to all charts, otherwise false
.public static void enable(boolean enableToAllCharts, boolean enableHammerInjection)
enableToAllCharts
- by true
the plugin will be enabled to all charts, otherwise false
.enableHammerInjection
- if false
, HammerJs library will not be injectedpublic static double getZoomLevel(IsChart chart)
ZoomPlugin
is activated.chart
- chart instance to invokepublic static void reset(IsChart chart)
ZoomPlugin
is activated.chart
- chart instance to invokepublic static void reset(IsChart chart, TransitionKey transition)
ZoomPlugin
is activated.chart
- chart instance to invoketransition
- update transition mode, could be null
public static void pan(IsChart chart, Amount amount)
chart
- chart instance to invokeamount
- amount of pan to applypublic static void pan(IsChart chart, Amount amount, TransitionKey transition)
chart
- chart instance to invokeamount
- amount of pan to applytransition
- update transition modepublic static void pan(IsChart chart, double amount)
chart
- chart instance to invokeamount
- amount of pan to applypublic static void pan(IsChart chart, double amount, TransitionKey transition)
chart
- chart instance to invokeamount
- amount of pan to applytransition
- update transition modepublic static void zoom(IsChart chart, Amount amount)
chart
- chart instance to invokeamount
- amount of zoom to applypublic static void zoom(IsChart chart, Amount amount, TransitionKey transition)
chart
- chart instance to invokeamount
- amount of zoom to applytransition
- update transition modepublic static void zoom(IsChart chart, double amount)
chart
- chart instance to invokeamount
- amount of zoom to applypublic static void zoom(IsChart chart, double amount, TransitionKey transition)
chart
- chart instance to invokeamount
- amount of zoom to applytransition
- update transition modepublic static void zoomScale(IsChart chart, ScaleId scaleId, ScaleRange range)
chart
- chart instance to invokescaleId
- scale id to zoomrange
- range (min/max) of scale to zoompublic static void zoomScale(IsChart chart, ScaleId scaleId, ScaleRange range, TransitionKey transition)
chart
- chart instance to invokescaleId
- scale id to zoomrange
- range (min/max) of scale to zoomtransition
- update transition mode