AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.scales.GanttDateTime Improve this Doc

Extends: anychart.core.Base

The GanttDateTime class contains methods for configuring DateTime scale on the Gantt chart.

Methods Overview

Specific settings
getRange()Gets minimum and maximum visible dates set for a scale.
getTotalRange()Gets total minimum and maximum dates set for a scale.
inverseTransform()Processes reverse transformation of the ratio backward to value.
maximum()Scale maximum.
maximumGap()Maximum gap settings.
minimum()Scale minimum.
minimumGap()Minimum gap settings.
softMaximum()Soft maximum settings.
softMinimum()Soft minimum settings.
transform()Transforms values to ratio.
zoomLevels()Zoom level settings.

Methods Description

getRange

Gets minimum and maximum visible dates set for a scale.

Returns:

Object.<string, number> - An object with min and max keys.

getTotalRange

Gets total minimum and maximum dates set for a scale.

Returns:

Object.<string, number> - An object with min and max keys.

inverseTransform

Processes reverse transformation of the ratio backward to value.

Params:

NameTypeDescription
rationumberRatio to transform.

Returns:

number - Ratio transformed to timestamp.

maximum

Getter for the scale maximum.

Returns:

number - The scale maximum value.
See listing
var scale = chart.xScale();
var maximum = scale.maximum();
Setter for the scale maximum.

Params:

NameTypeDescription
maximumnumberScale maximum value to set.

Returns:

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

maximumGap

Getter for the maximum gap.

Returns:

number - The maximum gap value.
Setter for the maximum gap.

Params:

NameTypeDescription
gapnumberGap value to be set.

Returns:

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

minimum

Getter for the scale minimum.

Returns:

number - The scale minimum value.
See listing
var scale = chart.xScale();
var minimum = scale.minimum();
Setter for the scale minimum.

Params:

NameTypeDescription
minimumnumberScale minimum value to set.

Returns:

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

minimumGap

Getter for the minimum gap.

Returns:

number - The minimum gap value.
Setter for the minimum gap.

Params:

NameTypeDescription
gapnumberGap value to be set.

Returns:

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

softMaximum

Getter for the scale soft maximum.

Returns:

number - The soft maximum value.
See listing
var scale = chart.xScale();
var softMax = scale.softMaximum();
Setter for the scale soft maximum.

Params:

NameTypeDescription
maximumnumberSoft maximum value to set.

Returns:

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

softMinimum

Getter for the scale soft minimum.

Returns:

number - The soft minimum value.
See listing
var scale = chart.xScale();
var softMin = scale.softMinimum();
Setter for the scale soft minimum.

Params:

NameTypeDescription
minimumnumberSoft minimum value to set.

Returns:

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

transform

Transforms values to ratio.

Params:

NameTypeDescription
value*Value to transform.

Returns:

number - Value to ratio.

zoomLevels

Getter for zoom levels settings.
Setter for zoom levels settings.
The method sets the sets of labels by which the header is built.

Params:

NameTypeDescription
settingsanychart.scales.GanttDateTime.ZoomLevelsSettingsZoom levels settings to set.

Returns:

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