[]
        
(Showing Draft Content)

PlotAreaCollection Class

PlotAreaCollection Class

Represents a collection of PlotArea objects in a FlexChartCore control.

Type parameters

  • T

Heirarchy

Constructors

constructor

Properties

isUpdating

isUpdating: boolean

Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).

length

length: number

Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.

Methods

at

  • at(index: number): T | undefined
  • Takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.

    Parameters

    • index: number

    Returns T | undefined

beginUpdate

  • beginUpdate(): void

clear

  • clear(): void

concat

  • concat(...items: ConcatArray<T>[]): T[]
  • concat(...items: (T | ConcatArray<T>)[]): T[]
  • Combines two or more arrays.

    Parameters

    • Rest ...items: ConcatArray<T>[]

      Additional items to add to the end of array1.

    Returns T[]

  • Combines two or more arrays.

    Parameters

    • Rest ...items: (T | ConcatArray<T>)[]

      Additional items to add to the end of array1.

    Returns T[]

deferUpdate

  • deferUpdate(fn: Function): void
  • Executes a function within a beginUpdate/endUpdate block.

    The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.

    Parameters

    • fn: Function

      Function to be executed without updates.

    Returns void

endUpdate

  • endUpdate(isSilent?: boolean): void
  • Resumes notifications suspended by a call to beginUpdate.

    Parameters

    • Optional isSilent: boolean

      whether to end update silently i.e without raising collectionChanged event

    Returns void

entries

  • entries(): IterableIterator<[number, T]>
  • Returns an iterable of key, value pairs for every entry in the array

    Returns IterableIterator<[number, T]>

every

  • every(callbackfn: Object, thisArg?: any): boolean
  • Determines whether all the members of an array satisfy the specified test.

    Parameters

    • callbackfn: Object

      A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.

    • Optional thisArg: any

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

    Returns boolean

filter

  • filter<S>(callbackfn: Object, thisArg?: any): S[]
  • filter(callbackfn: Object, thisArg?: any): T[]
  • Returns the elements of an array that meet the condition specified in a callback function.

    Type parameters

    • S: T

    Parameters

    • callbackfn: Object

      A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.

    • Optional thisArg: any

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

    Returns S[]

  • Returns the elements of an array that meet the condition specified in a callback function.

    Parameters

    • callbackfn: Object

      A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.

    • Optional thisArg: any

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

    Returns T[]

forEach

  • forEach(callbackfn: Object, thisArg?: any): void
  • Performs the specified action for each element in an array.

    Parameters

    • callbackfn: Object

      A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

    • Optional thisArg: any

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

    Returns void

getPlotArea

  • Gets a plot area by name.

    Parameters

    • name: string

      The name of the plot area to look for.

    Returns PlotArea

    The axis object with the specified name, or null if not found.

implementsInterface

  • implementsInterface(interfaceName: string): boolean
  • Returns true if the caller queries for a supported interface.

    Parameters

    • interfaceName: string

      Name of the interface to look for.

    Returns boolean

    True if the caller queries for a supported interface.

indexOf

  • indexOf(name: string): number
  • Gets the index of a plot area by name.

    Parameters

    • name: string

      The name of the plot area to look for.

    Returns number

    The index of the plot area with the specified name, or -1 if not found.

insert

  • insert(index: number, item: T): void
  • Inserts an item at a specific position in the array.

    Parameters

    • index: number

      Position where the item will be added.

    • item: T

      Item to add to the array.

    Returns void

join

  • join(separator?: string): string
  • Adds all the elements of an array separated by the specified separator string.

    Parameters

    • Optional separator: string

      A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

    Returns string

keys

  • keys(): IterableIterator<number>
  • Returns an iterable of keys in the array

    Returns IterableIterator<number>

lastIndexOf

  • lastIndexOf(searchElement: T, fromIndex?: number): number
  • Returns the index of the last occurrence of a specified value in an array.

    Parameters

    • searchElement: T

      The value to locate in the array.

    • Optional fromIndex: number

      The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.

    Returns number

map

  • map<U>(callbackfn: Object, thisArg?: any): U[]
  • Calls a defined callback function on each element of an array, and returns an array that contains the results.

    Type parameters

    • U

    Parameters

    • callbackfn: Object

      A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

    • Optional thisArg: any

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

    Returns U[]

onCollectionChanged

push

  • push(...items: T[]): number
  • Adds one or more items to the end of the array.

    Parameters

    • Rest ...items: T[]

    Returns number

    The new length of the array.

remove

  • remove(item: T): boolean
  • Removes an item from the array.

    Parameters

    • item: T

      Item to remove.

    Returns boolean

    True if the item was removed, false if it wasn't found in the array.

removeAt

  • removeAt(index: number): void
  • Removes an item at a specific position in the array.

    Parameters

    • index: number

      Position of the item to remove.

    Returns void

reverse

  • reverse(): T[]
  • Reverses the elements in an Array.

    Returns T[]

setAt

  • setAt(index: number, item: T): void
  • Assigns an item at a specific position in the array.

    Parameters

    • index: number

      Position where the item will be assigned.

    • item: T

      Item to assign to the array.

    Returns void

shift

  • shift(): T
  • Removes the first element from the array and returns that element.

    This method changes the length of the array.

    Returns T

slice

  • slice(begin?: number, end?: number): T[]
  • Creates a shallow copy of a portion of an array.

    Parameters

    • Optional begin: number

      Position where the copy starts.

    • Optional end: number

      Position where the copy ends.

    Returns T[]

    A shallow copy of a portion of an array.

some

  • some(callbackfn: Object, thisArg?: any): boolean
  • Determines whether the specified callback function returns true for any element of an array.

    Parameters

    • callbackfn: Object

      A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.

    • Optional thisArg: any

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

    Returns boolean

sort

  • sort(compareFn?: Function): this
  • Sorts the elements of the array in place.

    Parameters

    • Optional compareFn: Function

      Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.

    Returns this

    A copy of the sorted array.

splice

  • splice(index: number, count: number, ...item: T[]): T[]
  • Removes and/or adds items to the array.

    Parameters

    • index: number

      Position where items will be added or removed.

    • count: number

      Number of items to remove from the array.

    • Rest ...item: T[]

    Returns T[]

    An array containing the removed elements.

toLocaleString

  • toLocaleString(): string
  • Returns a string representation of an array. The elements are converted to string using their toLocalString methods.

    Returns string

toString

  • toString(): string
  • Returns a string representation of an array.

    Returns string

unshift

  • unshift(...items: T[]): number
  • Adds one or more elements to the beginning of the array and returns the new length of the array.

    Parameters

    • Rest ...items: T[]

    Returns number

    The new length of the array.

values

  • values(): IterableIterator<T>
  • Returns an iterable of values in the array

    Returns IterableIterator<T>

Events

collectionChanged

Occurs when the collection changes.