ZoomOptionsSettings.Zoom

Syntax

Zoom: number;

Description

The Zoom property determines a zoom value.

Comments

Zoom is set as a decimal fraction, for example:

The 100% zoom is set by default, the property is set to 1.

To apply the specified zoom, use CSS means. Select one of the methods:

NOTE. The zoom field is not supported in Mozilla Firefox.

The zoom value specified in the zoom or transform field should match with the property value.

The property value is set in the ZoomOptions constructor or using the setZoom method and returned using the getZoom method.

Depending on the selected method for applying the specified zoom, (zoom or transform), set values for the methods ZoomOptions.setIsOnlyPosition, ZoomOptions.setIsCssZoom or the properties IsOnlyPosition, IsCssZoom in the ZoomOptions constructor.

Example

Executing the example requires that the HTML page contains the Chart component named chart (see Example of Creating a Histogram). Add the zoom field with the zoom value in the <style> tag:

<style type="text/css">	
  div#chart {
    ...
    zoom: 0.5;
  }
</style>

Decrease histogram zoom two times:

// Get histogram zoom options
var zoom = chart.getZoom();
// Set zoom value
zoom.setZoom(0.5);
// Determine a method for applying the specified zoom in the zoom field
zoom.setIsOnlyPosition(true);
zoom.setIsCssZoom(true);

After executing the example the histogram zoom is decreased two times:

See also:

ZoomOptionsSettings