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 | |
fiscalYearStartMonth() | Scale fiscal year start month. |
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. |
maxTicksCount() | Maximum ticks count. |
maximum() | Scale maximum. |
maximumGap() | Getter for the maximum gap. |
minimum() | Scale minimum. |
minimumGap() | Getter for the minimum gap. |
softMaximum() | Soft maximum settings. |
softMinimum() | Soft minimum settings. |
transform() | Transforms values to ratio. |
zoomLevels() | Zoom level settings. |
Methods Description
fiscalYearStartMonth
Getter for the scale fiscal year start month.
Returns:
number - Numeric month representation (1 is January, 12 is December)Setter for the scale fiscal year start month.
Params:
Name | Type | Description |
---|---|---|
value | number | Scale fiscal year start month value to set. 1 is January, 12 is December, etc. |
Returns:
anychart.scales.GanttDateTime - Self instance for method chaining.Try it:
getRange
Gets minimum and maximum visible dates set for a scale.
Returns:
Object.<string, number> - An object with min and max keys.Try it:
getTotalRange
Gets total minimum and maximum dates set for a scale.
Returns:
Object.<string, number> - An object with min and max keys.Try it:
inverseTransform
Processes reverse transformation of the ratio backward to value.
Params:
Name | Type | Description |
---|---|---|
ratio | number | Ratio to transform. |
Returns:
number - Ratio transformed to timestamp.Try it:
maxTicksCount
Getter for the scale maximum ticks count.
Returns:
number - The scale maximum ticks count. See listing
var scale = chart.xScale(); var count = scale.maxTicksCount();
Setter for the scale maximum ticks count.
Params:
Name | Type | Default | Description |
---|---|---|---|
count | number | 200 | Scale maximum ticks count value to set. |
Returns:
anychart.scales.GanttDateTime - Self instance for method chaining.Try it:
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:
Name | Type | Description |
---|---|---|
maximum | number | Scale maximum value to set. |
Returns:
anychart.scales.GanttDateTime - Self instance for method chaining.Try it:
maximumGap
Getter for the maximum gap.
NOTE: For backward compatibility:
- if the gap was set as 'pixel gap', method returns an object defined as anychart.scales.GanttDateTime.Gap.
- if the gap was set as 'percent gap', method returns a number representing a ratio-gap as it was before feature implementation.
- if the gap was set as 'pixel gap', method returns an object defined as anychart.scales.GanttDateTime.Gap.
- if the gap was set as 'percent gap', method returns a number representing a ratio-gap as it was before feature implementation.
Returns:
number | anychart.scales.GanttDateTime.Gap - The minimum gap value.Setter for the maximum gap.
Params:
Name | Type | Description |
---|---|---|
gap | number | anychart.scales.GanttDateTime.Gap | Gap value to be set. Can take numeric value or an object defined as anychart.scales.GanttDateTime.Gap. |
treatAsPixels | boolean | Whether to treat first parameter numeric value as pixels. |
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:
Name | Type | Description |
---|---|---|
minimum | number | Scale minimum value to set. |
Returns:
anychart.scales.GanttDateTime - Self instance for method chaining.Try it:
minimumGap
Getter for the minimum gap.
NOTE: For backward compatibility:
- if the gap was set as 'pixel gap', method returns an object defined as anychart.scales.GanttDateTime.Gap.
- if the gap was set as 'percent gap', method returns a number representing a ratio-gap as it was before feature implementation.
NOTE: For backward compatibility:
- if the gap was set as 'pixel gap', method returns an object defined as anychart.scales.GanttDateTime.Gap.
- if the gap was set as 'percent gap', method returns a number representing a ratio-gap as it was before feature implementation.
Returns:
number | anychart.scales.GanttDateTime.Gap - The minimum gap value.Setter for the minimum gap.
Params:
Name | Type | Description |
---|---|---|
gap | number | anychart.scales.GanttDateTime.Gap | Gap value to be set. Can take numeric value or an object defined as anychart.scales.GanttDateTime.Gap. |
treatAsPixels | boolean | Whether to treat first parameter numeric value as pixels. |
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:
Name | Type | Description |
---|---|---|
maximum | number | Soft maximum value to set. |
Returns:
anychart.scales.GanttDateTime - Self instance for method chaining.Try it:
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:
Name | Type | Description |
---|---|---|
minimum | number | Soft minimum value to set. |
Returns:
anychart.scales.GanttDateTime - Self instance for method chaining.Try it:
transform
Transforms values to ratio.
Params:
Name | Type | Description |
---|---|---|
value | * | Value to transform. |
Returns:
number - Value to ratio.Try it:
zoomLevels
Getter for zoom levels settings.
Returns:
anychart.scales.GanttDateTime.ZoomLevelsSettings - Zoom levels settingsSetter for zoom levels settings.
The method sets the sets of labels by which the header is built.
The method sets the sets of labels by which the header is built.
Params:
Name | Type | Description |
---|---|---|
settings | anychart.scales.GanttDateTime.ZoomLevelsSettings | Zoom levels settings to set. |
Returns:
anychart.scales.GanttDateTime - Self instance for method chaining.Try it: