Skip to content

Latest commit

 

History

History
639 lines (547 loc) · 22.2 KB

SeriesBase.adoc

File metadata and controls

639 lines (547 loc) · 22.2 KB

/** * Base class for all base series.<br/> * Base class defines common methods, such as those for: * <ul> * <li>Binding series to a scale: <i>xScale, yScale</i></li> * <li>Base color settings: <i>color</i></li> * </ul> * You can also obtain <i>getIterator, getResetIterator</i> iterators here. * @param {(anychart.data.View|anychart.data.Set|Array|string)=} opt_data Series data. * @param {(anychart.enums.TextParsingMode|string|anychart.data.TextParsingSettings)=} opt_csvSettings If CSV string is passed, you can pass CSV parser settings * here as a hash map. * @constructor * @extends {anychart.core.VisualBaseWithBounds} */ anychart.core.SeriesBase;

/** * Getter for series mapping. * @shortDescription Data settings. * @category Data * @example anychart.core.SeriesBase.data_get * @return {!anychart.data.View} Returns series mapping. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.data;

/** * Setter for series mapping. * @example anychart.core.SeriesBase.data_set_asArray Using array * @example anychart.core.SeriesBase.data_set_asArrayofArras Using array of arrays * @example anychart.core.SeriesBase.data_set_asArrayofObjects Using array of object * @example anychart.core.SeriesBase.data_set_asCSV Using CSV * @param {?(anychart.data.View|anychart.data.Set|Array|string)=} opt_data Data to set. * @param {(anychart.enums.TextParsingMode|string|anychart.data.TextParsingSettings)=} opt_csvSettings If CSV string is passed by first param, you can pass CSV parser settings here as a hash map. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.data;

/* * Getter for series meta data. * @shortDescription Series meta data settings. * @category Data * @example anychart.core.SeriesBase.meta_get * @param {=} opt_key Metadata key. * @return {*} Metadata object, key value or itself for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.meta;

/* * Setter for series meta data using object. * @example anychart.core.SeriesBase.meta_set_asObject * @param {=} opt_object Object to replace metadata. * @param {*=} opt_value Meta data value. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.meta;

/* * Setter for series meta data using key. * @example anychart.core.SeriesBase.meta_set * @param {=} opt_key Metadata key. * @param {*=} opt_value Meta data value. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.meta;

/** * Getter for the series name. * @shortDescription Series name settings. * @category Data * @detailed This method can be used as getter only if the value has been previously set. * @example anychart.core.SeriesBase.name_get * @return {string|undefined} Series name value. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.name;

/** * Setter for the series name. * @detailed Basically, name of series is used in Legend displaying, but it can be used in tooltips. * @example anychart.core.SeriesBase.name_set * @param {string=} opt_name Series name to set. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.name;

/** * Getter for the series data tooltip. * @shortDescription Tooltip settings. * @category Interactivity * @example anychart.core.SeriesBase.tooltip_get * @return {anychart.core.ui.Tooltip} Tooltip instance. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.tooltip;

/** * Setter for the series data tooltip. * @detailed Sets series tooltip settings depending on parameter type: * <ul> * <li><b>null/boolean</b> - disable or enable chart tooltip.</li> * <li><b>object</b> - sets chart tooltip settings.</li> * </ul> * @example anychart.core.SeriesBase.tooltip_set_asBool Disable/Enable tooltip * @example anychart.core.SeriesBase.tooltip_set_asObj Using object * @param {(Object|boolean|null)=} opt_settings Tooltip settings. * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.tooltip;

/** * Getter for legend item settings for series. * @shortDescription Legend item settings. * @category Specific settings * @example anychart.core.SeriesBase.legendItem_get * @return {anychart.core.utils.LegendItemSettings} Legend item settings. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.legendItem;

/** * Setter for legend item settings for series. * @example anychart.core.SeriesBase.legendItem_set * @param {Object=} opt_settings Legend item settings object. * @return {anychart.core.SeriesBase} Legend item settings or self for chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.legendItem;

/** * Getter for the series color. * @shortDescription Color settings. * @category Coloring * @example anychart.core.SeriesBase.color_get * @return {string} Series color. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.color;

/** * Setter for the series color. * @detailed <b>Note: </b> <u>color</u> methods sets <b>fill</b> and <b>stroke</b> settings, which means it is not wise to pass * image fill here - stroke doesn’t accept image fill.<br/> * {docs:Graphics/Fill_Settings}Learn more about coloring.{docs} * @example anychart.core.SeriesBase.color_set * @param {string} color Color as a string. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.color;

/** * Getter for the series data labels. * @shortDescription Labels settings. * @category Point Elements * @example anychart.core.SeriesBase.labels_get * @return {anychart.core.ui.LabelsFactory} Labels instance. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.labels;

/** * Setter for the series data labels. * @detailed Sets series labels settings depending on parameter type: * <ul> * <li><b>null/boolean</b> - disable or enable chart labels.</li> * <li><b>object</b> - sets chart labels settings.</li> * </ul> * @example anychart.core.SeriesBase.labels_set_asBool Disable/Enable labels * @example anychart.core.SeriesBase.labels_set_asObj Using object * @param {(Object|boolean|null)=} opt_settings Series data labels settings. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.labels;

/** * Hovers points. * @detailed If index is passed, hovers a point of the series by its index, else hovers all points of the series. * @shortDescription Hover settings. * @category Interactivity * @example anychart.core.SeriesBase.hover * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.hover;

/** * Hovers point by index. * @example anychart.core.SeriesBase.hover_asIndex * @param {number=} opt_index Point index. * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.hover;

/** * Hovers points by indexes. * @example anychart.core.SeriesBase.hover_set_asIndexes * @param {Array<number>=} opt_indexes Array of indexes. * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.hover;

/** * Removes hover from the series. * @category Interactivity * @example anychart.core.SeriesBase.unhover * @param {(number|Array<number>)=} opt_indexOrIndexes Point index or array of indexes. * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.unhover;

/** * Selects point by index. * @shortDescription Select settings. * @category Interactivity * @example anychart.core.SeriesBase.select_set_asIndex * @param {number=} opt_index Index of the point to select. * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.select;

/** * Selects point by indexes. * @example anychart.core.SeriesBase.select_set_asIndexes * @param {(number|Array.<number>)=} opt_indexes Array of indexes of the point to select. * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.select;

/** * Deselects all selected points. * @category Interactivity * @example anychart.core.SeriesBase.unselect_set * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.unselect;

/** * Deselects selected point by index. * @example anychart.core.SeriesBase.unselect_set_asIndex * @param {(number)=} opt_index Index of the point to select. * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.unselect;

/** * Deselects selected points by indexes. * @category Interactivity * @example anychart.core.SeriesBase.unselect_set_asIndexes * @param {(Array.<number>)=} opt_indexes An array of indexes of the point to select. * @return {!anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.unselect;

/** * Gets the state of the series for selection mode. * @shortDescription Selection mode. * @category Specific settings * @example anychart.core.SeriesBase.selectionMode_get * @return {anychart.enums.SelectionMode|string|null} Selection mode. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.selectionMode;

/** * Allows to select points of the series. * To select multiple points, press 'ctrl' and click on them. * @example anychart.core.SeriesBase.selectionMode_set * @param {(anychart.enums.SelectionMode|string|null)=} opt_value ['multiSelect'] Selection mode. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.7.0 */ anychart.core.SeriesBase.prototype.selectionMode;

