Nativescript plugin for Charts
    Preparing search index...

    ViewPortHandler for HorizontalBarChart.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    chartHeight: number
    chartRect: RectF
    chartWidth: number
    contentRect: RectF

    this rectangle defines the area in which graph values can be drawn

    mMatrixBuffer: number[] | TypedArray

    buffer for storing the 9 matrix values of a 3x3 matrix

    mMatrixTouch: Matrix

    matrix used for touch events

    Accessors

    • get contentBottom(): number

      Returns number

    • get contentCenter(): { x: number; y: number }

      Returns { x: number; y: number }

    • get contentLeft(): number

      Returns number

    • get contentRight(): number

      Returns number

    • get contentTop(): number

      Returns number

    • get hasChartDimens(): boolean

      Returns boolean

    • get offsetBottom(): number

      Returns number

    • get offsetLeft(): number

      Returns number

    • get offsetRight(): number

      Returns number

    • get offsetTop(): number

      Returns number

    • get scaleX(): number

      Returns number

    • get scaleY(): number

      Returns number

    • get smallestContentExtension(): number

      Returns the smallest extension of the content rect (width or height).

      Returns number

    Methods

    • Returns true if the chart is not yet fully zoomed in on the x-axis

      Returns boolean

    • Returns true if the chart is not yet fully zoomed in on the y-axis

      Returns boolean

    • Returns true if the chart is not yet fully zoomed out on the x-axis

      Returns boolean

    • Returns true if the chart is not yet fully zoomed out on the y-axis

      Returns boolean

    • Centers the viewport around the specified position (x-index and y-value) in the chart. Centering the viewport outside the bounds of the chart is not possible. Makes most sense in combination with the setScaleMinima(...) method.

      Parameters

      • transformedPts: number[] | TypedArray

        the position to center view viewport to

      • view: CanvasView

      Returns void

      save

    • Resets all zooming and dragging and makes the chart fit exactly it's bounds. Output Matrix is available for those who wish to cache the object.

      Parameters

      • OptionaloutputMatrix: any

      Returns any

    • Returns the charts-touch matrix used for translation and scale on touch.

      Returns Matrix

    • Returns number

    • Returns number

    • Returns number

    • Returns number

    • returns the current x-scale factor

      Returns number

    • returns the current y-scale factor

      Returns number

    • Returns the translation (drag / pan) distance on the x-axis

      Returns number

    • Returns the translation (drag / pan) distance on the y-axis

      Returns number

    • Returns true if both drag offsets (x and y) are zero or smaller.

      Returns boolean

    • if the chart is fully zoomed out, return true

      Returns boolean

    • Returns true if the chart is fully zoomed out on it's x-axis (horizontal).

      Returns boolean

    • Returns true if the chart is fully zoomed out on it's y-axis (vertical).

      Returns boolean

    • Parameters

      • x: any
      • y: any

      Returns boolean

    • Parameters

      • y: any

      Returns boolean

    • Parameters

      • x: any

      Returns boolean

    • Parameters

      • x: any

      Returns boolean

    • Parameters

      • y: any

      Returns boolean

    • BELOW METHODS FOR BOUNDS CHECK

      Parameters

      • x: any

      Returns boolean

    • Parameters

      • y: any

      Returns boolean

    • limits the maximum scale and X translation of the given matrix

      Parameters

      • matrix: Matrix
      • content: Rect

      Returns void

    • call this method to refresh the graph with a given matrix

      Parameters

      • newMatrix: Matrix
      • chart: CanvasView
      • invalidate: any

      Returns Matrix

    • Zooms out to original size.

      Parameters

      • outputMatrix: any

      Returns void

    • Parameters

      • offsetLeft: any
      • offsetTop: any
      • offsetRight: any
      • offsetBottom: any

      Returns void

    • Sets the width and height of the chart.

      Parameters

      • width: any
      • height: any

      Returns void

    • Set an offset in dp that allows the user to drag the chart over it's bounds on the x-axis.

      Parameters

      • offset: any

      Returns void

    • Set an offset in dp that allows the user to drag the chart over it's bounds on the y-axis.

      Parameters

      • offset: any

      Returns void

    • Sets the maximum scale factor for the x-axis

      Parameters

      • xScale: any

      Returns void

    • Sets the maximum scale factor for the y-axis

      Parameters

      • yScale: any

      Returns void

    • Sets the minimum scale factor for the x-axis

      Parameters

      • xScale: any

      Returns void

    • Sets the minimum scale factor for the y-axis

      Parameters

      • yScale: any

      Returns void

    • Sets the minimum and maximum scale factors for the x-axis

      Parameters

      • minScaleX: any
      • maxScaleX: any

      Returns void

    • Parameters

      • minScaleY: any
      • maxScaleY: any

      Returns void

    • Parameters

      • scaleX: any
      • scaleY: any

      Returns void

    • Sets the scale factor to the specified values.

      Parameters

      • scaleX: any
      • scaleY: any
      • outputMatrix: any

      Returns any

    • Sets the scale factor to the specified values. x and y is pivot.

      Parameters

      • scaleX: any
      • scaleY: any
      • x: any
      • y: any

      Returns Matrix

    • Post-translates to the specified points. Output matrix allows for caching objects.

      Parameters

      • transformedPts: any
      • OptionaloutputMatrix: any

      Returns any

    • Post-scales by the specified scale factors.

      Parameters

      • scaleX: any
      • scaleY: any
      • outputMatrix: any

      Returns any

    • Post-scales by the specified scale factors. x and y is pivot.

      Parameters

      • scaleX: any
      • scaleY: any
      • x: any
      • y: any
      • outputMatrix: Matrix

      Returns Matrix

    • Zooms in by 1.4f, x and y are the coordinates (in pixels) of the zoom center.

      Parameters

      • x: any
      • y: any
      • outputMatrix: any

      Returns any

    • Parameters

      • x: any
      • y: any
      • outputMatrix: any

      Returns any