Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "gauge/gauge"

Index

Functions

arcColorsModifier

  • arcColorsModifier(arcDelimiters: number[], arcColors: string[]): string[]
  • Function that checks whether the number of colors is enough for drawing specified delimiters. Adds standard colors if not enough or cuts the array if there are too many of them.

    Parameters

    • arcDelimiters: number[]

      array of delimiters.

    • arcColors: string[]

      array of colors (strings).

    Returns string[]

    modified list of colors.

arcOutline

  • arcOutline(svg: any, chartHeight: number, offset: number, arcColors: string[], outerRadius: number, arcDelimiters: number[], arcOverEffect: boolean, padding: number, paddingColor: string, arcLabels: string[], arcLabelFontSize: number, arcLabelColor: string, labelsFont: string): void
  • Function for drawing gauge arc.

    Parameters

    • svg: any

      original svg rectangle.

    • chartHeight: number

      height of gauge.

    • offset: number
    • arcColors: string[]

      array of colors.

    • outerRadius: number

      outter radius of gauge.

    • arcDelimiters: number[]

      array of delimiters in percentage.

    • arcOverEffect: boolean
    • padding: number
    • paddingColor: string
    • arcLabels: string[]
    • arcLabelFontSize: number
    • arcLabelColor: string
    • labelsFont: string

    Returns void

    modified svg.

gaugeChart

labelOutline

  • labelOutline(svg: any, areaWidth: number, chartHeight: number, offset: number, outerRadius: number, rangeLabel: string[], centralLabel: string, rangeLabelFontSize: number, labelsFont: string, centralLabelColor: string, rangeLabelColors: string[]): void
  • Function for drawing labels.

    Parameters

    • svg: any

      original svg rectangle.

    • areaWidth: number
    • chartHeight: number

      height of gauge.

    • offset: number
    • outerRadius: number

      outer radius of gauge.

    • rangeLabel: string[]

      range labels of gauge.

    • centralLabel: string

      value of the central label.

    • rangeLabelFontSize: number
    • labelsFont: string
    • centralLabelColor: string
    • rangeLabelColors: string[]

    Returns void

    modified svg.

needleBaseOutline

  • needleBaseOutline(svg: any, chartHeight: number, offset: number, needleColor: string, centralLabel: string, outerNeedle: boolean): void
  • Function for drawing needle base.

    Parameters

    • svg: any

      original svg rectangle.

    • chartHeight: number

      height of gauge.

    • offset: number
    • needleColor: string

      color of a needle.

    • centralLabel: string

      value of the central label.

    • outerNeedle: boolean

    Returns void

    modified svg.

needleOutline

  • needleOutline(svg: any, chartHeight: number, offset: number, needleColor: string, outerRadius: number, centralLabel: string, outerNeedle: boolean, needleStartValue: number): Needle
  • Function for drawing needle.

    Parameters

    • svg: any

      original svg rectangle.

    • chartHeight: number

      height of gauge.

    • offset: number
    • needleColor: string

      color of needle.

    • outerRadius: number

      outer radius of gauge.

    • centralLabel: string

      value of the central label.

    • outerNeedle: boolean
    • needleStartValue: number

    Returns Needle

    modified svg.

needleValueModifier

  • needleValueModifier(needleValue: number): number
  • Function that checks whether value that needle points at is between 0 and 100. If it is less than 0 or larger than 100, value is equated to 0 and 100 respectively.

    Parameters

    • needleValue: number

      value at which needle points.

    Returns number

    modified needleValue.

perc2RadWithShift

  • perc2RadWithShift(perc: number): number
  • Function that converts percentage into radians.

    Parameters

    • perc: number

      percentage.

    Returns number

    value in radians.

Generated using TypeDoc