Type class
Creates a menu for Export operations.
To add an export menu to a chart, set this to a new instance of ExportMenu
.
chart.exporting.menu = new am4core.ExportMenu();
chart.exporting.menu = new am4core.ExportMenu();
{ // ... "exporting": { "menu": {} } }
Sources
ExportMenu can be used (imported) via one of the following packages.
/** * -------------------------------------------------------- * Import from: "core.ts" * Use like: am4core.ExportMenu * -------------------------------------------------------- */ import * as am4core from "@amcharts/amcharts4/core";
/** * -------------------------------------------------------- * Include via: <script src="core.js"></script> * Access items like: am4.ExportMenu * -------------------------------------------------------- */
Inheritance
ExportMenu extends Validatable
.
ExportMenu is not extended by any other symbol.
Properties
adapter # |
Type Default An |
---|---|
align # |
Type A horizontal alignment for the menu placement. |
classPrefix # |
Type Default Class name prefix. |
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. |
closeDelay # |
Type Default How many milliseconds to hold menu/sub-menu open after it loses focus or hover, before auto-closing it. |
closeOnClick # |
Type Default Close the menu automatically when some export operation is triggered. @since 4.2.2 |
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. |
container # |
Type An HTML container to place the Menu in. A container must be an HTML element, because menu itself is HTML, and cannot be placed into SVG. @todo Check if menu is already build. If it is, just move it to a new container |
defaultStyles # |
Type Default Indicates whether If set to |
element # |
Type The main element o fthe menu - usually @since 4.10.6 |
events # |
Type Inherited from An |
id # |
Type Inherited from Sets the user-defined id of the element. |
items # |
Type A list of menu items. Can be nested. |
language # |
Type A |
tabindex # |
Type A tab index for the menu. Tab index will influence the order in which elements on the chart and the whole page are selected when pressing TAB key. |
tag # |
Type Default Sets main menu tag to place menu in. This also sets up how menu items are built. If you set this to "ul", menu items will be wrapped into If set to "div", menu items will be wrapped in |
uid # |
Type Inherited from Returns object's internal unique ID. |
verticalAlign # |
Type A vertical alignment for the menu placement. |
There are 5 inherited items currently hidden from this list. |
Methods
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 Destroys the menu and all its elements. |
draw() |
Returns Draws the menu based on current items. Normally, there's no need to call this explicitly. The chart, if it has export menu enabled, will automatically draw the menu. |
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. |
hideBranch( branch: ) |
Returns Hides the whole branch of menu. |
isDisposed() |
Returns Inherited from Returns if this object has been already been disposed. |
showBranch( branch: ) |
Returns Show the branch of menu. |
There are 6 inherited items currently hidden from this list. |
Events
#branchselected |
Param { branch: Invoked when menu branch is selected. (either by hover or keyboard) |
---|---|
#branchunselected |
Param { branch: Invoked when menu branch is unselected. |
#closed |
Param { type: Invoked when menu is closed. |
#enter |
Param { branch: Invoked when ENTER key is pressed when certain menu item is in focus. |
#hit |
Param { branch: Invoked when menu item is clicked/tapped. |
#out |
Param { branch: Invoked when menu item is no longer hovered. |
#over |
Param { branch: Invoked when menu item is hovered. |
Adapters
#align |
Param { align: |
---|---|
#branch |
Param { branch: |
#classPrefix |
Param { classPrefix: |
#closeOnClick |
Param |
#defaultStyles |
Param { defaultStyles: |
#iconTag |
Param { tag: |
#itemClass |
Param { className: |
#itemTag |
Param { tag: |
#items |
Param { items: |
#labelClass |
Param { className: |
#labelTag |
Param { tag: |
#menuClass |
Param { className: |
#menuElement |
Param { menuElement: |
#menuTag |
Param { tag: |
#rederLabel |
Param { branch: |
#tabindex |
Param { tabindex: |
#verticalAlign |
Param { verticalAlign: |