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.

57 lines (55 loc) 2.2 kB
import { Canvas, DashPathEffect, Paint } from '@nativescript-community/ui-canvas'; import { Color } from '@nativescript/core'; import { ComponentBase } from './ComponentBase'; /** enum that indicates the position of the LimitLine label */ export declare enum LimitLabelPosition { LEFT_TOP = 0, LEFT_BOTTOM = 1, CENTER_TOP = 2, CENTER_BOTTOM = 3, RIGHT_TOP = 4, RIGHT_BOTTOM = 5 } /** * The limit line is an additional feature for all Line-, Bar- and * ScatterCharts. It allows the displaying of an additional line in the chart * that marks a certain maximum / limit on the specified axis (x- or y-axis). * */ export declare class LimitLine extends ComponentBase { /** limit / maximum (the y-value or xIndex) */ limit: number; /** the width of the limit line * thinner line === better performance, thicker line === worse performance */ lineWidth: number; /** the color of the limit line */ lineColor: Color | string; /** the style of the label text */ textStyle: globalAndroid.graphics.Paint.Style; /** label string that is drawn next to the limit line */ label: string; /** the path effect of this LimitLine that makes dashed lines possible */ dashPathEffect: DashPathEffect; /** position of the LimitLine value label (either on the right or on * the left edge of the chart). Not supported for RadarChart. */ labelPosition: LimitLabelPosition; /** * Constructor with limit and label. * * @param limit - the position (the value) on the y-axis (y-value) or x-axis * (xIndex) where this line should appear * @param label - provide "" if no label is required */ constructor(limit: any, label?: any); /** * Enables the line to be drawn in dashed mode, e.g. like this "- - - - - -" * * @param lineLength the length of the line pieces * @param spaceLength the length of space inbetween the pieces * @param phase offset, in degrees (normally, use 0) */ enableDashedLine(lineLength: any, spaceLength: any, phase: any): void; drawLabel?: (c: Canvas, label: string, x: number, y: number, paint: Paint) => void; }