Type class
Defines data item for DurationAxis
.
Sources
DurationAxisDataItem can be used (imported) via one of the following packages.
/** * -------------------------------------------------------- * Import from: "charts.ts" * Use like: am4charts.DurationAxisDataItem * -------------------------------------------------------- */ import * as am4charts from "@amcharts/amcharts4/charts";
/** * -------------------------------------------------------- * Include via: <script src="charts.js"></script> * Access items like: am4.DurationAxisDataItem * -------------------------------------------------------- */
Inheritance
DurationAxisDataItem extends ValueAxisDataItem
.
DurationAxisDataItem is not extended by any other symbol.
Properties
adapter # |
Type Inherited from Holds Adapter. |
---|---|
animations # |
Type Inherited from A list of |
axisBreak # |
Type Inherited from An |
axisFill # |
Type Inherited from An If there is no fill element associated with data item, a new one is created and returned. |
bullet # |
Type Inherited from Set it to an instance of any If you need position bullet relatively to the cell, use Also, NOTE: between its let range = dateAxis.axisRanges.create(); range.date = new Date(2018, 0, 5); let flag = new am4plugins_bullets.FlagBullet(); flag.label.text = "Hello"; range.bullet = flag; var range = dateAxis.axisRanges.create(); range.date = new Date(2018, 0, 5); var flag = new am4plugins_bullets.FlagBullet(); flag.label.text = "Hello"; range.bullet = flag; { // ... "xAxes": [{ "type": "DateAxis", // ... "axisRanges": [{ "date": new Date(2018, 0, 5), "bullet: { "type": "FlagBullet", "label": { "text": "Hello" } } }] }] } @since 4.5.9 |
categories # |
Type Inherited from An object containing categories. |
clonedFrom # |
Type Inherited from Reference to the original object this object was cloned from. We need to keep this so we can disassociate it from source object when this object is disposed. |
config # |
Type Inherited from Use this property to set JSON-based config. When set, triggers processing routine, which will go through all properties, and try to apply values, create instances, etc. Use this with caution, as it is a time-consuming process. It's used for initialchart setup only, not routine operations. |
contents # |
Type Inherited from Returns a If there is no Container, a new one is created. |
dataContext # |
Type Inherited from Sets to a reference to an original object from Component's data. A reference to an original object in Component's data, that this Data Item is derived from. |
dates # |
Type Inherited from An object containing dates. |
depth # |
Type Inherited from Depth of the Data Item. In nested data structures, like TreeMap, this indicates the level this data point is at, in relation to the parent Data Item. |
endValue # |
Type Inherited from Data point's numeric end value. |
events # |
Type Inherited from An |
grid # |
Type Inherited from A If there is no grid element associated with data item, a new one is created and returned. |
hasProperties # |
Type Default Inherited from Indicates whether Data Item has any properties set. If it does not have any, the code can use this property to check whether they need to apply costly operation of re-applying properties, whenever Data Item-related element is redrawn, e.g. series. |
Type Inherited from Sets hidden flag for data item. Mostly used to initially hide data item. Returns |
|
id # |
Type Inherited from Sets the user-defined id of the element. |
ignoreMinMax # |
Type Inherited from Sets whether this data point should not be included in the scale and minimum/maximum calculations. Exclude from min/max calculations? E.g. some we may want to exclude a particular data point from influencing |
index # |
Type Inherited from Data Item's position index in Component's data. |
isHiding # |
Type Default Inherited from Indicates whether Data Item is currently animiting from visible to hidden state. |
isTemplate # |
Type Default Inherited from Identifies if this object is a "template" and should not be treated as real object that is drawn or actually used in the chart. |
itemIndex # |
Type Inherited from Actual index of the axis data item. @since 4.7.8 |
label # |
Type Inherited from An If there is no label element associated with data item, a new one is created and returned. |
locations # |
Type Inherited from An object containing locations for the Data Item. A location is a position within date or category, or, in some other cases, where there is no single point but rather some period. Click here for info how data item locations work |
mask # |
Type Inherited from Data item's mask. |
maxPosition # |
Type Inherited from Allows hiding axis item (tick, label, grid) if it is closer to axis end than this relative position (0-1). For axis labels it overrides // Hide all ticks and labels closer than 20% to axis end. axis.dataItems.template.maxPosition = 0.8; // Hide all ticks and labels closer than 20% to axis end. axis.dataItems.template.maxPosition = 0.8; { // ... "xAxes": [{ // ... // Hide all ticks and labels closer than 20% to axis end. "dataItems": { "maxPosition": 0.8 } }] } @since 4.5.11 |
minPosition # |
Type Inherited from Allows hiding axis item (tick, label, grid) if it is closer to axis beginning than this relative position (0-1). For axis labels it overrides // Hide all ticks and labels closer than 20% to axis beginning. axis.dataItems.template.minPosition = 0.2; // Hide all ticks and labels closer than 20% to axis beginning. axis.dataItems.template.minPosition = 0.2; { // ... "xAxes": [{ // ... // Hide all ticks and labels closer than 20% to axis beginning. "dataItems": { "minPosition": 0.2 } }] } @since 4.5.11 |
opacity # |
Type Inherited from Sets opacity for all Data Item's related elements (Sprites). |
parent # |
Type Inherited from When we are using a nested data structure, like for example in a TreeMap, this property points to a parent Data Item of this one. |
point # |
Type Inherited from Holds a physical position of the grid line associated with this data item, so that it can be used when measuring distance between points, and hiding some of them so they don't overlap. |
position # |
Type Inherited from relative position of data item on axis |
properties # |
Type Inherited from An object containing Data Item specific appearance properties in key-value pairs. Sometimes a single Data Item needs to apply different properties than the rest of the data That's where Data Item's Please note that you should set Data Item-specific properties using |
sprites # |
Type Default Inherited from A list of E.g. an Data Item keeps track of all of them, so it can toggle all related visual elements when it itself is toggled. |
text # |
Type Inherited from Text to be used as data item's label. |
tick # |
Type Inherited from An If there is no tick element associated with data item, a new one is created and returned. |
uid # |
Type Inherited from Returns object's internal unique ID. |
value # |
Type Inherited from A data point's numeric value. |
values # |
Type Inherited from An object containing calculated values. |
visible # |
Type Inherited from Sets visibility of the Data Item. Returns |
workingLocations # |
Type Inherited from Current working locations. |
There are 41 inherited items currently hidden from this list. |
Methods
animate( animationOptions: ) |
Returns Inherited from Creates and starts an |
---|---|
clone( cloneId?: ) |
Returns Inherited from Makes a copy of this object and returns the clone. Try to avoid cloning complex objects like chart, create new instances if you need them. |
constructor() |
Returns Constructor |
copyFrom( source: ) |
Returns Inherited from Copies all parameters from another |
dispatch( eventType: ) |
Returns Inherited from Dispatches an event using own event dispatcher. Will automatically populate event data object with event type and target (this element). It also checks if there are any handlers registered for this sepecific event. |
dispatchImmediately( eventType: ) |
Returns Inherited from Works like |
dispose() |
Returns Inherited from Destroys this object and all related data. |
getCurrentThemes() |
Returns Inherited from Returns a list of themes that should be applied to this element. It could either be a list of themes set explicitly on this element, or system-wide. |
getDate( name: ) |
Returns Inherited from Returns a Date value of the data field. |
getDuration( duration?: ) |
Returns Inherited from Returns a duration (ms) the Data Item should take to animate from one value to another. If the duration is not specified via parameter, this method will try to request a default duration from the related |
getValue( name: ) |
Returns Inherited from Returns a numeric value for specific data field. If If |
getWorkingValue( name: ) |
Returns Inherited from Returns a current working value for a specific data field. The actual value may differ from the one returned by |
hide( duration?: ) |
Returns Inherited from Hides the Data Item and related visual elements. |
isDisposed() |
Returns Inherited from Returns if this object has been already been disposed. |
setCalculatedValue( name: ) |
Returns Inherited from |
setCategory( name: ) |
Returns Inherited from Sets a related category for this Data Item. @todo Review description |
setDate( name: ) |
Returns Inherited from Sets Date value to a data field. |
setLocation( name: ) |
Returns Inherited from Sets a relative location for a data field. A location is always relative on a 0 to 1 scale, with 0 being beginning, 0.5 middle and 1 end. @todo Rewiew description |
setProperty( name: ) |
Returns Inherited from Sets a Data Item-specific visual properties to apply to related elements. |
setValue( name: ) |
Returns Inherited from Sets a numeric value for specific data field. |
setVisibility( value: ) |
Returns Inherited from Sets visibility of the Data Item. |
setWorkingLocation( name: ) |
Returns Inherited from Sets a current working location for a data field. @todo Rewiew description |
setWorkingValue( name: ) |
Returns Inherited from Set current working numeric value for a specific data field. |
show( duration?: ) |
Returns Inherited from Shows the Data Item and related visual elements. |
There are 23 inherited items currently hidden from this list. |
Events
#calculatedvaluechanged |
Param { property: Inherited from Invoked when the calculated value has changed |
---|---|
#locationchanged |
Param { property: Inherited from Invoked when the location of Data Item changes |
#propertychanged |
Param { property: Inherited from Invoked when a property of the Data Item changes |
#valuechanged |
Param { property: Inherited from Invoked when the value is changed |
#visibilitychanged |
Param { visible: Inherited from Invoked when the visibility of the Data Item changes, i.e. Series is hidden |
#workinglocationchanged |
Param { property: Inherited from Invoked when working location of Data Item changes |
#workingvaluechanged |
Param { property: Inherited from Invoked when the internal/intermediate value has changed |
There are 7 inherited items currently hidden from this list. |
Adapters
#date |
Param { date: |
---|---|
#duration |
Param |
#value |
Param { field: |
#workingValue |
Param { field: |