Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

constructor

Properties

Protected allDataLabels

allDataLabels: string[]

A list of all the labels that have existed within the lifetime of the chart

type

string[]

Protected colorScale

colorScale: any

Protected patternScale

patternScale: object

Type declaration

Protected services

services: any

Protected updateCallback

updateCallback: Function

Function to be called when data or options update within the model

type

Function

Methods

generateDataLabels

  • generateDataLabels(newData: any): object
  • Parameters

    • newData: any

    Returns object

get

  • get(property?: string): any
  • Parameters

    • Optional property: string

    Returns any

getData

  • getData(): any

getDisplayData

  • getDisplayData(): any

getFillColor

  • getFillColor(datasetLabel: any, label?: any, value?: any): any
  • Parameters

    • datasetLabel: any
    • Optional label: any
    • Optional value: any

    Returns any

getFillScale

  • getFillScale(): any

getOptions

  • getOptions(): any
  • Returns any

    The chart's options

getStrokeColor

  • getStrokeColor(datasetLabel: any, label?: any, value?: any): any
  • Parameters

    • datasetLabel: any
    • Optional label: any
    • Optional value: any

    Returns any

set

  • set(newState: any, skipUpdate?: boolean): void
  • Parameters

    • newState: any
    • Default value skipUpdate: boolean = false

    Returns void

setColorScale

  • setColorScale(): void

setData

  • setData(newData: any): any
  • Parameters

    • newData: any

      The new raw data to be set

    Returns any

setOptions

  • setOptions(newOptions: any): void
  • Parameters

    • newOptions: any

      New options to be set

    Returns void

setUpdateCallback

  • setUpdateCallback(cb: Function): void
  • Parameters

    • cb: Function

    Returns void

toggleDataLabel

  • toggleDataLabel(changedLabel: string): void
  • Parameters

    • changedLabel: string

    Returns void

update

  • update(): void
  • Updates miscellanous information within the model such as the color scales, or the legend data labels

    Returns void

Protected updateAllDataLabels

  • updateAllDataLabels(): void

Object literals

Protected state

state: object

options

options: object

Type declaration

Generated using TypeDoc