Type class
Sprite represents any displayable element.
This is the main class that encapsulates every object on the chart.
If it's an element that is to be displayed on the screen at some point, its class must extend Sprite
class.
Sprite
class represents the a hierarchical structure. Every object that extends Sprite
can have children, that would inherit their properties, such as language, formatters, etc.
SpriteState
ISpriteEvents
for a list of available events
ISpriteAdapters
for a list of available Adapters
@todo Review child elements that need to go into _disposers
Sources
Sprite can be used (imported) via one of the following packages.
// Sprite is available in all of the following modules. // You only need to import one of them. /** * -------------------------------------------------------- * Import from: "core.ts" * Use like: am4core.Sprite * -------------------------------------------------------- */ import * as am4core from "@amcharts/amcharts4/core";
// Sprite is available in all of the following modules. // You only need to import one of them. /** * -------------------------------------------------------- * Include via: <script src="core.js"></script> * Access items like: am4.Sprite * -------------------------------------------------------- */
Inheritance
Sprite extends BaseObjectEvents
.
Sprite is extended by PointedShape
, Polyline
, Rectangle
, Container
, Grid
, Tick
, AxisFill
, AxisLine
, RoundedRectangle
, Line
, IWavedShape
, Circle
, Trapezoid
, Triangle
, Polygon
, Image
, Star
, ForceDirectedLink
.
Properties
adapter # |
Type Holds Adapter. Click here for more info about Adapters |
---|---|
align # |
Type Controls horizontal alignment of the element. This is used by parent |
alwaysShowTooltip # |
Type Default DEPRECATION NOTICE: This setting is deprecated in favor of a more flexible setting: Indicates if this element should display a tooltip permanently. Useful, if you want to show permanent tooltips on some items. @since 4.5.4 |
animations # |
Type Returns a list elements's animations currently being played. If the list has not been initialized it is created. |
appeared # |
Type Default A read-only flag which indicates if a sprite has completed its initial animation (if In case @readonly |
applyOnClones # |
Type Default Specifies if property changes on this object should be propagated to the objects cloned from this object. This setting affects property changes *after* cloning, since at the moment of cloning all of properties from source object are copied to the clone anyway. |
baseSprite # |
Type Returns the mail chart object that this element belongs to. In most cases it will mean the chart object. Can be used to retrieve chart object in various events and adapters. chart.seriesContainer.events.on("hit", function(ev) { console.log(ev.target.baseSprite); }); chart.seriesContainer.events.on("hit", function(ev) { console.log(ev.target.baseSprite); }); { // ... "seriesContainer": { "events": { "hit": function(ev) { console.log(ev.target.baseSprite); } } } } @readonly |
clickable # |
Type Indicates if the element is clickable. Some type of the elements, like buttons are clickable by default. Most of the elements are not clickable by default. Use |
cloneTooltip # |
Type Default When cloning a sprite, if the template has it's own tooltip assigned, this tooltip is also cloned by default. This is not good for cpu and sometimes you might only need one single tooltip for all clones. Set this to false in order not to clone tooltip. |
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. |
configField # |
Type A field in data context of element's This is a very powerful feature, allowing changing virtually any setting, including those for element's children, for the element via data. Example data: { "value": 100, "config": { "fill": "#F00" } } If you set element's |
contextMenuDisabled # |
Type Default Should element prevent context menu to be displayed, e.g. when right-clicked? |
cursorDownStyle # |
Type A shortcut to setting mouse cursor when button is pressed down. Example: series.slices.template.cursorDownStyle = am4core.MouseCursorStyle.grabbing; series.slices.template.cursorDownStyle = am4core.MouseCursorStyle.grabbing; { // ... "series": { // ... "slices": { "cursorDownStyle": "grabbing" } } } |
cursorOptions # |
Type Returns element's cursor options. Cursor options usually define cursor style for various states of the hovered element. Elements inherit
|
cursorOverStyle # |
Type A shortcut to setting mouse cursor on hover. Example: series.slices.template.cursorOverStyle = am4core.MouseCursorStyle.pointer; series.slices.template.cursorOverStyle = am4core.MouseCursorStyle.pointer; { // ... "series": { // ... "slices": { "cursorOverStyle": "pointer" } } } |
dataItem # |
Type A @todo Review type |
dateFormatter # |
Type A This is used to format dates, e.g. on a date axes, balloons, etc. chart.dateFormatter.dateFormat = "yyyy-MM-dd"; chart.dateFormatter.dateFormat = "yyyy-MM-dd"; { // ... "dateFormatter": { "dateFormat": "yyyy-MM-dd" } } You can set a separate instance of formatter for each individual element. However that would be unnecessary overhead as all elements would automatically inherit formatter from their parents, all the way up to the chart itself.
|
defaultState # |
Type Returns a This is a shortcut to |
disabled # |
Type Controls if element is disabled. A disabled element is hidden, and is removed from any processing, layout calculations, and generally treated as if it does not exist. The element itself is not destroyed, though. Setting this back to |
dom # |
Type Returns DOM element reference associated with this element. @readonly |
draggable # |
Type Controls if the element is draggable. |
dummyData # |
Type A property which you can use to store any data you want. |
durationFormatter # |
Type A This is used to format numbers as durations, e.g. on a value axes. You can set a separate instance of formatter for each individual element. However that would be unnecessary overhead as all elements would automatically inherit formatter from their parents, all the way up to the chart itself.
|
dx # |
Type A horizontal offset for the element in pixels. Can be negative value for offset to the left. |
dy # |
Type A vertical offset for the element in pixels. Can be negative value for offset upwards. |
element # |
The main element for this Sprite, usually an SVG All other sub-elements are created in it. |
events # |
Type Event dispatcher. Click here for more info about Events |
exportable # |
Type Default If set to |
exporting # |
Type An Used to access API of the chart export functionality. If Upon request, if no parent has such instance, a new one is created, using default settings, what in most cases is just enough. Click here for more info about exporting |
fill # |
Type Element's fill color or pattern. |
fillModifier # |
Type
|
fillOpacity # |
Type Element's fill opacity. Opacity ranges from 0 (fully transparent) to 1 (fully opaque). |
filters # |
Returns list of SVG filters (effects) applied to element. If the filter list is not yet initilized, creates and returns an empty one. Note, not all filters combine well with one another. We recommend using one filter per sprite. |
focusable # |
Type Default Controls if the element can gain focus. Focusable element will be selectable via TAB key. Please note, clicking it with a mouse or touching will not add focus to it. Focused element will show a system-specific highlight, which might ruin the overal look. This is why we don't focus element on click/touch. A default setting varies for different elements. By default all elements are not focusable, except certain items like buttons, legend items, etc. |
globalScale # |
Type Returns element's current "global" scale. Scale values accumulate over hierarchy of elements. E.g. if a @readonly |
group # |
Type Holds Sprite's main SVG group ( |
height # |
Type Element's absolute or relative height. The height can either be absolute, set in numeric pixels, or relative, set in Relative height will be calculated using closest measured ancestor NOTE: |
Type If a sprite has |
|
Type Returns a This is a shortcut to |
|
hitOptions # |
Type Returns Sprite's click (hit) options. Click (hit) options control things like double-click, timeouts, etc.
|
horizontalCenter # |
Type Controls which part of the element to treat as a horizontal center. The setting will be used when positioning, resizing and rotating the element. |
hoverOnFocus # |
Type Default If set to Useful as an accessibility feature to display rollover tooltips on items selected via keyboard. |
hoverOptions # |
Type Returns Sprite's hover options.
|
hoverable # |
Type Default Controls if the element is hoverable (hover events are registered). Use |
htmlContainer # |
Type An HTML element to be used when placing wrapper element ( This is the same for all elements within the same chart. |
id # |
Type Element's user-defined ID. Will throw an Error if there already is an object with the same ID. Please note that above check will be performed withing the scope of the current chart instance. It will not do checks across other chart instances or in globally in DOM. Make sure the IDs are unique. |
inert # |
Type Default Controls if the element should use inertia when interacted with. "Inert" element, when dragged and released, will carry the momentum of the movement, and will continue moving in the same drag direction, gradually reducing in speed until finally stops. |
inertiaOptions # |
Type Returns element's options to be used for inertia. This setting is inheritable, meaning that if not set directly, it will search in all its ascendants until very top. Inertia is used only if element's "Inert" element, when dragged and released, will carry the momentum of the movement, and will continue moving in the same drag direction, gradually reducing in speed until finally stops. Check |
inited # |
Type Returns |
innerHeight # |
Type Returns element's measured inner height in pixels. Inner height is actual available space for content, e.g. element's height minus vertical padding. @readonly |
innerWidth # |
Type Returns element's measured inner width in pixels. Inner width is actual available space for content, e.g. element's width minus horizontal padding. @readonly |
interactions # |
Type Returns (creates if necessary) an |
interactionsEnabled # |
Type Setting this to |
isActive # |
Type Indicates if this element is currently active (toggled on) or not (toggled off). |
isDown # |
Type Indicates if this element has any pointers (mouse or touch) pressing down on it. |
isDragged # |
Type Returns indicator if this element is being dragged at the moment. |
isFocused # |
Type Indicates if this element is focused (possibly by tab navigation). |
isHidden # |
Type If This was added becaus hidden state might have visibility set to true and so there would not be possible to find out if a sprite is technically hidden or not. |
isHiding # |
Type Default If |
isHover # |
Type Indicates if this element has a mouse pointer currently hovering over it, or if it has any touch pointers pressed on it. You can force element to be "hovered" manually, by setting this property to |
isResized # |
Type Returns indicator if this element is being resized at the moment. |
isShowing # |
Type Default This property indicates if Sprite is currently being revealed from hidden state. This is used to prevent multiple calls to |
keyboardOptions # |
Type Returns elements keyboard options. |
language # |
Type A Normally it is enough to set language for the top-most element - chart. All other element child elements will automatically re-use that language object. |
map # |
Type Returns a Can be used to retrieve any object by id, e.g.: console.log(mySprite.map.getKey("myid")); console.log(mySprite.map.getKey("myid")); |
marginBottom # |
Type Bottom margin - absolute (px) or relative ( |
marginLeft # |
Type Left margin - absolute (px) or relative ( |
marginRight # |
Type Right margin - absolute (px) or relative ( |
marginTop # |
Type Top margin - absolute (px) or relative ( |
maxHeight # |
Type Maximum allowed height for the element in pixels. |
maxWidth # |
Type Maximum allowed width for the element in pixels. |
measuredHeight # |
Type Returns elements's measured height in pixels. A measured height is actual height of contents plus @readonly |
measuredWidth # |
Type Returns element's measured width in pixels. A measured width is actual width of contents plus @readonly |
minHeight # |
Type Minimum height for the element in pixels. Set to |
minWidth # |
Type Minimum width of the element in pixels. Set to |
modal # |
Returns a (elements top parent)Accessing modal does not make it appear. To make a modal appear, use
|
mouseOptions # |
Type Mouse options. Enables controlling options related to the mouse, for example sensitivity of its mouse wheel. E.g. the below will reduce chart's wheel-zoom speed to half its default speed: chart.plotContainer.mouseOptions.sensitivity = 0.5; chart.plotContainer.mouseOptions.sensitivity = 0.5; { // ... "plotContainer": { "mouseOptions": { "sensitivity": 0.5 } } } |
nonScaling # |
Type Controls if element should keep constant size and not scale even if there is space available, or it does not fit. |
nonScalingStroke # |
Type Controls if the element's stroke (outline) should remain keep constant thicnkess and do not scale when the whole element is resized. |
numberFormatter # |
Type A This is used to format numbers. chart.numberFormatter.numberFormat = "#,###.#####"; chart.numberFormatter.numberFormat = "#,###.#####"; { // ... "numberFormatter": { "numberFormat": "#,###.#####" } } You can set a separate instance of formatter for each individual element. However that would be unnecessary overhead as all elements would automatically inherit formatter from their parents, all the way up to the chart itself.
|
opacity # |
Type Element's opacity. Opacity setting can range from 0 (fully transparent) to 1 (fully opaque). ATTENTION: It is highly not recommended to use Instead use methods Or, use properties |
outerHeight # |
Type Returns element's measured height plus its top and bottom margins in pixels. @readonly |
outerWidth # |
Type Returns element's measured width plus its left and right margins in pixels. @readonly |
paddingBottom # |
Type Bottom padding - absolute (px) or relative ( |
paddingLeft # |
Type Left padding - absolute (px) or relative ( |
paddingRight # |
Type Right padding - absolute (px) or relative ( |
paddingTop # |
Type Top padding - absolute (px) or relative ( |
parent # |
Elements' parent |
path # |
Type Path of Sprite element |
pixelHeight # |
Type Returns element's height in pixels. For actual height use measuredHeight property. @readonly |
pixelMarginBottom # |
Type Returns current bottom margin in pixels. @readonly |
pixelMarginLeft # |
Type Returns current left margin in pixels. @readonly |
pixelMarginRight # |
Type Returns current right margin in pixels. @readonly |
pixelMarginTop # |
Type Returns current top margin in pixels. @readonly |
pixelPaddingBottom # |
Type Returns current bottom padding in pixels. @readonly |
pixelPaddingLeft # |
Type Returns current left padding in pixels. @readonly |
pixelPaddingRight # |
Type Returns current right padding in pixels. @readonly |
pixelPaddingTop # |
Type Returns current top padding in pixels. @readonly |
pixelPerfect # |
Type Controls if SVG vectors should be drawn with "pixel" precision, producing perfectly crisp lines on retina displays. Setting this to Different elements use different default setting for We recommend leaving this at their default settings, unless there's a specific need. |
pixelWidth # |
Type Returns element's width in pixels, if width was set. For actual width use measuredWidth property. @readonly |
pixelX # |
Type Returns element's current absolute X coordinate in pixels. @readonly |
pixelY # |
Type Returns element's current absolute Y coordinate in pixels. @readonly |
plugins # |
Type A list of plugins (objects that implement @since 4.2.2 |
popups # |
Type A list of popups for this chart. |
properties # |
Type Holds values for Sprite's properties. |
propertyFields # |
Type A collection of key/value pairs that can be used to bind specific Sprite properties to For example: Can be set for each |
readerDescription # |
Type Screen reader description of the element. |
readerHidden # |
Type Controls if element should be hidden from screen readers. Click here for more information |
readerOrientation # |
Type Orientation of the element. @since 4.7.16 |
readerTitle # |
Type Screen reader title of the element. |
readerValueNow # |
Type Current value of the element. @since 4.7.16 |
readerValueText # |
Type Text representation of the current value of the element. @since 4.7.16 |
realFill # |
Type A reference to a real fill object. Sometimes might be useful to modify gradient (when fill is color but we have FillModifier). |
realStroke # |
Type A reference to a real stroke object. Sometimes might be useful to modify gradient (when fill is color but we have a FillModifier). |
relativeMarginBottom # |
Type Returns current relative bottom margin. @readonly |
relativeMarginLeft # |
Type Returns current relative left margin. @readonly |
relativeMarginRight # |
Type Returns current relative right margin. @readonly |
relativeMarginTop # |
Type Returns current relative top margin. @readonly |
relativePaddingBottom # |
Type Returns current relative bottom padding. @readonly |
relativePaddingLeft # |
Type Returns current relative left padding. @readonly |
relativePaddingRight # |
Type Returns current relative right padding. @readonly |
relativePaddingTop # |
Type Returns current relative top padding. @readonly |
relativeX # |
Type Returns element's current relative X coordinate in |
relativeY # |
Type Returns element's current relative Y coordinate in @readonly |
resizable # |
Type Indicates if this element is resizable. Enabling resize will turn on various interactions on the element. Their actual functionality will depend on other properties. If the element also If the element is not draggable, resize can be performed with just one point of contact, touch or mouse. Will invoke |
role # |
Type A WAI-ARIA role for the element. Click here for more information on WAI-ARIA roles |
rollOutDelay # |
Type Default Time in milliseconds after which rollout event happens when user rolls-out of the sprite. This helps to avoid flickering in some cases. |
rotation # |
Type Rotation of the element in degrees. (0-360)Note: For convenience purposes, negative values (for counter-clockwise rotation) and values exceeding 360 can also be used. |
rtl # |
Type An RTL (right-to-left) setting. RTL may affect alignment, text, and other visual properties. If you set this on a top-level chart object, it will be used for all child elements, e.g. labels, unless they have their own |
scale # |
Type Scale of the element. The scale is set from 0 (element reduced to nothing) to 1 (default size).
Etc. |
shapeRendering # |
Type Default An SVG-specific Click here for more information about |
shouldClone # |
Type Default Indicates whether this sprite should be cloned when cloning its parent container. We set this to |
showOnInit # |
Type If this is set to If your "default" state's If you need a Sprite which has |
showSystemTooltip # |
Type Indicates whether the element should attempt to construct itself in a way so that system tooltip is shown if its |
showTooltipOn # |
Type Default Indicates when tooltip needs to be shown on this element:
For example, if you would like to show tooltips on all of the columns of a series.columns.template.showTooltipOn = "always"; series.columns.template.showTooltipOn = "always"; { // ... "series": [{ // ... "columns": { "showTooltipOn": "always" } }] } It can even be set to display on a selected columns via series.columns.template.propertyFields.showTooltipOn = "tooltip"; series.columns.template.propertyFields.showTooltipOn = "tooltip"; { // ... "series": [{ // ... "columns": { "propertyFields": { "showTooltipOn": "tooltip" } } }] } @since 4.7.9 |
states # |
Type Returns a collection of element's available |
stroke # |
Type Element's stroke (outline) color or pattern. |
strokeDasharray # |
Type A "Dasharray" allows setting rules to make lines dashed, dotted, etc. Click here for more info on |
strokeDashoffset # |
Type A "Dashoffset" allows setting the start position of the dashes if Click here for more info on |
strokeLinecap # |
Type A Click here for more info on |
strokeLinejoin # |
Type A Click here for more info on |
strokeModifier # |
Type
|
strokeOpacity # |
Type Stroke (outline) opacity. The values may range from 0 (fully transparent) to 1 (fully opaque). |
strokeWidth # |
Type Stroke (outline) thickness in pixels. |
svgContainer # |
Type HTML container ( Sets HTML container to add SVG and other chart elements to. |
swipeOptions # |
Type Returns element's swipe gesture options. |
swipeable # |
Type Controls if element is swipeable. Swipable element will invoke Please note that combining swipe and drag is possible, however will incur a slight but noticeable delay in drag start. |
tabindex # |
Type Sets or returns TAB index. Tab index maintains the order in which focusable elements gain focus when TAB key is pressed. Please note, tab index is not local to the chart. It affects the whole of the page, including non-SVG elements. Maintain extreme causion when setting tab indexes, as it affects the user experience for the whole web page. |
togglable # |
Type Indicates if element can be toggled on and off by subsequent clicks/taps. Togglable element will alternate its |
tooltip # |
Type A |
tooltipColorSource # |
Type A |
tooltipDataItem # |
Type A |
tooltipHTML # |
Type An HTML template to be used to populate If element has |
tooltipPosition # |
Type Specifies if Position |
tooltipText # |
Type A text template to be used to populate Tooltip's contents. If element has This template will also be parsed for any special formatting tags. |
tooltipX # |
Type X coordinate the |
tooltipY # |
Type Y coordinate the |
trackable # |
Type Indicates if the element is trackable (mouse position over it is reported to event listeners). Will invoke Please note, touch devices will also invoke |
uid # |
Type Inherited from Returns object's internal unique ID. |
url # |
Type Click-through URL for this element. If set, clicking/tapping this element will open the new URL in a target window/tab as set by Please note that URL will be parsed by data placeholders in curly brackets, to be populated from data. E.g.: series.columns.template.url = "https://www.google.com/search?q={category.urlEncode()}"; series.columns.template.url = "https://www.google.com/search?q={category.urlEncode()}"; { // ... "series": [{ // ... "columns": { "url": "https://www.google.com/search?q={category.urlEncode()}" } }] } |
urlTarget # |
Type Target to use for URL clicks:
|
userClassName # |
Type A custom class name to set on the element. If set, the value will be added to element's @since 4.9.11 |
valign # |
Type Controls vertical alignment of the element. This is used by parent |
verticalCenter # |
Type Controls which part of the element to treat as a vertical center. The setting will be used when positioning, resizing and rotating the element. |
visible # |
Type Indicates if element is current visible ( |
wheelable # |
Type Indicates if the element can be interacted with mouse wheel. Will invoke |
width # |
Type Element's absolute or relative width. The width can either be absolute, set in numeric pixels, or relative, set in Relative width will be calculated using closest measured ancestor NOTE: |
x # |
Type Element's absolute or relative X coordinate. If setting both X and Y, please consider using |
y # |
Type Element's absolute or relative Y coordinate. If setting both X and Y, please consider using |
zIndex # |
Type A "zIndex" of the element. "zIndex" determines the order of how elements are placed over each other. Higher "zIndex" will mean the element will be draw on top of elements with lower "zIndexes". |
There are 3 inherited items currently hidden from this list. |
Methods
animate( animationOptions: ) |
Returns Creates and starts an
|
---|---|
appear() |
Returns Hides the chart instantly and then shows it. If defaultState.transitionDuration > 0, this will result an animation in which properties of hidden state will animate to properties of visible state. |
applyCurrentState( duration?: ) |
Returns Applies proper state based on the condition of the element. A condition is deducted in this order:
|
bind( property: ) |
Returns |
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. |
closeAllPopups() |
Returns Closes all currently open popup windows |
closeModal() |
Returns Hides modal window if there is one currently open. |
constructor() |
Returns Constructor:
|
copyFrom( source: ) |
Returns 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 Destroys this object and all related data. |
getCurrentThemes() |
Returns Returns theme(s) used by this object either set explicitly on this element, inherited from parent, or inherited from |
getPixelX( value: ) |
Returns Returns an X coordinate in pixel within the element. If number is passed in as parameter, the same number will be returned back. If |
getPixelY( value: ) |
Returns Returns an Y coordinate in pixel within the element. If number is passed in as parameter, the same number will be returned back. If |
getPropertyValue( propertyName: ) |
Returns Returns element's property value. Will check if there are any bindings with Will also apply any adapters bound to |
getRelativeX( value: ) |
Returns Returns relative (percent) value of the X coordindate within this element. A relative value is a hundredth of a percent. So 100% would result in a 1 as relative value. |
getRelativeY( value: ) |
Returns Returns relative (percent) value of the Y coordindate within this element. A relative value is a hundredth of a percent. So 100% would result in a 1 as relative value. |
getSvgPoint( point: ) |
Returns Converts element's local coordinates to the coordinates within the main chart container. |
hide( duration?: ) |
Returns Hides the element, by applying Has no effect if element is already hidden. If While element is fading out, its When element is hidden, its |
hideTooltip( duration?: ) |
Returns Hides element's |
hitTest( sprite: ) |
Returns Checks if the this element has any of its parts overlapping with another element. @todo Description (review) |
insertAfter( sprite: ) |
Returns Insert this element after sibling element. |
insertBefore( sprite: ) |
Returns Insert this element before sibling element. |
invalidate() |
Returns Invalidates element. Object will be redrawn during the next update cycle. Please note that in most cases elements will auto-invalidate when needed. If everything works, DO NOT use this method. Use it only if some changes do not take otherwise. |
isDisposed() |
Returns Inherited from Returns if this object has been already been disposed. |
isInTransition() |
Returns Returns |
isInteractive() |
Returns Returns true if interactions object was created. Mostly used just to avoid creating interactions object if not needed. |
isReady() |
Returns Returns If this object is a |
margin( top: ) |
Returns Sets all four margins for the element at once. Margins are set in pixels. |
moveTo( point: ) |
Returns Moves the element to a specified coordinates. Using this method is preferred method of moving element, as it saves some CPU processing power over setting The method respects element's center settings. The element will be positioned so that Besides moving the element, you can also at the same time scale and rotate the element. |
openModal( text: ) |
Opens a modal window with specific content ( The
|
openPopup( text: ) |
Creates, opens, and returns a new |
padding( top: ) |
Returns Sets padding for the element in pixels. |
setPropertyValue( property: ) |
Returns Sets elements's property value. Will also propagate the same property value on all element's clones. @todo Review propagation to clones. Right now we simply check if clone is disposed before setting the same property on it. It's better to remove from clone list altogether. |
setState( value: ) |
Returns Applies a The first parameter can either be a name state or a When run, this method will apply SVG properties defined in a |
setVisibility( value: ) |
Returns Sets
|
show( duration?: ) |
Returns Reveals hidden element. Has no effect if element is already visible. If |
showTooltip( point?: ) |
Returns Shows the element's A tooltip will be populated using text templates in either |
toBack() |
Returns Moves the element to the very bottom in the element order, so that it appears behind other elements. |
toFront() |
Returns Moves the element to the very top in element order, so that it appears in front of other elements. |
There are 4 inherited items currently hidden from this list. |
Events
#appeared |
Param { type: Invoked when |
---|---|
#beforedisposed |
Param { type: Invoked just before Sprite is disposed. |
#beforevalidated |
Param { type: Invoked before @todo Description (check) |
#blur |
Param { event: Inherited from Invoked when |
#disabled |
Param { type: Invoked when sprite is disabled |
#doublehit |
Param Invoked when |
#down |
Param Inherited from Invoked when the mouse button is pressed or touch starts. |
#drag |
Param Inherited from Invoked when |
#dragged |
Param Invoked when This is simmilar but different then |
#dragstart |
Param Inherited from Invoked when |
#dragstop |
Param Inherited from Invoked when |
#enabled |
Param { type: Invoked when sprite is enabled |
#focus |
Param { event: Inherited from Invoked when |
#globalscalechanged |
Param { type: Invoked when the global scale changed, meaning that scale of |
Param { type: Invoked when visible |
|
#hit |
Param Invoked when |
#inited |
Param { type: Invoked when |
#input |
Param { event: Inherited from Invoked whenever information changes in the textual input elements, like |
#keydown |
Param { event: Inherited from Invoked when the key is pressed on the keyboard. |
#keypress |
Param { event: Inherited from Invoked when the key generates a "press", e.g. pressing and holding a letter key will generate repeated "keypress" events. |
#keyup |
Param { event: Inherited from Invoked when the key is released on the keyboard. |
#maxsizechanged |
Param { previousHeight: Invoked when maximum available size of the Sprite changes, i.e. when the size of parent container changes. |
#out |
Param Inherited from Invoked when mouse cursor moves out of NOTE: this event might not always contains |
#over |
Param Inherited from Invoked when mouse cursor moves over NOTE: this event might not always contains |
#parentset |
Param { type: Invoked when a sprite is added to a parent |
#positionchanged |
Param { type: Invoked when position of the |
#propertychanged |
Param { property: Invoked when property of the |
#ready |
Param { type: Invoked when For |
#removedfromqueue |
Param { type: Invoked when chart is shown if |
#resize |
Param Inherited from Invoked when |
#rightclick |
Param { type: Inherited from Invoked when right mouse button is clicked on the object. |
#shown |
Param { type: Invoked when hidden |
#sizechanged |
Param { type: Invoked when size of the Sprite changes. |
#swipe |
Param Inherited from Invoked when user performs "swiping" gesture (quick horizontal movement) on the object, either using mouse or touch. |
#swipeleft |
Param Inherited from Invoked when user performs "swiping" gesture towards left. |
#swiperight |
Param Inherited from Invoked when user performs "swiping" gesture towards right. |
#toggled |
Param { type: Invoked when |
#track |
Param Invoked when pointer (mouse cursor or touch point) moves over |
#transformed |
Param { dummyData: @todo Description |
#transitionended |
Param { type: Invoked when Sprite completes transition to a |
#up |
Param Inherited from Invoked when the mouse button is released or touch ends. |
#validated |
Param { type: Invoked when @todo Description (check) |
#visibilitychanged |
Param { visible: Invoked when visibility of the |
#wheel |
Param Invoked when user turns mouse wheel while over the |
#wheeldown |
Param Invoked when user turns mouse wheel downwards while over the |
#wheelleft |
Param Invoked when user turns mouse wheel leftwards while over the |
#wheelright |
Param Invoked when user turns mouse wheel rightwards while over the |
#wheelup |
Param Invoked when user turns mouse wheel upwards while over the |
#zIndexChanged |
Param { type: Invoked when zIndex of a sprite is changed |
There are 18 inherited items currently hidden from this list. |
Adapters
#align |
Param Inherited from |
---|---|
#alwaysShowTooltip |
Param Inherited from |
#clickable |
Param Inherited from |
#contextMenuDisabled |
Param Inherited from |
#criticalError |
Param |
#cursorOptions |
Param |
#disabled |
Param Inherited from |
#draggable |
Param Inherited from |
#dx |
Param Inherited from |
#dy |
Param Inherited from |
#fill |
Param Inherited from |
#fillModifier |
Param Inherited from |
#fillOpacity |
Param Inherited from |
#focusable |
Param Inherited from |
#globalScale |
Param |
#height |
Param Inherited from |
Param Inherited from |
|
#hitOptions |
Param |
#horizontalCenter |
Param Inherited from |
#hoverOnFocus |
Param Inherited from |
#hoverOptions |
Param |
#hoverable |
Param Inherited from |
#id |
Param Inherited from |
#inert |
Param Inherited from |
#inertiaOptions |
Param |
#innerHeight |
Param |
#innerWidth |
Param |
#interactionsEnabled |
Param Inherited from |
#isActive |
Param Inherited from |
#isHover |
Param Inherited from |
#keyboardOptions |
Param |
#marginBottom |
Param Inherited from |
#marginLeft |
Param Inherited from |
#marginRight |
Param Inherited from |
#marginTop |
Param Inherited from |
#mask |
Param |
#maxHeight |
Param Inherited from |
#maxWidth |
Param Inherited from |
#maxX |
Param Inherited from |
#maxY |
Param Inherited from |
#measuredHeight |
Param |
#measuredWidth |
Param |
#minHeight |
Param Inherited from |
#minWidth |
Param Inherited from |
#minX |
Param Inherited from |
#minY |
Param Inherited from |
#mouseOptions |
Param |
#nonScaling |
Param Inherited from |
#nonScalingStroke |
Param Inherited from |
#opacity |
Param Inherited from |
#outerHeight |
Param |
#outerWidth |
Param |
#paddingBottom |
Param Inherited from |
#paddingLeft |
Param Inherited from |
#paddingRight |
Param Inherited from |
#paddingTop |
Param Inherited from |
#path |
Param Inherited from |
#pixelHeight |
Param |
#pixelMarginBottom |
Param |
#pixelMarginLeft |
Param |
#pixelMarginRight |
Param |
#pixelMarginTop |
Param |
#pixelPerfect |
Param Inherited from |
#pixelWidth |
Param |
#pixelX |
Param |
#pixelY |
Param |
#populateString |
Param |
#readerChecked |
Param Inherited from |
#readerControls |
Param Inherited from |
#readerDescribedBy |
Param Inherited from |
#readerDescription |
Param Inherited from |
#readerHidden |
Param Inherited from |
#readerLabelledBy |
Param Inherited from |
#readerLive |
Param Inherited from |
#readerOrientation |
Param Inherited from |
#readerTitle |
Param Inherited from |
#readerValueNow |
Param Inherited from |
#readerValueText |
Param Inherited from |
#relativeHeight |
Param |
#relativeMarginBottom |
Param |
#relativeMarginLeft |
Param |
#relativeMarginRight |
Param |
#relativeMarginTop |
Param |
#relativeWidth |
Param |
#relativeX |
Param |
#relativeY |
Param |
#resizable |
Param Inherited from |
#role |
Param Inherited from |
#rotation |
Param Inherited from |
#scale |
Param Inherited from |
#shapeRendering |
Param Inherited from |
#showOnInit |
Param Inherited from |
#showTooltipOn |
Param Inherited from |
#stroke |
Param Inherited from |
#strokeDasharray |
Param Inherited from |
#strokeDashoffset |
Param Inherited from |
#strokeLinecap |
Param Inherited from |
#strokeLinejoin |
Param Inherited from |
#strokeModifier |
Param Inherited from |
#strokeOpacity |
Param Inherited from |
#strokeWidth |
Param Inherited from |
#swipeOptions |
Param |
#swipeable |
Param Inherited from |
#tabindex |
Param Inherited from |
#togglable |
Param Inherited from |
#tooltipHTML |
Param Inherited from |
#tooltipPosition |
Param Inherited from |
#tooltipText |
Param Inherited from |
#tooltipX |
Param Inherited from |
#tooltipY |
Param Inherited from |
#trackable |
Param Inherited from |
#url |
Param Inherited from |
#urlTarget |
Param Inherited from |
#userClassName |
Param Inherited from |
#valign |
Param Inherited from |
#verticalCenter |
Param Inherited from |
#visible |
Param Inherited from |
#wheelable |
Param Inherited from |
#width |
Param Inherited from |
#x |
Param Inherited from |
#y |
Param Inherited from |
#zIndex |
Param Inherited from |
There are 89 inherited items currently hidden from this list. |