Skip to content

Latest commit

 

History

History
213 lines (185 loc) · 7.46 KB

anychart.adoc

File metadata and controls

213 lines (185 loc) · 7.46 KB

/** * Core space for all anychart components. * @namespace * @name anychart */ anychart;

/** * The current version of the framework. * @example anychart.VERSION * @define {string} Replaced at compile time. */ anychart.VERSION;

/** * Defines if it is developer edition. * @example anychart.DEVELOP * @define {boolean} Replaced at compile time. */ anychart.DEVELOP;

/* * Creates an element by JSON config. * @category XML/JSON * @example anychart.fromJson * @param {(Object|string)} jsonConfig Config. * @return {} Element created by config. */ anychart.fromJson;

/* * Creates an element by XML config. * @category XML/JSON * @example anychart.fromXml * @param {string|Node} xmlConfig Config. * @return {} Element created by config. */ anychart.fromXml;

/* * Adds callback for the document load event.<br/> * It is fired when the entire page loads, including its content (images, CSS, scripts, etc.). * @param {Function} func A function which is called on document load event. * @param {=} opt_scope Function call context. */ anychart.onDocumentLoad;

/* * Adds callback for the document ready event.<br/> * It is called when the DOM is ready, this can happen prior to loading images and other external content. * @example anychart.onDocumentReady * @param {Function} func A function which is called on document load event. * @param {=} opt_scope Function call context. */ anychart.onDocumentReady;

/** * Setter for AnyChart license key.<br/> * To purchase a license proceed to <a href="https://www.anychart.com/buy/">Buy AnyChart</a> page. * @example anychart.licenseKey * @param {string=} opt_key Your licence key. * @return {?string} Current license key. */ anychart.licenseKey;

/** * @ignoreDoc The doclet doesn’t look good in the API Reference. * @deprecated Use anychart.exports.server instead. * Gets an address export server script, which is used to export to an image or PDF. * @return {string} Returns the current address of the export server. * @since 7.5.1 */ anychart.server;

/** * @ignoreDoc * @deprecated Use anychart.exports.server instead. * Sets an address export server script, which is used to export to an image or PDF.<br/> * See: <li>{@link anychart.graphics.vector.Stage#saveAsPdf}</li> * <li>{@link anychart.graphics.vector.Stage#saveAsPng}</li> * <li>{@link anychart.graphics.vector.Stage#saveAsJpg}</li> * <li>{@link anychart.graphics.vector.Stage#saveAsSvg}</li> * @detailed <b>Note</b>: If it doesn’t set the address of the export server, you will get the current address * of the export server. * @param {string=} opt_address Export server script URL. * @since 7.5.1 */ anychart.server;

/** * @ignoreDoc For need developer. * Defines the default theme. * @define {string} Replaced on compile time. */ anychart.DEFAULT_THEME;

/** * Sets the theme for or gets the current theme. * {docs:Appearance_Settings/Themes}Learn more about themes.{docs} * @detailed <b>Note</b>: If it doesn’t set the theme, you will get the current theme.<br/> * <br/> * For example, to use theme name "pastel" you have to connect special theme file with the name pastel.js.<br/> * This file, as well as other files, can be found at {@link https://cdn.anychart.com/#themes}.<br/>; * After referencing the file you can use theme() method with "pastel" parameter to apply pastel theme: anychart.theme("pastel");<br/> * <br/> * To disable installed themes - pass <b>null</b>.<br/> * <br/> * Sets theme settings depending on parameter type: * <ul> * <li><b>null</b> - disable passed theme settings.</li> * <li><b>object</b> - sets theme settings.</li> * <li><b>string</b> - sets theme name.</li> * <li><b>array</b> - sets theme name and theme settings.</li> * </ul> * @example anychart.theme_set_asWines Using wines theme * @example anychart.theme_set_asPastel Using pastel theme * @example anychart.theme_set_asMorning Using morning theme * @example anychart.theme_set_asObj Using object with theme settings * @example anychart.theme_set_asArrayofStringObject Using array of string and object * @param {(string|Object|Array<string|Object>|null)=} opt_settings ['defaultTheme'] Object with theme settings or name of the theme or array of objects/names of the themes. * @return {string|Object|Array<string|Object>} Object with theme settings. * @since 7.6.0 */ anychart.theme;

/** * Append theme for anychart globally.<br/> * This method applies the theme or theme settings over the existing theme. * @example anychart.appendTheme * @param {string|Object} value An object with theme settings or the name of the theme. * @since 7.11.1 */ anychart.appendTheme;

/** * @ignoreDoc It doesn’t need for user. It need for the build with flag -pm. * @define {boolean} Replaced on compile time. */ anychart.PERFORMANCE_MONITORING;

/** * Creates Chart Editor.<br/> * Chart Editor allows to create and work with Anychart JavaScript Charts.<br> * <br> * <i>To work with the Chart Editor you need to reference the extension file from AnyChart CDN * (example for the versioned file: https://cdn.anychart.com/releases/{{branch-name}}/js/anychart-editor.min.js)</i>; * @listing Sample for the editor function. * <pre> // Create the chart editor. * var editor = anychart.editor(); * * editor.render(document.getElementById('container'));</pre> * * See sample at {@link https://www.anychart.com/features/chart_editor/demo.html} * @return {anychart.editor.Editor} Chart editor. * @since 8.3.0 */ anychart.editor;

/** * Returns tracking chart by it’s id. * @example anychart.getChartById * @param {!string} id Chart id to set. * @return {anychart.core.Chart} Returns chart. */ anychart.getChartById;