/** * Getter for the series id. * @shortDescription Series id. * @category Specific settings * @example anychart.core.SeriesBase.id_get * @return {string|number} Series id. * @since 7.8.0 */ anychart.core.SeriesBase.prototype.id;

/** * Setter for the series id. * @detailed If you will set series id that is equal to an existing index, all changes will be set * for the first series with this index. * @example anychart.core.SeriesBase.id_set * @param {(string|number)=} opt_id Id of the series. Default id is equal to internal index. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.8.0 */ anychart.core.SeriesBase.prototype.id;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.bounds;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.left;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.right;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.top;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.bottom;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.width;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.height;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.minWidth;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.minHeight;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.maxWidth;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.maxHeight;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.getPixelBounds;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.zIndex;

/** @inheritDoc */ anychart.core.SeriesBase.prototype.enabled;

/** * Gets wrapped point by index. * @category Point Elements * @example anychart.core.SeriesBase.getPoint * @param {number} index Point index. * @return {anychart.core.SeriesPoint} Wrapped point. * @since 7.8.0 */ anychart.core.SeriesBase.prototype.getPoint;

/* * Gets the statistics value by key. * @category Data * @example anychart.core.SeriesBase.getStat * @param {(anychart.enums.Statistics|string)} key Key. * @return {} Statistics value. * @since 7.8.0 */ anychart.core.SeriesBase.prototype.getStat;

