Class Time
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AbstractModel<AbstractScale,IsDefaultTime>
-
- org.pepstock.charba.client.options.Time
-
- All Implemented Interfaces:
IsDefaultTime
public final class Time extends AbstractModel<AbstractScale,IsDefaultTime> implements IsDefaultTime
The time configuration is used to configure how time and time series axes must configure the tick marks.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DisplayFormats
getDisplayFormats()
Returns the displayFormats element.IsoWeekDay
getIsoWeekday()
Returns the ISO day of the week with 0 being Sunday and 6 being Saturday.TimeUnit
getMinUnit()
Returns the minimum display format to be used for a time unit.String
getParser()
Defined as a string, it is interpreted as a custom format to be used by LUXON to parse the date.TimeUnit
getRound()
If defined, dates will be rounded to the start of this unit.String
getTooltipFormat()
The format string to use for the tooltip.TimeUnit
getUnit()
If defined, will force the unit to be a certain type.void
setIsoWeekday(IsoWeekDay isoWeekday)
Sets the ISO day of the week.void
setMinUnit(TimeUnit unit)
Sets the minimum display format to be used for a time unit.void
setParser(String parser)
Defined as a string, it is interpreted as a custom format to be used by LUXON to parse the date.void
setRound(boolean round)
If defined, dates will be rounded to the start of this unit.void
setRound(TimeUnit round)
If defined, dates will be rounded to the start of this unit.void
setTooltipFormat(String tooltipFormat)
The format string to use for the tooltip.void
setUnit(boolean unit)
If defined, will force the unit to be a certain type.void
setUnit(TimeUnit unit)
If defined, will force the unit to be a certain type.-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getDisplayFormats
public DisplayFormats getDisplayFormats()
Returns the displayFormats element.- Returns:
- the displayFormats
-
setIsoWeekday
public void setIsoWeekday(IsoWeekDay isoWeekday)
Sets the ISO day of the week.- Parameters:
isoWeekday
- ISO day of the week
-
getIsoWeekday
public IsoWeekDay getIsoWeekday()
Returns the ISO day of the week with 0 being Sunday and 6 being Saturday.- Specified by:
getIsoWeekday
in interfaceIsDefaultTime
- Returns:
- ISO day of the week with 0 being Sunday and 6 being Saturday
-
setRound
public void setRound(boolean round)
If defined, dates will be rounded to the start of this unit.- Parameters:
round
- if defined, this will override the data minimum.
-
setRound
public void setRound(TimeUnit round)
If defined, dates will be rounded to the start of this unit.- Parameters:
round
- if defined, this will override the data minimum.
-
getRound
public TimeUnit getRound()
If defined, dates will be rounded to the start of this unit.- Specified by:
getRound
in interfaceIsDefaultTime
- Returns:
- if defined, dates will be rounded to the start of this unit.
-
setTooltipFormat
public void setTooltipFormat(String tooltipFormat)
The format string to use for the tooltip.- Parameters:
tooltipFormat
- format string to use for the tooltip.
-
getTooltipFormat
public String getTooltipFormat()
The format string to use for the tooltip.- Specified by:
getTooltipFormat
in interfaceIsDefaultTime
- Returns:
- the format string to use for the tooltip.
-
setUnit
public void setUnit(boolean unit)
If defined, will force the unit to be a certain type.- Parameters:
unit
- If defined, will force the unit to be a certain type.
-
setUnit
public void setUnit(TimeUnit unit)
If defined, will force the unit to be a certain type.- Parameters:
unit
- if defined, will force the unit to be a certain type.
-
getUnit
public TimeUnit getUnit()
If defined, will force the unit to be a certain type.- Specified by:
getUnit
in interfaceIsDefaultTime
- Returns:
- if defined, will force the unit to be a certain type.
-
setMinUnit
public void setMinUnit(TimeUnit unit)
Sets the minimum display format to be used for a time unit.- Parameters:
unit
- minimum display format to be used for a time unit.
-
getMinUnit
public TimeUnit getMinUnit()
Returns the minimum display format to be used for a time unit.- Specified by:
getMinUnit
in interfaceIsDefaultTime
- Returns:
- minimum display format to be used for a time unit.
-
setParser
public void setParser(String parser)
Defined as a string, it is interpreted as a custom format to be used by LUXON to parse the date.- Parameters:
parser
- defined as a string, it is interpreted as a custom format to be used by LUXON to parse the date.
-
getParser
public String getParser()
Defined as a string, it is interpreted as a custom format to be used by LUXON to parse the date.- Specified by:
getParser
in interfaceIsDefaultTime
- Returns:
- defined as a string, it is interpreted as a custom format to be used by LUXON to parse the date.
-
-