Type class
Typical Price indicator: field, by default the typical price ("hlc/3", the average of high, low and close), averaged over period. Drawn in a panel of its own.
Click here for more info
Sources
TypicalPrice can be used (imported) via one of the following packages.
// Import TypicalPrice
import * as am5stock from "@amcharts/amcharts5/stock";
// Create TypicalPrice
am5stock.TypicalPrice.new(root, {
// ... config if applicable
});
<!-- Load TypicalPrice -->
<script src="stock.js"></script>
<script>
// Create TypicalPrice
am5stock.TypicalPrice.new(root, {
// ... config if applicable
});
</script>
Inheritance
TypicalPrice extends ChartIndicator.
TypicalPrice is not extended by any other symbol.
Settings
Set these settings on a TypicalPrice object using its set() and setAll() methods.
Read about settings concept.
|
active # |
Type Inherited from Applies the element's |
|---|---|
|
animations # |
Type Inherited from Animations the element plays on its own, described as data - so they can be set from a JSON config and saved with it. Each one animates a setting of the element (or, with sprite.set("animations", [
{ key: "rotation", to: 360, duration: 4000, loops: 0 },
{ key: "scale", from: 1, to: 1.3, duration: 800, loops: 0, yoyo: true, easing: "sine" }
]);
@since 5.20.8 |
|
appearDelay # |
Type Default Inherited from Milliseconds to wait before the @since 5.21.0 |
|
appearDuration # |
Type Inherited from Duration of the @since 5.21.0 |
|
ariaChecked # |
Type Inherited from
This setting is ignored unless
|
|
ariaControls # |
Type Inherited from
|
|
ariaCurrent # |
Type Inherited from
Click here for more info |
|
ariaExpanded # |
Type Inherited from
Click here for more info |
|
ariaHidden # |
Type Inherited from
|
|
ariaLabel # |
Type Inherited from Label for the element to use for screen readers. Click here for more info |
|
ariaLive # |
Type Inherited from
|
|
ariaOrientation # |
Type Inherited from
|
|
ariaSelected # |
Type Inherited from
Click here for more info |
|
ariaValueMax # |
Type Inherited from
|
|
ariaValueMin # |
Type Inherited from
|
|
ariaValueNow # |
Type Inherited from
|
|
ariaValueText # |
Type Inherited from
|
|
autoAppear # |
Type Default Inherited from Plays the element's reveal animation, as Elements made from a template play as each one is made. An element that starts hidden ( This is how a JSON config gets the opening animation, as a config cannot call chart.setAll({ autoAppear: true, appearDuration: 1000, appearDelay: 100 });
series.setAll({ autoAppear: true, appearDuration: 1000 });
chart.setAll({ autoAppear: true, appearDuration: 1000, appearDelay: 100 });
series.setAll({ autoAppear: true, appearDuration: 1000 });
Click here for more info |
|
autoOpenSettings # |
Type Default Inherited from Opens the indicator's settings modal when the indicator is added from an @since 5.10.6 |
|
background # |
Type Inherited from Element drawn behind the container's content, sized to fill the container. Click here for more info |
|
blur # |
Type Inherited from Blur radius in pixels, from IMPORTANT: This setting is not supported in Safari browsers. Click here for more info |
|
brightness # |
Type Inherited from Brightness.
Click here for more info |
|
centerX # |
Type Inherited from The point of the element that is placed at its |
|
centerY # |
Type Inherited from The point of the element that is placed at its |
|
clickAnnounceText # |
Type Inherited from If set, the text will be read out (announced) by a screen reader when focused element is "clicked" (by pressing ENTER or SPACE). @since 5.10.8 |
|
contrast # |
Type Inherited from Contrast.
Click here for more info |
|
crisp # |
Type Default Inherited from Draws the element sharply, with minimal anti-aliasing: its position is rounded to whole pixels, and NOTE: it may not work well on several elements that are meant to fit together exactly. @since 5.3.0 |
|
cursorOverStyle # |
Type Inherited from CSS cursor to show while the pointer is over the element, e.g.
Click here for more info |
|
dateFormatter # |
Type Inherited from A Click here for more info |
|
disabled # |
Type Inherited from Applies the element's |
|
draggable # |
Type Inherited from Lets the user drag the element. Touches that start on it no longer scroll the page. |
|
durationFormatter # |
Type Inherited from A Click here for more info |
|
dx # |
Type Inherited from Horizontal shift in pixels. Can be negative to shift leftward. |
|
dy # |
Type Inherited from Vertical shift in pixels. Can be negative to shift upward. |
|
exportable # |
Type Inherited from If |
|
field # |
Type Inherited from Price to calculate from: |
|
focusable # |
Type Inherited from Can element be focused, i.e. selected using TAB key. Click here for more info |
|
focusableGroup # |
Type Inherited from An identifier by which to group common elements into focusable groups. If set, only the first element in he group will be focusable via TAB key. When it is selected, the rest of the elements in the same group can be selected using arrow keys. It allows users to TAB-through chart elements quickly without the need to TAB into each and every element. It's up to implementer of the charts to provide meaningful Click here for more info |
|
forceHidden # |
Type Inherited from Hides the element whatever its |
|
forceInactive # |
Type Inherited from Makes the element and its children ignore the pointer, even with @since 5.0.21 |
|
height # |
Type Inherited from Height in pixels, or a |
|
hoverOnFocus # |
Type Inherited from Simulate hover on an element when it gains focus, including changing hover appearance and displaying a tooltip if applicable. Click here for more info |
|
html # |
Type Inherited from HTML content of the container. It can hold data placeholders, such as Click here for more info |
|
hue # |
Type Inherited from Rotates the hue of all colors by this many degrees, from IMPORTANT: This setting is not supported in Safari browsers. Click here for more info |
|
id # |
Type Inherited from A unique ID for looking the element up in |
|
ignoreThemes # |
Type Default Inherited from Ignores themes: no theme rule applies to the element, not even one of the default theme. @since 5.15.6 |
|
interactive # |
Type Inherited from Makes the element respond to the pointer. Adding a pointer event listener to it turns this on. |
|
interactiveChildren # |
Type Default Inherited from Makes every descendant, not just direct children, interactive when the container itself is interactive. |
|
invert # |
Type Inherited from Color inversion, from IMPORTANT: This setting is not supported in Safari browsers. Click here for more info |
|
isMeasured # |
Type Default Inherited from If |
|
layer # |
Type Inherited from Layer to draw the element on: elements on higher layers show in front of those on lower ones. If not set, the element is on its parent's layer. |
|
layerMargin # |
Type Inherited from Margins in pixels that make the element's layer larger than the chart, or, when negative, smaller. @since @5.2.39 |
|
layout # |
Type Inherited from How children are arranged, e.g. Click here for more info |
|
legend # |
Type Inherited from A |
|
marginBottom # |
Type Inherited from Bottom margin in pixels. |
|
marginLeft # |
Type Inherited from Left margin in pixels. |
|
marginRight # |
Type Inherited from Right margin in pixels. |
|
marginTop # |
Type Inherited from Top margin in pixels. |
|
mask # |
Type Inherited from An element whose shape clips the container's children. Click here for more info |
|
maskContent # |
Type Inherited from Clips all content that goes outside the container's bounds. |
|
maxHeight # |
Type Inherited from Maximum allowed height in pixels. |
|
maxWidth # |
Type Inherited from Maximum allowed width in pixels. |
|
minHeight # |
Type Inherited from Minimum allowed height in pixels. |
|
minWidth # |
Type Inherited from Minimum allowed width in pixels. |
|
name # |
Type Inherited from Name of the indicator, such as "Moving Average". |
|
numberFormatter # |
Type Inherited from A Click here for more info |
|
opacity # |
Type Default Inherited from Opacity, from |
|
paddingBottom # |
Type Inherited from Bottom padding in pixels. |
|
paddingLeft # |
Type Inherited from Left padding in pixels. |
|
paddingRight # |
Type Inherited from Right padding in pixels. |
|
paddingTop # |
Type Inherited from Top padding in pixels. |
|
period # |
Type Inherited from Number of data items each value is calculated over. |
|
position # |
Type Default Inherited from Positioning of the element. |
|
reverseChildren # |
Type Inherited from Lays out the children in reverse order. @since 5.1.1 |
|
role # |
Type Inherited from Element's role. Click here for more info |
|
rotation # |
Type Default Inherited from Rotation in degrees, clockwise, around the point set by |
|
saturate # |
Type Inherited from Saturation.
Click here for more info |
|
scale # |
Type Default Inherited from Scale, around the point set by |
|
sepia # |
Type Inherited from Sepia tone, from IMPORTANT: This setting is not supported in Safari browsers. Click here for more info |
|
seriesColor # |
Type Inherited from Color of the indicator's series. |
|
setStateOnChildren # |
Type Default Inherited from Applies every state set on the container to its children too. Click here for more info |
|
shortName # |
Type Inherited from Short name of the indicator, such as "MA", shown in the legend. |
|
showTooltipOn # |
Type Default Inherited from When the element's tooltip shows:
Click here for more info |
|
stateAnimationDuration # |
Type Default Inherited from How long, in milliseconds, a switch from one state to another animates.
|
|
stateAnimationEasing # |
Type Default Inherited from Easing of the animated switch from one state to another. |
|
stockChart # |
Type Inherited from The |
|
stockSeries # |
Type Inherited from The series whose data the indicator is calculated from. |
|
tabindexOrder # |
Type Inherited from An internal order by which focusable elements will be selected within the chart. Click here for more info |
|
templateField # |
Type Inherited from Field in the data item's data object that holds settings for this element, applied over its template's. Click here for more info |
|
themeTags # |
Type Inherited from Tags that theme rules can target. They also count for the element's children, so a rule can match a child by a tag of its parent. Click here for more info |
|
themeTagsSelf # |
Type Inherited from Tags that theme rules can target, like Click here for more info |
|
themes # |
Type Inherited from Themes applied to the element and everything inside it. |
|
toggleKey # |
Type Inherited from Setting that a click or tap toggles between
|
|
tooltip # |
Type Inherited from The |
|
tooltipHTML # |
Type Inherited from HTML content of the element's tooltip, shown in place of @since 5.2.11 |
|
tooltipPosition # |
Type Default Inherited from Where the tooltip points: |
|
tooltipText # |
Type Inherited from Text of the element's tooltip. It can hold data placeholders, such as |
|
tooltipX # |
Type Default Inherited from Where on the element the tooltip points, horizontally: pixels from its left edge, or a percent of its width. |
|
tooltipY # |
Type Default Inherited from Where on the element the tooltip points, vertically: pixels from its top edge, or a percent of its height. |
|
userData # |
Type Inherited from Any data of your own to keep with the element. |
|
verticalScrollbar # |
Type Inherited from A Click here for more info |
|
visible # |
Type Default Inherited from Whether the element is shown. Unlike |
|
volumeSeries # |
Type Inherited from The volume series, for indicators that use volume. |
|
wheelable # |
Type Inherited from Makes the element receive mouse wheel events. While the pointer is over it, the wheel no longer scrolls the page. |
|
width # |
Type Inherited from Width in pixels, or a |
|
x # |
Type Inherited from X position in the parent: pixels from its left edge, or a |
|
y # |
Type Inherited from Y position in the parent: pixels from its top edge, or a |
| There are 107 inherited items currently hidden from this list. | |
Private settings
These are read-only settings accessible from a TypicalPrice object using its getPrivate() method.
Read about private settings.
|
focusable # |
Read only
Type Inherited from If set to @since 5.3.16 |
|---|---|
|
htmlElement # |
Read only
Type Inherited from The |
|
htmlElementWrapper # |
Read only
Type Inherited from A wrapper @since 5.11.2 |
|
lastTooltipCoords # |
Read only
Type Inherited from The last point the tooltip was shown at, so it is not shown again at the same place. @since 5.11.3 |
|
showingTooltip # |
Read only
Type Inherited from
|
|
tooltipTarget # |
Read only
Type Inherited from An element whose tooltip point and colors the tooltip uses, in place of this element's. |
|
trustBounds # |
Read only
Type Inherited from Checks that the pointer is within the element's bounds before dispatching It is @since 5.5.0 |
| There are 7 inherited items currently hidden from this list. | |
Properties
|
adapters # |
Type Default Inherited from |
|---|---|
|
children # |
Type Default Inherited from The container's child elements. |
|
className # |
Static
Type Default |
|
classNames # |
Static
Type Default |
|
cursor # |
Type Inherited from |
|
dataItem # |
Type Inherited from The element's NOTE: data items are assigned automatically in most cases where it matters. Set one only if you know what you are doing. |
|
enableDispose # |
Type Default Inherited from Set to |
|
events # |
Inherited from |
|
legend # |
Type Inherited from |
|
panel # |
Type Inherited from The panel the indicator is drawn in. |
|
parent # |
Type Inherited from Parent |
|
root # |
Type Inherited from The @readonly |
|
series # |
Type The indicator's series. |
|
states # |
Type Default Inherited from |
|
template # |
Type Inherited from A |
|
uid # |
Type Default Inherited from A unique number, given to each object as it is created. |
|
virtualParent # |
Type Inherited from |
|
xAxis # |
Type Inherited from X axis of the indicator's panel. |
|
yAxis # |
Type Inherited from Y axis of the indicator's panel. |
| There are 16 inherited items currently hidden from this list. | |
Methods
|
allChildren() |
Returns Inherited from Returns all children, including the background, vertical scrollbar and mask. |
|---|---|
|
animate( options: ) |
Returns Inherited from Animates a setting from its current value (or Click here for more info |
|
appear( duration?: ) |
Returns Inherited from Plays the reveal animation: hides the element at once, then shows it, whether it was hidden or not. |
|
compositeOpacity() |
Returns Inherited from Returns the element's opacity multiplied by those of all its parents. @since 5.2.11 |
|
compositeRotation() |
Returns Inherited from Returns the element's rotation plus those of all its parents, in degrees. @since 5.9.2 |
|
compositeScale() |
Returns Inherited from Returns the element's scale multiplied by those of all its parents. @since 5.9.2 |
|
contentHeight() |
Returns Inherited from |
|
contentWidth() |
Returns Inherited from |
|
depth() |
Returns Inherited from Returns how deep the element is in the tree: the number of parents it has. |
|
dispose() |
Returns Inherited from Disposes the object, freeing everything it holds. A disposed object can't be used again. |
|
eachChildren( f: ( child: ) |
Returns Inherited from Calls |
|
get( key: ) |
Returns Inherited from Returns the value of setting Click here for more info |
|
getDateFormatter() |
Returns Inherited from Returns the Click here for more info |
|
getDurationFormatter() |
Returns Inherited from Returns the Click here for more info |
|
getNumberFormatter() |
Returns Inherited from Returns the Click here for more info |
|
getTooltip() |
Returns Inherited from Returns the element's |
|
has( key: ) |
Returns Inherited from Returns Click here for more info |
|
height() |
Returns Inherited from Returns the element's height in pixels. |
|
hide( duration?: ) |
Returns Inherited from |
|
hideTooltip() |
Returns Inherited from Hides the element's |
|
hover() |
Returns Inherited from Hovers the element as if the pointer were over it: applies its hover state and shows its tooltip. |
|
innerHeight() |
Returns Inherited from Returns the container's height without padding, in pixels. |
|
innerWidth() |
Returns Inherited from Returns the container's width without padding, in pixels. |
|
isDisposed() |
Returns Inherited from Returns |
|
isDragging() |
Returns Inherited from Returns |
|
isFocus() |
Returns Inherited from Returns |
|
isHidden() |
Returns Inherited from Returns |
|
isHiding() |
Returns Inherited from Returns |
|
isHover() |
Returns Inherited from Returns |
|
isShowing() |
Returns Inherited from Returns |
|
isType( type: ) |
Returns Inherited from Returns |
|
isVisible() |
Returns Inherited from Returns |
|
isVisibleDeep() |
Returns Inherited from Same as @since 5.2.7 |
|
markDataDirty() |
Returns Inherited from Recalculates the indicator's data after the current frame. |
|
markDirtyKey( key: ) |
Returns Inherited from Marks a setting as changed, so the element reads it again, running its adapters, on the next frame. |
|
maxHeight() |
Returns Inherited from Returns the most height the element may take, in pixels: its |
|
maxWidth() |
Returns Inherited from Returns the most width the element may take, in pixels: its |
|
new( root: ) |
Static Returns Inherited from Creates an instance of the class. Use it instead of Click here for more info |
|
off( key: ) |
Returns Inherited from Removes a callback added with Click here for more info |
|
offDebounced( key: ) |
Returns Inherited from Removes a callback added with Click here for more info |
|
offDebouncedPrivate( key: ) |
Returns Inherited from Removes a callback added with Click here for more info |
|
offPrivate( key: ) |
Returns Inherited from Removes a callback added with Click here for more info |
|
on( key: ) |
Returns Inherited from Calls Click here for more info |
|
onDebounced( key: ) |
Returns Inherited from Like Click here for more info |
|
onPrivate( key: ) |
Returns Inherited from Calls Click here for more info |
|
onPrivateDebounced( key: ) |
Returns Inherited from Like Click here for more info |
|
once( key: ) |
Returns Inherited from Like Click here for more info |
|
onceDebounced( key: ) |
Returns Inherited from Like Click here for more info |
|
remove( key: ) |
Returns Inherited from Removes the value set for setting Click here for more info |
|
removeAll() |
Returns Inherited from Removes all settings, as Click here for more info |
|
scrollToChild( child: ) |
Returns Inherited from Scrolls the container so that the child comes into view, if it is out of view. Works only on a container with a @since 5.10.5 |
|
set( key: ) |
Returns Inherited from Sets setting Click here for more info |
|
setAll( settings: ) |
Returns Inherited from Sets several settings at once, from an object of key-value pairs. Click here for more info |
|
setCustomData( name: ) |
Returns Inherited from Stores a value in the indicator series' |
|
setTimeout( fn: () => ) |
Returns Inherited from Calls |
|
show( duration?: ) |
Returns Inherited from |
|
showTooltip( point?: ) |
Returns Inherited from Shows the element's |
|
toBack() |
Returns Inherited from Moves the element to the start of its parent's children, so it is drawn under its siblings, or, in a layout, placed first. |
|
toFront() |
Returns Inherited from Moves the element to the end of its parent's children, so it is drawn over its siblings, or, in a layout, placed last. |
|
toGlobal( point: ) |
Returns Inherited from Converts a point within the element to a point relative to the root. |
|
toLocal( point: ) |
Returns Inherited from Converts a point relative to the root to a point within the element. |
|
unhover() |
Returns Inherited from Ends a hover, as if the pointer left the element: hides its tooltip and takes it out of its hover state. |
|
width() |
Returns Inherited from Returns the element's width in pixels. |
|
x() |
Returns Inherited from Returns the element's X position in pixels, relative to its parent, without |
|
y() |
Returns Inherited from Returns the element's Y position in pixels, relative to its parent, without |
| There are 65 inherited items currently hidden from this list. | |
Events
Add event handlers to TypicalPrice object using its events.on() method.
Read about adding event handlers.
| #blur |
Param { originalEvent: Inherited from Invoked when element loses focus. |
|---|---|
| #boundschanged |
Param { type: Inherited from The element's bounds changed. |
| #click |
Param { type: Inherited from The element was clicked or tapped. A press and release more than 5 pixels apart is not a click. |
| #dataitemchanged |
Param { newDataItem: Inherited from The element's data item changed. |
| #dblclick |
Param { type: Inherited from The element was double-clicked or double-tapped. Also dispatched on its parents. |
| #dragged |
Param { type: Inherited from The element moved while being dragged. |
| #dragstart |
Param { type: Inherited from Dragging of the element started: the pointer moved more than 5 pixels after pressing on it. |
| #dragstop |
Param { type: Inherited from Dragging of the element stopped. |
| #focus |
Param { originalEvent: Inherited from Invoked when element gains focus. |
| #globalpointerdown |
Param { type: Inherited from A pointer button was pressed, or a touch started, anywhere in the window, even outside the chart. |
| #globalpointermove |
Param { type: Inherited from The pointer moved anywhere in the window, even outside the chart. |
| #globalpointerup |
Param { type: Inherited from A pointer button was released, or a touch ended, anywhere in the window, even outside the chart. |
| #middleclick |
Param { type: Inherited from The element was clicked with the middle mouse button. |
| #pointerdown |
Param { type: Inherited from A pointer button was pressed, or a touch started, over the element. Also dispatched on its parents. |
| #pointerout |
Param { type: Inherited from The pointer left the element. |
| #pointerover |
Param { type: Inherited from The pointer moved over the element. |
| #pointerup |
Param { type: Inherited from A pointer button was released, or a touch ended, over the element. |
| #positionchanged |
Param { type: Inherited from The element's position changed. |
| #rightclick |
Param { type: Inherited from The element was clicked with the right mouse button. |
| #wheel |
Param { originalEvent: Inherited from The mouse wheel turned while the pointer was over the element. Also dispatched on its parents. |
| There are 20 inherited items currently hidden from this list. | |