import { Dataset } from "../core/dataset"; import { AttributeToProjector, Bounds, IAccessor, Point } from "../core/interfaces"; import { SymbolFactory } from "../core/symbolFactories"; import { ProxyDrawer } from "../drawers/drawer"; import { Scale } from "../scales/scale"; import * as Drawers from "../drawers"; import * as Plots from "./"; import { IAccessorScaleBinding, ILightweightPlotEntity, IPlotEntity, ITransformableAccessorScaleBinding } from "./"; import { XYPlot } from "./xyPlot"; export interface ILightweightScatterPlotEntity extends ILightweightPlotEntity { diameter: number; } export declare class Scatter extends XYPlot { private static _SIZE_KEY; private static _SYMBOL_KEY; protected static _LABEL_AREA_CLASS: string; private _labelConfig; private _labelFormatter; protected static _LABEL_MARGIN_FROM_BUBBLE: number; private _labelsEnabled; /** * A Scatter Plot draws a symbol at each data point. * * @constructor */ constructor(); protected _buildLightweightPlotEntities(datasets: Dataset[]): Plots.ILightweightScatterPlotEntity[]; protected _createDrawer(dataset: Dataset): ProxyDrawer; /** * Gets the AccessorScaleBinding for the size property of the plot. * The size property corresponds to the area of the symbol. */ size(): ITransformableAccessorScaleBinding; /** * Sets the size property to a constant number or the result of an Accessor. * * @param {number|Accessor} size * @returns {Plots.Scatter} The calling Scatter Plot. */ size(size: number | IAccessor): this; /** * Sets the size property to a scaled constant value or scaled result of an Accessor. * The provided Scale will account for the values when autoDomain()-ing. * * @param {S|Accessor} sectorValue * @param {Scale} scale * @returns {Plots.Scatter} The calling Scatter Plot. */ size(size: S | IAccessor, scale: Scale): this; /** * Gets the AccessorScaleBinding for the symbol property of the plot. * The symbol property corresponds to how the symbol will be drawn. */ symbol(): IAccessorScaleBinding; /** * Sets the symbol property to an Accessor. * * @param {Accessor} symbol * @returns {Plots.Scatter} The calling Scatter Plot. */ symbol(symbol: IAccessor): this; protected _generateDrawSteps(): Drawers.DrawStep[]; protected _propertyProjectors(): AttributeToProjector; protected _constructSymbolGenerator(): (datum: any, index: number, dataset: Dataset) => any; protected _entityBounds(entity: ILightweightScatterPlotEntity): { x: number; y: number; width: number; height: number; }; protected _entityVisibleOnPlot(entity: ILightweightScatterPlotEntity, bounds: Bounds): boolean; /** * Gets the Entities at a particular Point. * * @param {Point} p * @returns {PlotEntity[]} */ entitiesAt(p: Point): IPlotEntity[]; /** * Get whether bar labels are enabled. * * @returns {boolean} Whether bars should display labels or not. */ labelsEnabled(): boolean; /** * Sets whether labels are enabled. * * @param {boolean} labelsEnabled * @returns {Scatter} The calling SCATTER Plot. */ labelsEnabled(enabled: boolean): this; protected _createNodesForDataset(dataset: Dataset): ProxyDrawer; protected _removeDatasetNodes(dataset: Dataset): void; protected _additionalPaint(time: number): void; protected _drawLabels(): void; private _drawLabel(datum, index, dataset, attrToProjector); private _calculateLabelProperties(pointCoordinates, diameter, measurement); private _createLabelContainer(labelArea, labelContainerOrigin, labelOrigin, measurement); }