Class ChartModel

The charting model layer which includes mainly the chart data and options, as well as some misc. information to be shared among components

Hierarchy (view full)

Constructors

Properties

allDataGroups: string[]

A list of all the data groups that have existed within the lifetime of the chart

colorClassNames: any = {}
colorScale: any = {}
services: any
state: any = ...

Methods

  • Parameters

    • __namedParameters: {
          cells: any;
          headers: any;
      }
      • cells: any
      • headers: any

    Returns any[]

  • Parameters

    • data: any

    Returns {
        name: unknown;
        status: number;
    }[]

  • Returns {
        bins: Bin<number, number>[];
        binsDomain: any[];
    }

    • bins: Bin<number, number>[]
    • binsDomain: any[]
  • Returns SeriesPoint<{
        [key: string]: number;
    }>[][]

  • Parameters

    • configs: {
          classNameTypes?: ColorClassNameTypes[];
          dataGroupName?: string | number;
          originalClassName?: string;
          value?: number;
      }
      • OptionalclassNameTypes?: ColorClassNameTypes[]
      • OptionaldataGroupName?: string | number
      • OptionaloriginalClassName?: string
      • Optionalvalue?: number

    Returns string

  • Charts that have group configs passed into them, only want to retrieve the display data relevant to that chart

    Parameters

    • Optionalgroups: any

      the included datasets for the particular chart

    Returns any

  • Parameters

    • Optionalgroups: any

    Returns {
        data: any;
        name: string;
    }[]

  • Should the data point be filled?

    Parameters

    • group: any
    • Optionalkey: any
    • Optionaldata: any
    • OptionaldefaultFilled: boolean

      the default for this chart

    Returns any

  • Retrieves the current options from the instance's state.

    Returns any

    • The current options stored in the instance's state.
  • Sets the data for the current instance.

    This method sanitizes the provided data, generates data groups, and updates the instance's state with the sanitized data and data groups.

    Parameters

    • newData: any

      The new data to be set. This data will be cloned and sanitized.

    Returns any

    • The sanitized version of the provided data.
  • Updates the current options for the instance.

    This method retrieves the existing options, updates the legend additional items, and merges the new options with the existing ones. The instance's state is then updated with the merged options.

    Parameters

    • newOptions: any

      The new options to be set. These options will be merged with the existing options.

    Returns void

  • Updates miscellanous information within the model such as the color scales, or the legend data labels

    Parameters

    • animate: boolean = true

    Returns void