Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • KnobSettings

Index

Properties

angleArc: number

Arc size in degrees. Defaults to 360.

angleOffset: number

Starting angle in degrees. Defaults to 0.

bgColor: string

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

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: boolean

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

displayPrevious: boolean

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

fgColor: string

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

font: string

Font family used for displaying the value.

fontWeight: string | number

Font weight used for displaying the value.

height: string

Dial height, as a CSS unit.

inputColor: string

Input value (number) color as a CSS unit.

lineCap: "butt" | "round"

Gauge stroke endings.

max: number

Maximum value of the knob. Defaults to 100.

min: number

Minimum value of the knob. Defaults to 0.

readOnly: boolean

Disables input and events. Defaults to false.

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

step: number

Step size for incrementing and decrementing. Defaults to 1.

stopper: boolean

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

thickness: number

Gauge thickness, between 0 and 1.

width: string

Dial width, as a CSS unit.

Methods

  • Triggered when the Escape key is pressed.

    Parameters

    Returns boolean

    false to abort the cancellation and apply the value.

  • Invoked at each change of the value.

    Parameters

    • this: KnobInstance
    • currentValue: number

      The current value of this knob.

    Returns boolean

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

  • Invoked when drawing the canvas.

    Parameters

    Returns boolean

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

  • Allows to format output (add unit such as % or ms).

    Parameters

    • this: KnobInstance
    • currentValue: number

      Value to be formatted.

    Returns string

    The formatted value.

  • Invoked when the knob is released.

    Parameters

    • this: KnobInstance
    • currentValue: number

      The current value of this knob.

    Returns boolean

    false to abort the release and not change the value.

Generated using TypeDoc