Configuration API

All methods and classes AnyChart Chart Editor works with can be found in the anychart.editor namespace.

Create

To create a chart editor, which is defined as an instance of the anychart.editor.Editor class, use the anychart.editor() method:

// create a chart editor
var editor = anychart.editor();

Render

A basic way to render a chart editor is the render() method:

// create a chart editor
var editor = anychart.editor();

// render the chart editor in a div or other element
editor.render(document.getElementById("editor-container"));

You can also use decorate() if it is required.

If you wish to render a chart editor as a modal window, use the dialogRender() method along with the dialogVisible() method:

// create a chart editor
var editor = anychart.editor();
 
// set a class name for the dialog element.
editor.dialogRender("custom-editor-dialog");
// display the modal chart editor
editor.dialogVisible(true);

Show and Hide

Use the show() method and the hide() method to show or hide the chart editor.

Steps

Chart Editor has several steps identified by their names. The names of the steps are listed in the anychart.enums.EditorSteps enum. You can disable any step if you don't want to see it:

var editor = anychart.editor();
 
// get a step by the "export" name.
var step = editor.step("export");
// disable the step
step.enabled(false);

Tabs

Steps contain tabs which are identified by their names. The names of the tabs are listed in the anychart.enums.EditorTabs enum. Tabs within steps can also be disabled:

var editor = anychart.editor();
var step = editor.step('chart');
 
// Disable the 'legend' tab in the step with 'chart' name.
step.tab('legend', false);