UNPKG

@nativescript-community/ui-chart

Version:

A powerful chart / graph plugin, supporting line, bar, pie, radar, bubble, and candlestick charts as well as scaling, panning and animations.

58 lines (57 loc) 2.06 kB
import { ChartAnimator } from '../animation/ChartAnimator'; import { BarLineScatterCandleBubbleDataSet } from '../data/BarLineScatterCandleBubbleDataSet'; import { Entry } from '../data/Entry'; import { BarLineScatterCandleBubbleDataProvider } from '../interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider'; import { IBarLineScatterCandleBubbleDataSet } from '../interfaces/datasets/IBarLineScatterCandleBubbleDataSet'; import { IDataSet } from '../interfaces/datasets/IDataSet'; import { ViewPortHandler } from '../utils/ViewPortHandler'; import { DataRenderer } from './DataRenderer'; /** * Class representing the bounds of the current viewport in terms of indices in the values array of a DataSet. */ export declare class XBounds { /** * minimum visible entry index */ min: number; /** * maximum visible entry index */ max: number; /** * range of visible entry indices */ range: number; /** * Calculates the minimum and maximum x values as well as the range between them. * * @param chart * @param dataSet */ set<T extends Entry>(chart: BarLineScatterCandleBubbleDataProvider, dataSet: BarLineScatterCandleBubbleDataSet<T>, animator: ChartAnimator): void; } /** * Created by Philipp Jahoda on 09/06/16. */ export declare abstract class BarLineScatterCandleBubbleRenderer extends DataRenderer { /** * buffer for storing the current minimum and maximum visible x */ protected mXBounds: XBounds; constructor(animator: ChartAnimator, viewPortHandler: ViewPortHandler); /** * Returns true if the DataSet values should be drawn, false if not. * * @param set * @return */ protected shouldDrawValues(set: IDataSet<any>): boolean; /** * Checks if the provided entry object is in bounds for drawing considering the current animation phase. * * @param e * @param set * @return */ protected isInBoundsX(e: Entry, set: IBarLineScatterCandleBubbleDataSet<any>): boolean; }