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.

107 lines (106 loc) 3.69 kB
import { DashPathEffect, Shader } from '@nativescript-community/ui-canvas'; import { ObservableArray } from '@nativescript/core'; import { Color } from '@nativescript/core/color'; import { IFillFormatter } from '../formatter/IFillFormatter'; import { ILineDataSet } from '../interfaces/datasets/ILineDataSet'; import { Entry } from './Entry'; import { LineRadarDataSet } from './LineRadarDataSet'; export declare enum Mode { LINEAR = 0, STEPPED = 1, CUBIC_BEZIER = 2, HORIZONTAL_BEZIER = 3 } export declare class LineDataSet extends LineRadarDataSet<Entry> implements ILineDataSet { /** * Drawing mode for this line dataset **/ mode: Mode; /** * List representing all colors that are used for the circles */ circleColors: string[] | Color[]; /** * the color of the inner circles */ circleHoleColor: Color; /** * the radius of the circle-shaped value indicators */ circleRadius: number; /** * the hole radius of the circle-shaped value indicators */ circleHoleRadius: number; /** * sets the intensity of the cubic lines (if enabled). Max = 1 = very cubic, * Min = 0.05f = low cubic effect, Default: 0.2f */ cubicIntensity: number; /** * the path effect of this DataSet that makes dashed lines possible */ dashPathEffect: DashPathEffect; /** * the path effect of this DataSet that makes dashed lines possible */ shader: Shader; /** * formatter for customizing the position of the fill-line */ fillFormatter: IFillFormatter; /** * if true, drawing circles is enabled */ drawCirclesEnabled: boolean; drawCircleHoleEnabled: boolean; useColorsForFill: boolean; useColorsForLine: boolean; /** * the max number allowed point before filtering. <= O means disabled */ maxFilterNumber: number; constructor(yVals: any, label: any, xProperty?: any, yProperty?: any); getCircleColor(index: any): string | Color; /** * Sets the colors that should be used for the circles of this DataSet. * Colors are reused as soon as the number of Entries the DataSet represents * is higher than the size of the colors array. Make sure that the colors * are already prepared (by calling getResources().getColor(...)) before * adding them to the DataSet. * * @param colors */ setCircleColors(colors: string[] | Color[]): void; /** * Sets the one and ONLY color that should be used for this DataSet. * Internally, this recreates the colors array and adds the specified color. * * @param color */ set circleColor(color: any); protected mFilteredValues: Entry[]; protected mFilterFunction: any; applyFiltering(scaleX: number): void; mIgnoreFiltered: boolean; protected getInternalValues(): Entry[] | ObservableArray<Entry>; set ignoreFiltered(value: boolean); get ignoreFiltered(): boolean; set values(values: any); get filtered(): boolean; /** * Property definining wheter circles are drawn in high res. * Default true */ circleHighRes: boolean; /** * Enables the line to be drawn in dashed mode, e.g. like this * "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF. * Keep in mind that hardware acceleration boosts performance. * * @param lineLength the length of the line pieces * @param spaceLength the length of space in between the pieces * @param phase offset, in degrees (normally, use 0) */ enableDashedLine(lineLength: any, spaceLength: any, phase: any): void; }