Top
You are looking at an outdated 7.13.1 version of this document. Switch to the 7.14.3 version to see the up to date information.

class anychart.scales.Geo Improve this Doc

Extends: anychart.core.Base

Define geo scale.

Methods Overview

Specific settings
maxTicksCount()Maximum ticks count.
maximumX()Scale maximum X settings.
maximumY()Scale maximum Y settings.
minimumX()Scale minimum X settings.
minimumY()Scale minimum Y settings.
precision()Precision settings.
xMinorTicks()X ticks settings.
xTicks()X ticks settings.
yMinorTicks()Y minor ticks settings.
yTicks()Y ticks settings.
Events
listen()Adds an event listener.
listenOnce()Adds a single time event listener.
removeAllListeners()Removes all listeners.
unlisten()Removes the listener.
unlistenByKey()Removes the listener by the key.
Size and Position
gap()Gap setting.
Miscellaneous
extendDataRange()Extends the current input domain with the passed values (if such don't exist in the domain).

Methods Description

extendDataRange

Extends the current input domain with the passed values (if such don't exist in the domain).

Params:

Name Type Description
x number X value that is supposed to extend the input domain.
y number Y value that is supposed to extend the input domain.
var_args * Values that are supposed to extend the input domain.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

gap

Getter for the current gap setting.

Returns:

number - Gap value.
Example
var currentScale = australiaMap.scale();
currentScale.gap();
Setter for the gap setting.

Params:

Name Type Default Description
value number
0
Value to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

listen

Adds an event listener to an implementing object.

Params:

Name Type Description
type string The event type id.
listener function Callback method. Function that looks like function(event){ // event.actualTarget - actual event target // event.currentTarget - current event target // event.iterator - event iterator // event.originalEvent - original event // event.point - event point // event.pointIndex - event point index }.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

Try it:

listenOnce

Adds an event listener to an implementing object.

Params:

Name Type Description
type string The event type id.
listener function Callback method.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

Try it:

maxTicksCount

Getter for maximum ticks count.

Returns:

number - Maximum ticks count.
See listing
var maxTicksCount = mapScale.maxTicksCount();
Setter for maximum ticks count.
Use the maxTicksCount() method for interval-mode ticks calculation.
If the number of ticks is greater than set in maxTicksCount(), the scale calculates from 4 to 6 ticks.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

maximumX

Getter for the maximum X.

Returns:

number - Scale maximum X.
See listing
var mapScale = australiaMap.scale();
var maximum = mapScale.maximumX();
Setter for the maximum X.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

maximumY

Getter for the maximum Y.

Returns:

number - Scale maximum.
See listing
var mapScale = australiaMap.scale();
var maximum = mapScale.maximumY();
Setter for the maximum Y.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

minimumX

Getter for the minimum X.

Returns:

number - Scale minimum X.
See listing
var mapScale = australiaMap.scale();
var minimum = mapScale.minimumX();
Setter for the minimum X.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

minimumY

Getter for the minimum Y.

Returns:

number - Scale minimum Y.
See listing
var mapScale = australiaMap.scale();
var minimum = mapScale.minimumY();
Setter for the minimum Y.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

precision

Getter for the precision.

Returns:

Array.<number> - Precision.
Setter for the precision using one value.

Params:

Name Type Description
precision Array.<number> Value to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

Setter for the precision using several values.

Params:

Name Type Description
xPrecision number Precision by x.
yPrecision number Precision by y.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

removeAllListeners

Removes all listeners from an object. You can also optionally remove listeners of some particular type.

Params:

Name Type Description
type string Type of event to remove, default is to remove all types.

Returns:

number - Number of listeners removed.

Try it:

unlisten

Removes a listener added using listen() or listenOnce() methods.

Params:

Name Type Description
type string The event type id.
listener function Callback method.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

boolean - Whether any listener was removed.

Try it:

unlistenByKey

Removes an event listener which was added with listen() by the key returned by listen() or listenOnce().

Params:

Name Type Description
key Object The key returned by listen() or listenOnce().

Returns:

boolean - Whether any listener was removed.

Try it:

xMinorTicks

Getter for the set of scale x minor ticks.

Returns:

anychart.scales.GeoTicks - Ticks instance.

Try it:

Setter for the set of scale x minor ticks.

Params:

Name Type Description
value Object | Array An array of ticks to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

xTicks

Getter for the set of scale x ticks.

Returns:

anychart.scales.GeoTicks - Ticks instance.

Try it:

Setter for the set of scale x ticks.

Params:

Name Type Description
value Object | Array An array of ticks to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

yMinorTicks

Getter for the set of scale y minor ticks.

Returns:

anychart.scales.GeoTicks - Ticks instance.

Try it:

Setter for the set of scale y minor ticks.

Params:

Name Type Description
value Object | Array An array of ticks to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it:

yTicks

Getter for the set of scale y ticks.

Returns:

anychart.scales.GeoTicks - Ticks instance.

Try it:

Setter for the set of scale y ticks.

Params:

Name Type Description
value Object | Array An array of ticks to set.

Returns:

anychart.scales.Geo - Self instance for method chaining.

Try it: