Nativescript plugin for Charts
    Preparing search index...

    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).

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructor with limit and label.

      Parameters

      • limit: any

        the position (the value) on the y-axis (y-value) or x-axis (xIndex) where this line should appear

      • Optionallabel: any

        provide "" if no label is required

      Returns LimitLine

    Properties

    dashPathEffect: DashPathEffect

    the path effect of this LimitLine that makes dashed lines possible

    drawLabel?: (
        c: Canvas,
        label: string,
        x: number,
        y: number,
        paint: Paint,
    ) => void
    enabled: boolean

    flag that indicates if this axis / legend is enabled or not

    ensureVisible: boolean

    Defines if the renderer should ensure we always see the component fully

    label: string

    label string that is drawn next to the limit line

    labelPosition: LimitLabelPosition

    position of the LimitLine value label (either on the right or on the left edge of the chart). Not supported for RadarChart.

    limit: number

    limit / maximum (the y-value or xIndex)

    lineColor: string | Color

    the color of the limit line

    lineWidth: number

    the width of the limit line thinner line === better performance, thicker line === worse performance

    mTextSize: number

    the text size of the labels

    textColor: string

    the text color to use for the labels

    textStyle: Style

    the style of the label text

    typeface: Font

    the typeface used for the labels

    xOffset: number

    the offset in pixels this component has on the x-axis

    yOffset: number

    the offset in pixels this component has on the Y-axis

    Accessors

    • get font(): Font

      returns the Typeface used for the labels, returns null if none is set

      Returns Font

      Font

    • set font(tf: Font): void

      sets a specific Typeface for the labels

      Parameters

      • tf: Font

      Returns void

    • get textSize(): number

      returns the text size that is currently set for the labels, in pixels

      Returns number

    • set textSize(size: number): void

      sets the size of the label text in density pixels min = 6f, max = 24f, default 10

      Parameters

      • size: number

        the text size, in DP

      Returns void

    Methods

    • Returns void

    • Enables the line to be drawn in dashed mode, e.g. like this "- - - - - -"

      Parameters

      • lineLength: any

        the length of the line pieces

      • spaceLength: any

        the length of space inbetween the pieces

      • phase: any

        offset, in degrees (normally, use 0)

      Returns void