Options
All
  • Public
  • Public/Protected
  • All
Menu

Settings for the jQuery knob plugin to configure the behavior and appearance.

Hierarchy

  • KnobSettings

Index

Properties

angleArc

angleArc: number

Arc size in degrees. Defaults to 360.

angleOffset

angleOffset: number

Starting angle in degrees. Defaults to 0.

bgColor

bgColor: string

Background color, i.e. the unfilled part of the knob.

cursor

cursor: number | true

Display mode "cursor", cursor size could be changed passing a numeric value to the option, default width is used when passing boolean value true.

displayInput

displayInput: boolean

Set to false to hide the input. Defaults to true.

displayPrevious

displayPrevious: boolean

true to display the previous value with transparency. Defaults to false.

fgColor

fgColor: string

Foreground color, i.e. the filled part of the knob.

font

font: string

Font family used for displaying the value.

fontWeight

fontWeight: string | number

Font weight used for displaying the value.

height

height: string

Dial height, as a CSS unit.

inputColor

inputColor: string

Input value (number) color as a CSS unit.

lineCap

lineCap: "butt" | "round"

Gauge stroke endings.

max

max: number

Maximum value of the knob. Defaults to 100.

min

min: number

Minimum value of the knob. Defaults to 0.

readOnly

readOnly: boolean

Disables input and events. Defaults to false.

rotation

Indicates in which direction the value of the knob increases. Defaults to clockwise.

step

step: number

Step size for incrementing and decrementing. Defaults to 1.

stopper

stopper: boolean

Stop at min & max on keydown and mousewheel. Defaults to true.

thickness

thickness: number

Gauge thickness, between 0 and 1.

width

width: string

Dial width, as a CSS unit.

Methods

cancel

  • cancel(): boolean
  • Triggered when the Escape key is pressed.

    Returns boolean

    false to abort the cancellation and apply the value.

change

  • change(currentValue: number): boolean
  • Invoked at each change of the value.

    Parameters

    • currentValue: number

      The current value of this knob.

    Returns boolean

    false to abort the change and revert the knob to its original value.

draw

  • draw(): boolean
  • Invoked when drawing the canvas.

    Returns boolean

    true to continue with the default drawing of the knob widget, false to abort (such as when performing custom drawing).

format

  • format(currentValue: number): string
  • Allows to format output (add unit such as % or ms).

    Parameters

    • currentValue: number

      Value to be formatted.

    Returns string

    The formatted value.

release

  • release(currentValue: number): boolean
  • Invoked when the knob is released.

    Parameters

    • currentValue: number

      The current value of this knob.

    Returns boolean

    false to abort the release and not change the value.

Generated using TypeDoc