@amcharts/amcharts4
Version:
amCharts 4
200 lines (199 loc) • 6 kB
TypeScript
/**
* Module, defining Axis Renderer for vertical axes.
*/
/**
* ============================================================================
* IMPORTS
* ============================================================================
* @hidden
*/
import { AxisRenderer, IAxisRendererProperties, IAxisRendererAdapters, IAxisRendererEvents } from "./AxisRenderer";
import { Sprite } from "../../core/Sprite";
import { IPoint } from "../../core/defs/IPoint";
import { Axis } from "./Axis";
import { Grid } from "./Grid";
import { AxisTick } from "./AxisTick";
import { AxisLabel } from "./AxisLabel";
import { AxisBreak } from "./AxisBreak";
/**
* ============================================================================
* REQUISITES
* ============================================================================
* @hidden
*/
/**
* Defines properties for [[AxisRendererX]].
*/
export interface IAxisRendererXProperties extends IAxisRendererProperties {
}
/**
* Defines events for [[AxisRendererX]].
*/
export interface IAxisRendererXEvents extends IAxisRendererEvents {
}
/**
* Defines adapters for [[AxisRendererX]].
*
* @see {@link Adapter}
*/
export interface IAxisRendererXAdapters extends IAxisRendererAdapters, IAxisRendererXProperties {
}
/**
* ============================================================================
* MAIN CLASS
* ============================================================================
* @hidden
*/
/**
* A renderer for horizontal axis.
*
* @see {@link IAxisRendererEvents} for a list of available events
* @see {@link IAxisRendererAdapters} for a list of available Adapters
*/
export declare class AxisRendererX extends AxisRenderer {
/**
* Defines available properties.
*/
_properties: IAxisRendererXProperties;
/**
* Defines available adapters.
*/
_adapter: IAxisRendererXAdapters;
/**
* Defines available events.
*/
_events: IAxisRendererXEvents;
/**
* Constructor.
*
* @param axis Related axis
*/
constructor();
/**
* @ignore
*/
setAxis(axis: Axis): void;
/**
* @ignore
*/
updateGridContainer(): void;
/**
* Called when rendered is attached to an Axis, as well as a property of
* Axis that might affect the appearance is updated.
*
* E.g. `axis.opposite`, `axis.inside`, etc.
*
* This method is called **before** draw, so that any related setting
* changed in this method can be changed.
*
* @todo Description (review)
* @ignore Exclude from docs
*/
processRenderer(): void;
/**
* Updates some of the Axis tooltip's visual properties, related to
* rendering of the Axis.
*
* @todo Description (review)
* @ignore Exclude from docs
*/
updateTooltip(): void;
/**
* Updates and positions a label element.
*
* @ignore Exclude from docs
* @param label Label element
* @param position Starting position
* @param endPosition Ending position
*/
updateLabelElement(label: AxisLabel, position: number, endPosition: number, location?: number): void;
/**
* Returns actual length of the Axis, in pixels.
*
* @return Length (px)
*/
readonly axisLength: number;
/**
* Converts relative position on axis to point coordinates.
*
* @param position Position (0-1)
* @param position2 Position (0-1) Position on the second axis
* @return Point
*/
positionToPoint(position: number, position2?: number): IPoint;
/**
* Converts a point at specific coordinates to a relative position (0-1)
* on the axis.
*
* @param point Point
* @return Position (0-1)
*/
pointToPosition(point: IPoint): number;
/**
* [getPositionRangePath description]
*
* @ignore Exclude from docs
* @todo Description
* @param startPosition Starting position
* @param endPosition End position
* @return SVG path
*/
getPositionRangePath(startPosition: number, endPosition: number): string;
/**
* Updates and positions an axis break element.
*
* @ignore Exclude from docs
* @param axisBreak Break element
*/
updateBreakElement(axisBreak: AxisBreak): void;
/**
* Updates and positions a grid element.
*
* @ignore Exclude from docs
* @param grid Grid element
* @param position Starting position
* @param endPosition End position
*/
updateGridElement(grid: Grid, position: number, endPosition: number): void;
/**
* Updates and positions a tick element.
*
* @ignore Exclude from docs
* @param tick Tick element
* @param position Starting position
* @param endPosition End position
*/
updateTickElement(tick: AxisTick, position: number, endPosition: number): void;
/**
* Updates and positions the axis line element.
*
* @ignore Exclude from docs
*/
updateAxisLine(): void;
/**
* Updates and positions the base grid element.
*
* @ignore Exclude from docs
*/
updateBaseGridElement(): void;
/**
* Creates visual elements for and axis break.
*
* @ignore Exclude from docs
* @param axisBreak Axis break
*/
createBreakSprites(axisBreak: AxisBreak): void;
/**
* @ignore
*/
toAxisPosition(value: number): number;
/**
* Updates and positions axis bullets.
*
* @ignore Exclude from docs
* @param bullet AxisBullet element
* @param position Starting position
* @param endPosition End position
*/
updateBullet(bullet: Sprite, position: number, endPosition: number): void;
}