Top
You are looking at an outdated 7.13.1 version of this document. Switch to the 7.14.0 version to see the up to date information.

class anychart.ui.chartEditor.Dialog Improve this Doc

Extends: anychart.core.Base

Chart Editor Dialog Class.

Methods Overview

Data
data()Adds data to a chart editor.
Events
listen()Adds an event listener.
listenOnce()Adds a single time event listener.
removeAllListeners()Removes all listeners.
unlisten()Removes the listener.
unlistenByKey()Removes the listener by the key.
XML/JSON
getResultJson()Return chart configuration as JSON object or string.
getResultXml()Returns chart configuration as XML string or XMLNode.
Miscellaneous
decorate()Decorates the container for the chart editor.
getResultCode()Returns the JavaScript code.
render()Renders the chart editor.
visible()Visible dialog box settings.

Methods Description

data

Adds data to a chart editor.

Params:

Name Type Description
var_args Array Raw data set.

Try it:

decorate

Decorates the container for the chart editor.

Params:

Name Type Description
value Element Element to decorate.

Try it:

getResultCode

Returns the JavaScript code.

Returns:

string - JavaScript code.

Try it:

getResultJson

Return chart configuration as JSON object or string.

Params:

Name Type Description
stringify boolean Return as JSON as string. Note: stringifying ignores this flag.
includeTheme boolean If the current theme properties should be included into the result.

Returns:

* - Chart JSON.

Try it:

getResultXml

Returns chart configuration as XML string or XMLNode.

Params:

Name Type Description
asXmlNode boolean Return XML as XMLNode.
includeTheme boolean If the current theme properties should be included into the result.

Returns:

string Node - Chart configuration.

Try it:

listen

Adds an event listener to an implementing object.

Params:

Name Type Description
type string The event type id.
listener function Callback method. Function that looks like function(event){ // event.actualTarget - actual event target // event.currentTarget - current event target // event.iterator - event iterator // event.originalEvent - original event // event.point - event point // event.pointIndex - event point index }.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

Try it:

listenOnce

Adds an event listener to an implementing object.

Params:

Name Type Description
type string The event type id.
listener function Callback method.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

Try it:

removeAllListeners

Removes all listeners from an object. You can also optionally remove listeners of some particular type.

Params:

Name Type Description
type string Type of event to remove, default is to remove all types.

Returns:

number - Number of listeners removed.

Try it:

render

Renders the chart editor.

Params:

Name Type Description
value Element Element to render the chart editor into.

Try it:

unlisten

Removes a listener added using listen() or listenOnce() methods.

Params:

Name Type Description
type string The event type id.
listener function Callback method.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

boolean - Whether any listener was removed.

Try it:

unlistenByKey

Removes an event listener which was added with listen() by the key returned by listen() or listenOnce().

Params:

Name Type Description
key Object The key returned by listen() or listenOnce().

Returns:

boolean - Whether any listener was removed.

Try it:

visible

Getter for the visible dialog box of chart editor.

Returns:

boolean - Returns true if the dialog box is visible.

Try it:

Setter for the visible dialog box of chart editor.

Params:

Name Type Description
visible boolean Whether the dialog should be visible.

Returns:

anychart.ui.chartEditor.Dialog - Self instance for method chaining.

Try it: