Nativescript plugin for Charts
    Preparing search index...

    Created by philipp on 21/10/15.

    interface IScatterDataSet {
        axisDependency: AxisDependency;
        color: string | Color;
        colors: (string | Color)[];
        drawHorizontalHighlightIndicator: boolean;
        drawIconsEnabled: boolean;
        drawValuesEnabled: boolean;
        drawVerticalHighlightIndicator: boolea;
        entryCount: number;
        fillShader: any;
        form: LegendForm;
        formLineDashEffect: DashPathEffect;
        formLineWidth: number;
        formSize: number;
        highlightColor: any;
        highlightDashPathEffect: PathEffect;
        highlightEnabled: boolean;
        highlightLineWidth: number;
        iconsOffset: MPPointF;
        label: string;
        needsFormatter: boolean;
        scatterShape: ScatterShape;
        scatterShapeHoleColor: string | Color;
        scatterShapeHoleRadius: number;
        scatterShapeSize: number;
        shapeRenderer: IShapeRenderer;
        valueFormatter: IValueFormatter;
        values: Entry[] | ObservableArray<Entry>;
        valueTextColor: string | Color;
        valueTextColors: (string | Color)[];
        valueTextSize: number;
        valueTypeface: Font;
        visible: boolean;
        xMax: number;
        xMin: number;
        xProperty: string;
        yMax: number;
        yMin: number;
        yProperty: string;
        addEntry(e: Entry): boolean;
        addEntryOrdered(e: Entry): any;
        calcMinMax(): any;
        calcMinMaxYRange(fromX: number, toX: number): any;
        clear(): any;
        contains(entry: Entry): boolean;
        getColor(index?: number): string | Color;
        getEntriesAndIndexesForXValue(
            xValue: number,
        ): { entry: Entry; index: number }[];
        getEntriesForXValue(xValue: number): Entry[] | ObservableArray<Entry>;
        getEntryAndIndexForXValue(
            xValue: number,
            closestToY: number,
            rounding?: Rounding,
        ): { entry: Entry; index: number };
        getEntryForIndex(index: number): Entry;
        getEntryForXValue(
            xValue: number,
            closestToY: number,
            rounding?: Rounding,
        ): Entry;
        getEntryIndex(e: Entry): number;
        getEntryIndexForXValue(
            xValue: number,
            closestToY: number,
            rounding: Rounding,
        ): number;
        getEntryXValue(e: BaseEntry, entryIndex: number): number;
        getEntryYValue(e: Entry): number;
        getIndexInEntries(xIndex: number): number;
        init(): any;
        removeEntry(e: Entry): boolean;
        removeEntryAtIndex(index: number): boolean;
        removeEntryByXValue(xValue: number): boolean;
        removeFirst(): boolean;
        removeLast(): boolean;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    axisDependency: AxisDependency

    the axis this DataSet should be plotted against.

    color: string | Color
    colors: (string | Color)[]

    returns all the colors that are set for this DataSet

    drawHorizontalHighlightIndicator: boolean

    Returns true if vertical highlight indicator lines are enabled (drawn)

    drawIconsEnabled: boolean

    Set this to true to draw y-icons on the chart.

    NOTE (for bar and line charts): if maxVisibleValueCount is reached, no icons will be drawn even if this is enabled

    drawValuesEnabled: boolean

    set this to true to draw y-values on the chart.

    NOTE (for bar and line charts): if maxVisibleValueCount is reached, no values will be drawn even if this is enabled

    drawVerticalHighlightIndicator: boolea

    Returns true if vertical highlight indicator lines are enabled (drawn)

    entryCount: number

    Returns the number of y-values this DataSet represents -> the size of the y-values array -> yvals.length

    fillShader: any

    Returns the shader used for filling the area below the line.

    The form to draw for this dataset in the legend.

    Return `DEFAULT` to use the default legend form.

    formLineDashEffect: DashPathEffect

    The line dash path effect used for shapes that consist of lines.

    Return `null` to use the default legend form line dash effect.

    formLineWidth: number

    The line width for drawing the form of this dataset in the legend

    Return `Float.NaN` to use the default legend form line width.

    formSize: number

    The form size to draw for this dataset in the legend.

    Return `Float.NaN` to use the default legend form size.

    highlightColor: any

    Returns the color that is used for drawing the highlight indicators.

    highlightDashPathEffect: PathEffect

    Returns the DashPathEffect that is used for highlighting.

    highlightEnabled: boolean

    If set to true, value highlighting is enabled which means that values can be highlighted programmatically or by touch gesture.

    highlightLineWidth: number

    Returns the line-width in which highlight lines are to be drawn.

    iconsOffset: MPPointF

    Offset of icons drawn on the chart.

    For all charts except Pie and Radar it will be ordinary (x offset,y offset).

    For Pie and Radar chart it will be (y offset, distance from center offset); so if you want icon to be rendered under value, you should increase X component of CGPoint, and if you want icon to be rendered closet to center, you should decrease height component of CGPoint.

    label: string

    the label string that describes the DataSet.

    needsFormatter: boolean

    Returns true if the valueFormatter object of this DataSet is null.

    scatterShape: ScatterShape

    Sets the ScatterShape this DataSet should be drawn with. This will search for an available IShapeRenderer and set this renderer for the DataSet.

    scatterShapeHoleColor: string | Color

    Color for the hole in the shape. Setting to ColorTemplate.COLOR_NONE will behave as transparent.

    • default: ColorTemplate.COLOR_NONE
    scatterShapeHoleRadius: number

    The radius of the hole in the shape (applies to Square, Circle and Triangle)

    • default: 0.0
    scatterShapeSize: number

    the size the scattershape will have, in density pixels

    shapeRenderer: IShapeRenderer

    Renderer responsible for rendering this DataSet, default: square

    valueFormatter: IValueFormatter

    Sets the formatter to be used for drawing the values inside the chart. If no formatter is set, the chart will automatically determine a reasonable formatting (concerning decimals) for all the values that are drawn inside the chart. Use chart.defaultValueFormatter to use the formatter calculated by the chart.

    values: Entry[] | ObservableArray<Entry>

    getEntryYValue

    Returns the values that belong to DataSet.

    valueTextColor: string | Color

    Sets the color the value-labels of this DataSet should have.

    valueTextColors: (string | Color)[]

    Sets a list of colors to be used as the colors for the drawn values.

    valueTextSize: number

    Sets the text-size of the value-labels of this DataSet in dp.

    valueTypeface: Font

    Sets a Typeface for the value-labels of this DataSet.

    visible: boolean

    Set the visibility of this DataSet. If not visible, the DataSet will not be drawn to the chart upon refreshing it.

    xMax: number

    returns the maximum x-value this DataSet holds

    xMin: number

    returns the minimum x-value this DataSet holds

    xProperty: string
    yMax: number

    returns the maximum y-value this DataSet holds

    yMin: number

    returns the minimum y-value this DataSet holds

    yProperty: string

    Methods

    • Adds an Entry to the DataSet dynamically. Entries are added to the end of the list. This will also recalculate the current minimum and maximum values of the DataSet and the value-sum.

      Parameters

      Returns boolean

    • Adds an Entry to the DataSet dynamically. Entries are added to their appropriate index in the values array respective to their x-position. This will also recalculate the current minimum and maximum values of the DataSet and the value-sum.

      Parameters

      Returns any

    • Calculates the minimum and maximum x and y values (mXMin, this.mXMax, this.mYMin, this.mYMax).

      Returns any

    • Calculates the min and max y-values from the Entry closest to the given fromX to the Entry closest to the given toX value. This is only needed for the autoScaleMinMax feature.

      Parameters

      • fromX: number
      • toX: number

      Returns any

    • Removes all values from this DataSet and does all necessary recalculations.

      Returns any

    • Checks if this DataSet contains the specified Entry. Returns true if so, false if not. NOTE: Performance is pretty bad on this one, do not over-use in performance critical situations.

      Parameters

      Returns boolean

    • Returns the color at the given index of the DataSet's color array. Performs a IndexOutOfBounds check by modulus.

      Parameters

      • Optionalindex: number

      Returns string | Color

    • Returns all Entry objects found at the given x-value with binary search. An empty array if no Entry object at that x-value. INFORMATION: This method does calculations at runtime. Do not over-use in performance critical situations.

      Parameters

      • xValue: number

      Returns { entry: Entry; index: number }[]

    • Returns all Entry objects found at the given x-value with binary search. An empty array if no Entry object at that x-value. INFORMATION: This method does calculations at runtime. Do not over-use in performance critical situations.

      Parameters

      • xValue: number

      Returns Entry[] | ObservableArray<Entry>

    • Returns the first Entry object found at the given x-value with binary search. If the no Entry at the specified x-value is found, this method returns the Entry at the closest x-value according to the rounding. INFORMATION: This method does calculations at runtime. Do not over-use in performance critical situations.

      Parameters

      • xValue: number

        the x-value

      • closestToY: number

        If there are multiple y-values for the specified x-value,

      • Optionalrounding: Rounding

        determine whether to round up/down/closest if there is no Entry matching the provided x-value

      Returns { entry: Entry; index: number }

    • Returns the Entry object found at the given index (NOT xIndex) in the values array.

      Parameters

      • index: number

      Returns Entry

    • Returns the first Entry object found at the given x-value with binary search. If the no Entry at the specified x-value is found, this method returns the Entry at the closest x-value according to the rounding. INFORMATION: This method does calculations at runtime. Do not over-use in performance critical situations.

      Parameters

      • xValue: number

        the x-value

      • closestToY: number

        If there are multiple y-values for the specified x-value,

      • Optionalrounding: Rounding

        determine whether to round up/down/closest if there is no Entry matching the provided x-value

      Returns Entry

    • Returns the position of the provided entry in the DataSets Entry array. Returns -1 if doesn't exist.

      Parameters

      Returns number

    • Returns the first Entry index found at the given x-value with binary search. If the no Entry at the specified x-value is found, this method returns the Entry at the closest x-value according to the rounding. INFORMATION: This method does calculations at runtime. Do not over-use in performance critical situations.

      Parameters

      • xValue: number

        the x-value

      • closestToY: number

        If there are multiple y-values for the specified x-value,

      • rounding: Rounding

        determine whether to round up/down/closest if there is no Entry matching the provided x-value

      Returns number

    • Parameters

      • e: BaseEntry
      • entryIndex: number

      Returns number

    • This method returns the actual index in the Entry array of the DataSet for a given xIndex. IMPORTANT: This method does calculations at runtime, do not over-use in performance critical situations.

      Parameters

      • xIndex: number

      Returns number

    • Removes an Entry from the DataSets entries array. This will also recalculate the current minimum and maximum values of the DataSet and the value-sum. Returns true if an Entry was removed, false if no Entry could be removed.

      Parameters

      Returns boolean

    • Removes the Entry object at the given index in the values array from the DataSet. Returns true if an Entry was removed, false if no Entry could be removed.

      Parameters

      • index: number

      Returns boolean

    • Removes the Entry object closest to the given x-value from the DataSet. Returns true if an Entry was removed, false if no Entry could be removed.

      Parameters

      • xValue: number

      Returns boolean

    • Removes the first Entry (at index 0) of this DataSet from the entries array. Returns true if successful, false if not.

      Returns boolean

    • Removes the last Entry (at index size-1) of this DataSet from the entries array. Returns true if successful, false if not.

      Returns boolean