Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PolarAxisAmplitude

Class that represents the amplitude value interval on a PolarChart.

The Amplitude Axis is depicted as a single line segment starting from the very center of the PolarChart and ending at its right side.

The Amplitude Axes' tick grid lines travel all over the PolarCharts Series space, doing a full 360 degree until returning to the other end of the tick, along the Amplitude Axis.

The Amplitude Axes' title is positioned just below the Axis line and centered horizontally.

Here is a list of the most commonly useful methods of Polar Amplitude Axis:

Index

Methods

disableAnimations

  • disableAnimations(): this
  • Disable all animations for the Axis.

    After calling this function, animations (Zooming, scaling) will be disabled. Animations must be recreated manually afterwards.

    Returns this

    Axis itself for fluent interface.

fit

  • fit(animate?: number | boolean, freeze: boolean): this
  • Fit axis view to attached series.

    Parameters

    • animate: number | boolean

      Boolean for animation enabled, or number for animation duration in milliseconds

    • freeze: boolean

      Freeze axis to fitted view? False by default.

    Returns this

formatValue

  • formatValue(value: number): string
  • Format a value along axis to string. Behavior depends on the Axis' TickStrategy. Eq. A DateTime-Axis will interpret 'value' as a Date.

    Parameters

    • value: number

      Value along axis

    Returns string

    Value formated to string

getAnimationsEnabled

  • getAnimationsEnabled(): boolean
  • Get animations disable/enable state.

    Returns boolean

    Animations default state.

getInterval

  • Get the currently applied axis scale interval.

    Returns AxisInterval

    Object containing the current start and end of Axis.

getScrollStrategy

  • getScrollStrategy(): AxisScrollStrategy | undefined
  • Returns AxisScrollStrategy | undefined

    Current AxisScrollStrategy

getStrokeStyle

  • Returns LineStyle

    Axis stroke as a LineStyle object

getTickStrategy

  • getTickStrategy(): TickStrategyType
  • Get the currently used tick strategy

    Returns TickStrategyType

getTitle

  • getTitle(): string
  • Returns string

    Axis title string

getTitleFillStyle

getTitleFont

  • Get font of axis labels.

    Returns FontSettings

    FontSettings

getTitleRotation

  • getTitleRotation(): number
  • Get rotation of Axis title.

    Returns number

    Rotation in degrees

isStopped

  • isStopped(): boolean
  • Get is axes' scrolling currently prevented by usage of mouse-interactions or 'stop()' method.

    Returns boolean

    Boolean flag

offScaleChange

  • offScaleChange(token: Token): boolean
  • Remove subscription from scale change event

    Parameters

    • token: Token

      Event listener

    Returns boolean

    True if the listener is successfully removed and false if it is not found

onScaleChange

  • onScaleChange(listener: function): Token
  • Subscribe to on scale change event

    Parameters

    • listener: function

      Event listener

        • Parameters

          • start: number
          • end: number

          Returns void

    Returns Token

    Token that is used to unsubscribe from the event

Readonly release

  • release(): void
  • Undo effects of 'stop'.

    Returns void

setAnimationScroll

  • setAnimationScroll(enabled: boolean | undefined): this
  • Specifies scroll animation.

    Parameters

    • enabled: boolean | undefined

      Boolean flag for whether scrolling should be animated or not.

    Returns this

setAnimationZoom

  • setAnimationZoom(easing: AnimationEasing | undefined, duration: number): this
  • Specifies zoom animation to use.

    Example usage:

    Desired result Argument Parameters
    Change animation setAnimationZoom(AnimationEasings.easeOut, 500) First parameter defines the easing to use for the animation. Second parameter is optional, and defines the duration for the animation
    Disable zooming animations axis.setAnimationZoom(undefined) Passing undefined as the parameter will disable the zooming animations for the Axis.

    Parameters

    • easing: AnimationEasing | undefined

      Easing of animation. Undefined disables zoom animations. See 'common/animator.Easings' for defaults

    • duration: number

      Optional default duration for zooming animations in milliseconds

    Returns this

setAnimationsEnabled

  • setAnimationsEnabled(animationsEnabled: boolean | undefined): this
  • Disable/Enable all animations of the Chart.

    Parameters

    • animationsEnabled: boolean | undefined

      Boolean value to enable/disable animations.

    Returns this

    Axis itself for fluent interface.

setInterval

  • setInterval(start: number, end: number, animate: number | boolean | undefined, disableScrolling: boolean | undefined): this
  • Set axis scale interval.

    Parameters

    • start: number

      Start scale value

    • end: number

      End scale value

    • animate: number | boolean | undefined

      Boolean for animation enabled, or number for animation duration in milliseconds

    • disableScrolling: boolean | undefined

      If true, disables automatic scrolling after setting interval

    Returns this

    Object itself for fluent interface

setMouseInteractions

  • setMouseInteractions(enabled: boolean): this
  • Enable / disable all interactions of Axis.

    Parameters

    • enabled: boolean

      Interactions enabled or not.

    Returns this

    Object itself for fluent interface.

setScrollStrategy

  • setScrollStrategy(scrollStrategy?: AxisScrollStrategy): this
  • Specify ScrollStrategy of the Axis. This decides where the Axis scrolls based on current view and series boundaries.

    Parameters

    • scrollStrategy: AxisScrollStrategy

      AxisScrollStrategy or undefined to disable automatic scrolling. See AxisScrollStrategies for all options.

    Returns this

    Object itself for fluent interface.

setStrokeStyle

setTickStrategy

  • setTickStrategy(tickStrategy: TickStrategy, styler?: TickStrategyStyler<TickStrategyParameters, TickStrategy>): this
  • Set TickStrategy of Axis.

    The TickStrategy defines the positioning and formatting logic of Axis ticks as well as the style of created ticks.

    Example usage:

    DateTime Axis:

    Axis.setTickStrategy( AxisTickStrategies.DateTime )
    

    Disable automatic ticks completely:

    Axis.setTickStrategy( AxisTickStrategies.Empty )
    

    Customized TickStrategy:

    Axis.setTickStrategy( AxisTickStrategies.Numeric, ( tickStrategy: NumericTickStrategy ) => tickStrategy
        .setNumericUnits( true )
        .setMajorTickStyle( ( tickStyle ) => tickStyle
            .setLabelFont( ( font ) => font
                .setWeight( 'bold' )
            )
        )
    )
    

    Type table for optional second parameter ('styler'):

    tickStrategy styler
    'Numeric' ( tickStrategy: NumericTickStrategy ) => tickStrategy
    'Time' ( tickStrategy: TimeTickStrategy ) => tickStrategy
    'DateTime' ( tickStrategy: DateTimeTickStrategy ) => tickStrategy
    'Empty' undefined

    Type parameters

    • TickStrategy: TickStrategyType

    Parameters

    • tickStrategy: TickStrategy

      Selected TickStrategy. See AxisTickStrategies for a collection of options.

    • styler: TickStrategyStyler<TickStrategyParameters, TickStrategy>

      Optional callback that can be used to customize the TickStrategy. The type of supplied TickStrategy object depends on what was supplied to 'tickStrategy' parameter; See the above method documentation for a value table.

    Returns this

    Object itself for fluent interface.

setTickStyle

  • setTickStyle(styler: TickStrategyStyler<TickStrategyParameters, TickStrategy>): this
  • Type parameters

    • TickStrategy: TickStrategyType

    Parameters

    • styler: TickStrategyStyler<TickStrategyParameters, TickStrategy>

    Returns this

setTitle

  • setTitle(title: string): this
  • Specifies an Axis title string

    Parameters

    • title: string

      Axis title as a string

    Returns this

    Axis itself for fluent interface

setTitleFillStyle

  • Specifies Axis title FillStyle

    Parameters

    Returns this

    Axis itself for fluent interface

setTitleFont

setTitleRotation

  • setTitleRotation(value: number): this
  • Set rotation of Axis title.

    Parameters

    • value: number

      Rotation in degrees

    Returns this

    Object itself

stop

  • stop(): this
  • Stop scrolling of axis until restored.

    Returns this