Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ProgressivePattern <TProps >

Base class for Progressive DataPattern objects.

Index

Methods

Abstract getXMax

  • getXMax(segments: VisualType[], newPointsBound: Interval<Point> | undefined): number | undefined
  • Type parameters

    • VisualType: BasicChartVisual

    Parameters

    • segments: VisualType[]
    • newPointsBound: Interval<Point> | undefined

    Returns number | undefined

    Max X value of the series

Abstract getXMin

  • getXMin(segments: VisualType[], newPointsBound: Interval<Point> | undefined): number | undefined
  • Type parameters

    • VisualType: BasicChartVisual

    Parameters

    • segments: VisualType[]
    • newPointsBound: Interval<Point> | undefined

    Returns number | undefined

    Min X value of the series

Abstract getYMax

  • getYMax(segments: VisualType[], newPointsBound: Interval<Point> | undefined): number | undefined
  • Type parameters

    • VisualType: BasicChartVisual

    Parameters

    • segments: VisualType[]
    • newPointsBound: Interval<Point> | undefined

    Returns number | undefined

    Max Y value of the series

Abstract getYMin

  • getYMin(segments: VisualType[], newPointsBound: Interval<Point> | undefined): number | undefined
  • Type parameters

    • VisualType: BasicChartVisual

    Parameters

    • segments: VisualType[]
    • newPointsBound: Interval<Point> | undefined

    Returns number | undefined

    Min Y value of the series

Abstract setPrecision

  • setPrecision(precision: "normal" | "high"): this
  • Set precision of data packing optimization.

    Example usage:

    Normal precision

     DataPatterns.horizontalProgressive.setPrecision( 'normal' )

    High precision

    Sometimes needed if data is very dense, yet still detailed.

     DataPatterns.horizontalProgressive.setPrecision( 'high' )

    Parameters

    • precision: "normal" | "high"

      Data packing precision.

    Returns this

    New DataPattern object.

Static Factory

  • Factory(values?: Partial<TProps> | Iterable<[string, any]>): Record<TProps> & Readonly<TProps>
  • Type parameters

    • TProps: Object

    Parameters

    • Optional values: Partial<TProps> | Iterable<[string, any]>

    Returns Record<TProps> & Readonly<TProps>

Static Record

  • Record(defaultValues: TProps, name?: undefined | string): Factory<TProps>
  • Unlike other types in Immutable.js, the Record() function creates a new Record Factory, which is a function that creates Record instances.

    See above for examples of using Record().

    Note: Record is a factory function and not a class, and does not use the new keyword during construction.

    Type parameters

    • TProps

    Parameters

    • defaultValues: TProps
    • Optional name: undefined | string

    Returns Factory<TProps>

Static getDescriptiveName

  • getDescriptiveName(record: Record<any>): string
  • Records allow passing a second parameter to supply a descriptive name that appears when converting a Record to a string or in any error messages. A descriptive name for any record can be accessed by using this method. If one was not provided, the string "Record" is returned.

    const { Record } = require('immutable')
    const Person = Record({
      name: null
    }, 'Person')
    
    var me = Person({ name: 'My Name' })
    me.toString() // "Person { "name": "My Name" }"
    Record.getDescriptiveName(me) // "Person"

    Parameters

    • record: Record<any>

    Returns string

Static isRecord

  • isRecord(maybeRecord: any): boolean
  • True if maybeRecord is an instance of a Record.

    Parameters

    • maybeRecord: any

    Returns boolean