@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.
60 lines (59 loc) • 2.66 kB
TypeScript
import { TypedArray } from '@nativescript-community/arraybuffers';
import { Canvas, Paint, RectF } from '@nativescript-community/ui-canvas';
import { LimitLine } from '../components/LimitLine';
import { XAxis } from '../components/XAxis';
import { MPPointF } from '../utils/MPPointF';
import { Transformer } from '../utils/Transformer';
import { ViewPortHandler } from '../utils/ViewPortHandler';
import { AxisRenderer, CustomRendererGridLineFunction, CustomRendererLabelFunction, CustomRendererLimitLineFunction } from './AxisRenderer';
export declare class XAxisRenderer extends AxisRenderer {
protected xAxis: XAxis;
protected mForceLongestLabelComputation: boolean;
protected mLabelsPositionsBuffer: TypedArray;
protected mRenderGridLinesBuffer: TypedArray;
constructor(viewPortHandler: ViewPortHandler, xAxis: XAxis, trans: Transformer);
protected createAxisLabelsPaint(): Paint;
getCurrentMinMax(min?: any, max?: any, inverted?: any): {
min: any;
max: any;
};
protected computeAxisValues(min: any, max: any): void;
protected computeSize(): void;
renderAxisLabels(c: Canvas): void;
renderAxisLine(c: Canvas): void;
/**
* draws the x-labels on the specified y-position
*
* @param pos
*/
protected drawLabels(c: Canvas, pos: any, anchor: MPPointF): void;
protected drawLabel(c: Canvas, formattedLabel: string, x: number, y: number, anchor: MPPointF, angleDegrees: number, paint: Paint, customRenderFunction?: CustomRendererLabelFunction): void;
/**
* Draw the mark tickets on the specified y-position
* @param c
* @param pos
* @param length
*/
protected drawMarkTick(c: Canvas, pos: any, ticklength: any): void;
renderGridLines(c: Canvas): void;
getGridClippingRect(): RectF;
/**
* Draws the grid line at the specified position using the provided path.
*
* @param c
* @param rect
* @param x
* @param y
* @param axisValue
*/
protected drawGridLine(c: Canvas, rect: RectF, x: any, y: any, axisValue: any, paint: Paint, customRendererFunc: CustomRendererGridLineFunction): void;
/**
* Draws the LimitLines associated with this axis to the screen.
*
* @param c
*/
renderLimitLines(c: Canvas): void;
renderLimitLineLine(c: Canvas, limitLine: LimitLine, rect: RectF, x: number, customRendererFunc?: CustomRendererLimitLineFunction): void;
drawLimitLineLabel(c: Canvas, limitLine: LimitLine, label: string, x: number, y: number, paint: Paint): void;
renderLimitLineLabel(c: Canvas, limitLine: LimitLine, position: any, yOffset: any): void;
}