/** * Getter for the accessibility setting. * @shortDescription Accessibility settings. * @category Specific settings * @listing See listing. * var series = chart.line([3, 5, 2, 14, 3]); * var a11y = series.a11y(); * @return {anychart.core.utils.SeriesA11y} Accessibility settings object. * @since 7.11.0 */ anychart.core.SeriesBase.prototype.a11y;

/** * Setter for the accessibility setting. * @detailed If you want to work with accessibility then you only need to turn accessibility on using {@link anychart.core.SeriesBase#a11y} method.<br/> * Sets accessibility setting depending on parameter type: * <ul> * <li><b>boolean</b> - disable or enable accessibility.</li> * <li><b>object</b> - sets accessibility setting.</li> * </ul> * @example anychart.core.SeriesBase.a11y_set_asObj Using object * @example anychart.core.SeriesBase.a11y_set_asBool Enable/disable accessibility * @param {(boolean|Object)=} opt_value Whether to enable accessibility. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 7.11.0 */ anychart.core.SeriesBase.prototype.a11y;

/** * Getter for normal state settings. * @shortDescription Normal state settings. * @category Interactivity * @example anychart.core.SeriesBase.normal_get * @return {anychart.core.StateSettings} Normal state settings. * @since 8.0.0 */ anychart.core.SeriesBase.prototype.normal;

/** * Setter for normal state settings. * @example anychart.core.SeriesBase.normal_set * @param {!Object=} opt_value State settings to set. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 8.0.0 */ anychart.core.SeriesBase.prototype.normal;

/** * Getter for hovered state settings. * @shortDescription Hovered state settings. * @category Interactivity * @example anychart.core.SeriesBase.hovered_get * @return {anychart.core.StateSettings} Hovered state settings * @since 8.0.0 */ anychart.core.SeriesBase.prototype.hovered;

/** * Setter for hovered state settings. * @example anychart.core.SeriesBase.hovered_set * @param {!Object=} opt_value State settings to set. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 8.0.0 */ anychart.core.SeriesBase.prototype.hovered;

/** * Getter for selected state settings. * @shortDescription Selected state settings. * @category Interactivity * @example anychart.core.SeriesBase.selected_get * @return {anychart.core.StateSettings} Selected state settings * @since 8.0.0 */ anychart.core.SeriesBase.prototype.selected;

/** * Setter for selected state settings. * @example anychart.core.SeriesBase.selected_set * @param {!Object=} opt_value State settings to set. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 8.0.0 */ anychart.core.SeriesBase.prototype.selected;

/** * Getter for series data markers. * @shortDescription Markers settings. * @category Point Elements * @return {!anychart.core.ui.MarkersFactory} Markers instance. */ anychart.core.SeriesBase.prototype.markers;

/** * Setter for series data markers. * @detailed Sets series markers settings depending on parameter type: * <ul> * <li><b>null/boolean</b> - disable or enable series markers.</li> * <li><b>object</b> - sets series markers settings.</li> * <li><b>string</b> - sets series markers type.</li> * </ul> * @param {(Object|boolean|null|string)=} opt_value [false] Series data markers settings. * @return {anychart.core.SeriesBase} Self instance for method chaining. */ anychart.core.SeriesBase.prototype.markers;

/** * Getter for the color scale. * @shortDescription Color scale settings. * @category Coloring * @listing See listing * var series = chart.line(); * var colorScale = series.colorScale(); * @return {anychart.scales.LinearColor|anychart.scales.OrdinalColor} Color scale instance. * @since 8.3.0 */ anychart.core.SeriesBase.prototype.colorScale;

/** * Setter for the color scale. * @example anychart.core.SeriesBase.colorScale_set * @param {(anychart.scales.LinearColor|anychart.scales.OrdinalColor|Object|anychart.enums.ScaleTypes|string)=} opt_settings Scale to set. * @return {anychart.core.SeriesBase} Self instance for method chaining. * @since 8.3.0 */ anychart.core.SeriesBase.prototype.colorScale;