Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChartUtils

Hierarchy

  • ChartUtils

Index

Constructors

constructor

Properties

Static CHART_COLORS

CHART_COLORS: { blue: string; green: string; grey: string; orange: string; purple: string; red: string; yellow: string } = ...

Type declaration

  • [key: string]: string
  • blue: string
  • green: string
  • grey: string
  • orange: string
  • purple: string
  • red: string
  • yellow: string

Static COLORS

COLORS: string[] = ...

Static DAYOFWEEK

DAYOFWEEK: string[] = ...

Static MONTHS

MONTHS: string[] = ...

Static NAMED_COLORS

NAMED_COLORS: string[] = ...

Static _seed

_seed: number = ...

Static colorHexMap

colorHexMap: {} = ...

Type declaration

  • [key: string]: number

Methods

Static addDate

  • addDate(dateString: string, add: number): string

Static bubbles

  • bubbles(config?: ChartConfig): { r: number; x: number; y: number }[]

Static color

  • color(index: number): string

Static colorHexParse

  • colorHexParse(str: string): any

Static colorRgbParse

  • colorRgbParse(str: string): { a: number; b: number; g: number; r: number }
  • Parse rgb(a) string to RGBA

    Parameters

    • str: string

      the rgb string

    Returns { a: number; b: number; g: number; r: number }

    • the parsed color
    • a: number
    • b: number
    • g: number
    • r: number

Static dayofweek

Static getChartSharedVar

Static getFunctionString

  • getFunctionString(str: string): string

Static getString2Function

  • getString2Function(functionBody: string, args?: {}): any

Static isCallableString

  • isCallableString(str: string): boolean

Static isFunctionString

  • isFunctionString(str: string): boolean

Static isObjectString

  • isObjectString(str: string): boolean

Static labels

Static months

Static namedColor

  • namedColor(index: number): string

Static newDate

  • newDate(days: number): Date

Static newDateString

  • newDateString(days: number): string

Static numbers

Static parseISODate

  • parseISODate(dateString: string): Date

Static points

  • points(config: ChartConfig): { x: number; y: number }[]

Static rand

  • rand(min?: number, max?: number): number

Static runChartAction

Static srand

  • srand(seed: number): void

Static stringify

  • stringify(option: any): string

Static transparentize

  • transparentize(value: string, opacity?: number): string

Static valueOrDefault

  • valueOrDefault(value: any, defaultValue: any): any

Generated using TypeDoc